Skip to main content

Module sign

Module sign 

Source
Expand description

Sign command.

Produces an ECDSA P-256 signature using a private key stored in a slot.

The driver exposes the “External” sign mode only: the host first loads a 32-byte message digest into the chip’s TempKey register via a passthrough AteccChannel::nonce_passthrough call, then issues AteccChannel::sign_external. The “Internal” sign mode (where the chip signs a digest it computed itself in a previous operation) is not used in this project’s workflow and is therefore not exposed.

Reference: CryptoAuthLib lib/calib/calib_sign.c, constants SIGN_MODE_EXTERNAL (0x80), SIGN_MODE_INTERNAL (0x00).

§Signature format

The returned 64 bytes are the raw R || S form (each 32 bytes, big-endian). To convert to the ASN.1 DER form used by many TLS or certificate libraries, the higher layer must do so explicitly: the driver returns the chip output verbatim.

Constants§

SIGNATURE_SIZE
Size of the returned ECDSA P-256 signature (R || S).
SIGN_MODE_EXTERNAL_FROM_MSGDIGBUF 🔒
param1 mode bits for Sign(external) on the ATECC608.