CTCert

CTCert

Summary #

The console-unique CTCert is used for signing CTX files, the DeviceCert used by eShop, and for DSiWare exports. This ECDSA signature, the ECDSA private key for this cert, and the IssuerID is loaded from memory initialized by bootrom instead of NAND. This is the 3DS equivalent of the DSi TWCert.

The CTCert is signed with ECDSA by Nintendo. CTCerts can be verified via a DER stored in NATIVE_FIRM, separate DERs are used for retail and dev/debug.

Structure #

OffsetSizeDescription
0x000x04Signature Type, 0x010005.
0x040x3CECDSA Signature using Nintendo’s private key, in big-endian. The first 0x1E bytes are “r”; the second 0x1E bytes are “s”. The hash is SHA-256 computed over this certificate, starting at byte 0x80 (“Cert Issue ID”) to the end.
0x400x40Padding
0x800x40Cert Issuer ID, for retail this is “Nintendo CA - G3_NintendoCTR2prod”, for dev “Nintendo CA - G3_NintendoCTR2dev”
0xC00x04Key Type
0xC40x40Key ID: “CT-”, where DeviceId is the hex DeviceId, and ConsoleType is 00 for retail, any other single byte hex value for dev
0x1040x04Expiration time as UNIX Timestamp in big endian.
0x1080x3CECDSA Public Key of this console as a curve point in big-endian. The first 0x1E bytes are “x” of this point; the second 0x1E bytes are “y”.
0x1440x3CPadding

Boot ROM decrypts OTP Registers and writes the private key and Nintendo’s signature of CTCert to ARM9 ITCM; the public key is computed from the private key.

The curve used for ECDSA is sect233r1.