device_identity_record

Function device_identity_record 

Source
pub fn device_identity_record(secret: &[u8; 32]) -> ([u8; 32], [u8; 64])
Expand description

Derive a device identity’s public key and its persisted record from a raw Ed25519 secret.

Shared by first-boot generation and Effect::ProvisionIdentity so the two can never disagree about the derivation or the record layout.

The caller supplies secret and owns the question this function cannot answer: it MUST come from a cryptographic RNG with real entropy behind it. On the nRF boards that is the hardware TRNG with bias correction enabled; on Espressif it is EspCryptoRng, which refuses to exist unless the RF noise source is live.