Expand description
Numeric constants of the ATECC608B protocol.
Every byte value, command opcode, max execution time, polling parameter, and packet size lives here. The rest of the driver imports symbols by name and never uses magic numbers.
Source of truth: Microchip CryptoAuthLib (lib/calib/calib_command.h and
lib/calib/calib_execution.c). Cross-references to the public summary
datasheet (DS40002239A) are included in comments where they exist.
ConstantsΒ§
- COMMAND_
FRAME_ πOVERHEAD - Number of bytes a command frame contains besides its data payload.
- EXEC_
TIME_ πCHECKMAC_ MS - Nominal execution time of
CheckMac, in milliseconds. - EXEC_
TIME_ πCOUNTER_ MS - Nominal execution time of
Counter, in milliseconds. - EXEC_
TIME_ πGENDIG_ MS - Nominal execution time of
GenDig, in milliseconds. - EXEC_
TIME_ πGENKEY_ MS - Nominal execution time of
GenKey, in milliseconds. - EXEC_
TIME_ πINFO_ MS - Nominal execution time of
Info, in milliseconds. - EXEC_
TIME_ πLOCK_ MS - Nominal execution time of
Lock, in milliseconds. - EXEC_
TIME_ πNONCE_ MS - Nominal execution time of
Nonce, in milliseconds. - EXEC_
TIME_ πPRIVWRITE_ MS - Nominal execution time of
PrivWrite, in milliseconds. - EXEC_
TIME_ πRANDOM_ MS - Nominal execution time of
Random, in milliseconds. - EXEC_
TIME_ πREAD_ MS - Nominal execution time of
Read, in milliseconds. - EXEC_
TIME_ πSIGN_ MS - Nominal execution time of
Sign, in milliseconds. - EXEC_
TIME_ πVERIFY_ MS - Nominal execution time of
Verify, in milliseconds. - EXEC_
TIME_ πWRITE_ MS - Nominal execution time of
Write, in milliseconds. - I2C_
ADDRESS π - Factory default 7-bit I2C address of an ATECC608B-SSHDA. Programmable via
the
ChipMode.I2C_Addressbyte of the config zone, but never changed in this project. - MAX_
COMMAND_ πDATA_ LEN - Maximum size of the data field of a command, equal to
MAX_PACKET_SIZE - 1 (word addr) - COMMAND_FRAME_OVERHEAD = 155. - MAX_
PACKET_ πSIZE - Maximum size of a command packet sent to the chip, including the word address byte prepended at the I2C level.
- MAX_
RESPONSE_ πSIZE - Maximum size of a response read from the chip.
- OP_
CHECKMAC π CheckMac- verify a precomputed MAC against a stored secret.- OP_
COUNTER π Counter- read or increment the monotonic counters.- OP_
GENDIG π GenDig- derive a digest intoTempKeyfor use withWriteencrypted.- OP_
GENKEY π GenKey- generate a P-256 key pair in a slot, or compute a public key.- OP_INFO π
Info- retrieve revision / status /KeyValid.- OP_LOCK π
Lock- irreversibly lock a zone or a slot.- OP_
NONCE π Nonce- loadTempKeyorMsgDigBuffor subsequent commands.- OP_
PRIVWRITE π PrivWrite- encrypted write of a P-256 private key into a slot.- OP_
RANDOM π Random- produce 32 cryptographically random bytes.- OP_READ π
Read- read 4 or 32 bytes from config / data / OTP.- OP_SIGN π
Sign- produce an ECDSA P-256 signature.- OP_
VERIFY π Verify- verify an ECDSA P-256 signature.- OP_
WRITE π Write- write 4 or 32 bytes to config / data / OTP.- POLLING_
MAX_ πMS - Upper bound on the total polling window before
crate::AteccError::Timeout. - POLLING_
PERIOD_ πMS - Time the driver waits between two consecutive response reads.
- WAKE_
DELAY_ US - Time to wait after the wake pulse before the first I2C transaction.
- WAKE_
LOW_ DURATION_ US - Minimum duration SDA must be held low to wake the chip (datasheet
tWLO). - WAKE_
RESPONSE_ πOK - Bytes returned by the chip after a successful wake.
- WAKE_
RESPONSE_ πSELFTEST_ FAIL - Bytes returned if the chipβs self-test failed at wake.
- WORD_
ADDRESS_ πCOMMAND - Word address sent before every command packet.
- WORD_
ADDRESS_ πIDLE - Word address that puts the chip in idle (keeps
TempKey, drops the watchdog). - WORD_
ADDRESS_ πSLEEP - Word address that puts the chip into deep sleep (clears volatile state).