BCH

From switch2brew
Revision as of 06:01, 15 June 2025 by Ootulp (talk | contribs) (Created page with "= NvBootComponentHeader = {| class="wikitable" border="1" |- ! Offset ! Size ! Name ! Description |- | 0x0000 || 4 || HeaderMagic || |- | 0x0004 || 0x40 || OuterDigest || |- | style="background: orange" | Outer Section Begin | style="background: orange" | | style="background: orange" | | style="background: orange" | |- | 0x0044 || 0xC || Reserved || |- | 0x0050 || 0x40 || InnerDigest || |- | 0x0090 || 0x40 || Stage2Signature || |- | 0x0BA0...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

NvBootComponentHeader

Offset Size Name Description
0x0000 4 HeaderMagic
0x0004 0x40 OuterDigest
Outer Section Begin
0x0044 0xC Reserved
0x0050 0x40 InnerDigest
0x0090 0x40 Stage2Signature
0x0BA0 0x180 Stage2Pcp Pinned by fuses.
Stage 2 Signed Section Begin
0x0FC0 16 Salt2 Random 16 bytes.
0x0FD0 16 Stage2Ecid
0x0FE0 4 Stage2NumBinaries
0x0FE4 0x100 ?
0x13F0 8 BrbctBinding Must match BR-BCT+0x19B0.
0x1400 8 * 0xA0 Stage2Components[8]
0x1900 0x180 Stage1Signature Always RSA-3072.
Stage 1 Signed Section Begin
0x1A80 16 Salt3
0x1A90 16 Stage1Ecid
0x1AA0 4 Stage1NumBinaries
0x1AA4 8 Key7KdfLabel
0x1EE0 1 * 0x90 Stage1Components[1]
Outer Section End / Stage 2 Signed Section End / Stage 1 Signed Section End

NvStage1Component

Offset Size Name
AAD Section Start
0x0 4 BinaryMagic
0x4 4 BinaryLen
0x8 4 LoadDestination
0xC 4 EntryPoint
0x10 4 Version
0x14 4 Reserved
0x18 8 PartitionOffset (Only used for MEM-BCT)
0x20 16 KdfLabel
0x30 4 Zeroes
0x34 12 GcmIv
AAD Section End
0x40 16 GcmAuthTag
0x50 64 PayloadDigest (SHA512 of 0x2000..)

NvStage2Component

Offset Size Name
AAD Section Start
0x0 4 BinaryMagic
0x4 4 BinaryLen
0x8 4 LoadDestination
0xC 4 EntryPoint
0x10 4 Version
0x24 0x1C ?
0x30 16 KdfLabel
0x40 4 Zeroes
0x44 12 GcmIv
AAD Section End
0x50 16 GcmAuthTag
0x60 64 PayloadDigest (SHA512 of 0x2000..)

NvBootComponentVersion

Offset Size Name
0x0 1 Major
0x1 1 Minor
0x2 1 Ratchet (others)
0x2 2 BigRatchet (NVDEC only)

NvBootCryptoSignatures

This is a union.

Offset Size Name
0x0 0x20 Sha256Signature
0x0 0x40 Sha512Signature
0x0 0x40 Rsa3072Signature
0x0 0xB10 XmssSignature