Expand description
GenDig command.
Computes a digest combining the contents of a slot, the OTP, or the
config zone with the current TempKey and stores the result back in
TempKey. The result is what subsequent commands like an encrypted
Write or PrivWrite use as the shared secret with the host.
In this project’s provisioning flow:
- The host calls
crate::AteccChannel::nonce_randomto establish a sharedTempKeyvalue between host and chip. - The host calls
AteccChannel::gendigwith the I/O Protection Key slot (slot 8). The chip computesSHA256(IOKey || OpCode || Mode || KeyId || SN || padding || TempKey)and replacesTempKeywith the result. The host computes the same digest off-chip. - The host XORs the new
TempKeywith the plaintext to write, appends a MAC, and sends an encryptedWriteorPrivWrite.
The driver does not orchestrate the host-side digest derivation: that is a service-layer concern.
Reference: CryptoAuthLib lib/calib/calib_gendig.c, constants
GENDIG_ZONE_CONFIG (0x00), GENDIG_ZONE_OTP (0x01),
GENDIG_ZONE_DATA (0x02).
Enums§
- GenDig
Zone param1zone bits.