How the view key and spend key be generated?

Hi, MobileCoin community.

I’m curious about how the view key and spend key be generated from the master key. I saw there haven’t a standard to derive keys from the Ed25519 keys, like HD key generation.

1 Like

Hi @Satoshi! The View Key and Spend Key are generated from the master key via an HKDF (HMAC-based Extract-and-Expand Key Derivation Function), which derives the keys from the master key entropy, in a struct called the Root Identity.

Hkdf::<Blake2b256>::extract(None, &ikm[..])

Here is where we construct the AccountKey (which contains the View and Spend Key) from the Root Identity, in transaction/

1 Like

Very helpful, thank you!