NdsForge.NET 1.0.1
Read, validate, edit, compare, and build Nintendo DS and DSi images from .NET
Loading...
Searching...
No Matches
NdsForge.NdsDsiHeader Class Referencesealed

Projects DSi security, digest, memory, title, and save metadata while preserving the complete extension. More...

Public Member Functions

NdsRegion GetModcryptArea (NdsModcryptArea area)
 Selects one declared modcrypt interval while rejecting undefined enum values at the model boundary.
bool VerifyRsaSignature (NdsDsiRsaPublicKey publicKey)
 Verifies the stored signature against an explicitly trusted public key and the preserved final bytes 0x000-0xDFF. A true result establishes authenticity only relative to that caller trust choice.

Properties

ReadOnlyMemory< byte > RawData [get]
 Preserves bytes 0x180-0xFFF, including reserved and cryptographic fields not yet interpreted.
ReadOnlyMemory< byte > MemoryBankSettings [get]
 Gets raw global, ARM9, ARM7, and WRAM memory-bank settings.
uint RegionFlags [get]
 Gets permitted DSi region flags.
uint AccessControl [get]
 Gets DSi access-control flags.
uint ScfgExtMask [get]
 Preserves the SCFG_EXT mask controlling which DSi hardware configuration bits software may change.
byte ApplicationFlags [get]
 Gets DSi application flags.
uint Arm7DeviceListAddress [get]
 Identifies the runtime ARM7 address of the DSi device-list structure used during service initialization.
NdsRegion NtrDigest [get]
 Locates the NTR-mode content range covered by the hierarchical DSi digest tables.
NdsRegion TwlDigest [get]
 Locates the TWL-mode content range covered by the hierarchical DSi digest tables.
NdsRegion SectorHashTable [get]
 Locates the SHA-1 sector digest array whose grouping is defined by DigestSectorSize.
NdsRegion BlockHashTable [get]
 Locates the second-level SHA-1 array covering groups of sector hashes.
uint DigestSectorSize [get]
 Defines the content byte granularity represented by each entry in SectorHashTable.
uint DigestBlockSectorCount [get]
 Defines how many sector digests contribute to each entry in BlockHashTable.
uint BannerSize [get]
 Declares the DSi banner allocation, including animated data when the version is 0x0103.
uint TotalImageSize [get]
 Reports the DSi metadata's total content extent, distinct from physical padding and the common used-size field.
NdsRegion ModcryptArea1 [get]
 Locates the first optional region transformed by DSi modcrypt when corresponding flags enable it.
NdsRegion ModcryptArea2 [get]
 Locates the second optional region transformed by DSi modcrypt when corresponding flags enable it.
bool HasModcryptAreas [get]
 Reports whether either modcrypt interval has content, independently from key-selection flags.
bool UsesInsecureModcryptKey [get]
 Indicates that modcrypt uses the public first sixteen header bytes instead of a securely derived normal key. Either common-header flag 0x04 or DSi application flag 0x80 selects this development mode.
ulong TitleId [get]
 Combines low and high words into the platform title identifier used by DSi services and save storage.
uint PublicSaveSize [get]
 Declares public writable storage bytes requested by DSi software, not an embedded ROM region.
uint PrivateSaveSize [get]
 Declares private writable storage bytes requested by DSi software, not an embedded ROM region.
ReadOnlyMemory< byte > AgeRatings [get]
 Preserves sixteen territory-specific rating bytes because their flags and authorities vary by slot.
ReadOnlyMemory< byte > Arm9Hmac [get]
 Contains the 20-byte SHA-1 HMAC authenticating the common ARM9 payload; no key-validity claim is implied.
ReadOnlyMemory< byte > Arm7Hmac [get]
 Contains the 20-byte SHA-1 HMAC authenticating the common ARM7 payload; no key-validity claim is implied.
ReadOnlyMemory< byte > DigestMasterHmac [get]
 Contains the 20-byte SHA-1 HMAC authenticating the digest hierarchy's master data.
ReadOnlyMemory< byte > BannerHmac [get]
 Contains the 20-byte SHA-1 HMAC authenticating DSi banner bytes when required by title metadata.
ReadOnlyMemory< byte > Arm9iHmac [get]
 Contains the 20-byte SHA-1 HMAC authenticating the DSi-mode ARM9i payload.
ReadOnlyMemory< byte > Arm7iHmac [get]
 Contains the 20-byte SHA-1 HMAC authenticating the DSi-mode ARM7i payload.
ReadOnlyMemory< byte > Arm9WithoutSecureAreaHmac [get]
 Contains the alternate ARM9 HMAC calculated with its secure-area portion excluded.
ReadOnlyMemory< byte > DebugArguments [get]
 Gets raw DSi debug arguments.
ReadOnlyMemory< byte > RsaSignature [get]
 Preserves the 128-byte header signature for later verification without claiming trust or key provenance.

Detailed Description

Projects DSi security, digest, memory, title, and save metadata while preserving the complete extension.

Definition at line 4 of file NdsDsiHeader.cs.

Member Function Documentation

◆ GetModcryptArea()

NdsRegion NdsForge.NdsDsiHeader.GetModcryptArea ( NdsModcryptArea area)
inline

Selects one declared modcrypt interval while rejecting undefined enum values at the model boundary.

Parameters
areaFirst or second area whose absolute image region is required.
Returns
The header-declared half-open interval, which may be empty.

Definition at line 112 of file NdsDsiHeader.cs.

◆ VerifyRsaSignature()

bool NdsForge.NdsDsiHeader.VerifyRsaSignature ( NdsDsiRsaPublicKey publicKey)
inline

Verifies the stored signature against an explicitly trusted public key and the preserved final bytes 0x000-0xDFF. A true result establishes authenticity only relative to that caller trust choice.

Parameters
publicKeyCaller-trusted RSA-1024 key.
Returns
true when the PKCS#1 v1.5 RSA-SHA1 signature matches.

Definition at line 164 of file NdsDsiHeader.cs.

Property Documentation

◆ AccessControl

uint NdsForge.NdsDsiHeader.AccessControl
get

Gets DSi access-control flags.

Definition at line 58 of file NdsDsiHeader.cs.

◆ AgeRatings

ReadOnlyMemory<byte> NdsForge.NdsDsiHeader.AgeRatings
get

Preserves sixteen territory-specific rating bytes because their flags and authorities vary by slot.

Definition at line 129 of file NdsDsiHeader.cs.

◆ ApplicationFlags

byte NdsForge.NdsDsiHeader.ApplicationFlags
get

Gets DSi application flags.

Definition at line 64 of file NdsDsiHeader.cs.

◆ Arm7DeviceListAddress

uint NdsForge.NdsDsiHeader.Arm7DeviceListAddress
get

Identifies the runtime ARM7 address of the DSi device-list structure used during service initialization.

Definition at line 67 of file NdsDsiHeader.cs.

◆ Arm7Hmac

ReadOnlyMemory<byte> NdsForge.NdsDsiHeader.Arm7Hmac
get

Contains the 20-byte SHA-1 HMAC authenticating the common ARM7 payload; no key-validity claim is implied.

Definition at line 135 of file NdsDsiHeader.cs.

◆ Arm7iHmac

ReadOnlyMemory<byte> NdsForge.NdsDsiHeader.Arm7iHmac
get

Contains the 20-byte SHA-1 HMAC authenticating the DSi-mode ARM7i payload.

Definition at line 147 of file NdsDsiHeader.cs.

◆ Arm9Hmac

ReadOnlyMemory<byte> NdsForge.NdsDsiHeader.Arm9Hmac
get

Contains the 20-byte SHA-1 HMAC authenticating the common ARM9 payload; no key-validity claim is implied.

Definition at line 132 of file NdsDsiHeader.cs.

◆ Arm9iHmac

ReadOnlyMemory<byte> NdsForge.NdsDsiHeader.Arm9iHmac
get

Contains the 20-byte SHA-1 HMAC authenticating the DSi-mode ARM9i payload.

Definition at line 144 of file NdsDsiHeader.cs.

◆ Arm9WithoutSecureAreaHmac

ReadOnlyMemory<byte> NdsForge.NdsDsiHeader.Arm9WithoutSecureAreaHmac
get

Contains the alternate ARM9 HMAC calculated with its secure-area portion excluded.

Definition at line 150 of file NdsDsiHeader.cs.

◆ BannerHmac

ReadOnlyMemory<byte> NdsForge.NdsDsiHeader.BannerHmac
get

Contains the 20-byte SHA-1 HMAC authenticating DSi banner bytes when required by title metadata.

Definition at line 141 of file NdsDsiHeader.cs.

◆ BannerSize

uint NdsForge.NdsDsiHeader.BannerSize
get

Declares the DSi banner allocation, including animated data when the version is 0x0103.

Definition at line 88 of file NdsDsiHeader.cs.

◆ BlockHashTable

NdsRegion NdsForge.NdsDsiHeader.BlockHashTable
get

Locates the second-level SHA-1 array covering groups of sector hashes.

Definition at line 79 of file NdsDsiHeader.cs.

◆ DebugArguments

ReadOnlyMemory<byte> NdsForge.NdsDsiHeader.DebugArguments
get

Gets raw DSi debug arguments.

Definition at line 153 of file NdsDsiHeader.cs.

◆ DigestBlockSectorCount

uint NdsForge.NdsDsiHeader.DigestBlockSectorCount
get

Defines how many sector digests contribute to each entry in BlockHashTable.

Definition at line 85 of file NdsDsiHeader.cs.

◆ DigestMasterHmac

ReadOnlyMemory<byte> NdsForge.NdsDsiHeader.DigestMasterHmac
get

Contains the 20-byte SHA-1 HMAC authenticating the digest hierarchy's master data.

Definition at line 138 of file NdsDsiHeader.cs.

◆ DigestSectorSize

uint NdsForge.NdsDsiHeader.DigestSectorSize
get

Defines the content byte granularity represented by each entry in SectorHashTable.

Definition at line 82 of file NdsDsiHeader.cs.

◆ HasModcryptAreas

bool NdsForge.NdsDsiHeader.HasModcryptAreas
get

Reports whether either modcrypt interval has content, independently from key-selection flags.

Definition at line 100 of file NdsDsiHeader.cs.

◆ MemoryBankSettings

ReadOnlyMemory<byte> NdsForge.NdsDsiHeader.MemoryBankSettings
get

Gets raw global, ARM9, ARM7, and WRAM memory-bank settings.

Definition at line 52 of file NdsDsiHeader.cs.

◆ ModcryptArea1

NdsRegion NdsForge.NdsDsiHeader.ModcryptArea1
get

Locates the first optional region transformed by DSi modcrypt when corresponding flags enable it.

Definition at line 94 of file NdsDsiHeader.cs.

◆ ModcryptArea2

NdsRegion NdsForge.NdsDsiHeader.ModcryptArea2
get

Locates the second optional region transformed by DSi modcrypt when corresponding flags enable it.

Definition at line 97 of file NdsDsiHeader.cs.

◆ NtrDigest

NdsRegion NdsForge.NdsDsiHeader.NtrDigest
get

Locates the NTR-mode content range covered by the hierarchical DSi digest tables.

Definition at line 70 of file NdsDsiHeader.cs.

◆ PrivateSaveSize

uint NdsForge.NdsDsiHeader.PrivateSaveSize
get

Declares private writable storage bytes requested by DSi software, not an embedded ROM region.

Definition at line 126 of file NdsDsiHeader.cs.

◆ PublicSaveSize

uint NdsForge.NdsDsiHeader.PublicSaveSize
get

Declares public writable storage bytes requested by DSi software, not an embedded ROM region.

Definition at line 123 of file NdsDsiHeader.cs.

◆ RawData

ReadOnlyMemory<byte> NdsForge.NdsDsiHeader.RawData
get

Preserves bytes 0x180-0xFFF, including reserved and cryptographic fields not yet interpreted.

Definition at line 49 of file NdsDsiHeader.cs.

◆ RegionFlags

uint NdsForge.NdsDsiHeader.RegionFlags
get

Gets permitted DSi region flags.

Definition at line 55 of file NdsDsiHeader.cs.

◆ RsaSignature

ReadOnlyMemory<byte> NdsForge.NdsDsiHeader.RsaSignature
get

Preserves the 128-byte header signature for later verification without claiming trust or key provenance.

Definition at line 156 of file NdsDsiHeader.cs.

◆ ScfgExtMask

uint NdsForge.NdsDsiHeader.ScfgExtMask
get

Preserves the SCFG_EXT mask controlling which DSi hardware configuration bits software may change.

Definition at line 61 of file NdsDsiHeader.cs.

◆ SectorHashTable

NdsRegion NdsForge.NdsDsiHeader.SectorHashTable
get

Locates the SHA-1 sector digest array whose grouping is defined by DigestSectorSize.

Definition at line 76 of file NdsDsiHeader.cs.

◆ TitleId

ulong NdsForge.NdsDsiHeader.TitleId
get

Combines low and high words into the platform title identifier used by DSi services and save storage.

Definition at line 120 of file NdsDsiHeader.cs.

◆ TotalImageSize

uint NdsForge.NdsDsiHeader.TotalImageSize
get

Reports the DSi metadata's total content extent, distinct from physical padding and the common used-size field.

Definition at line 91 of file NdsDsiHeader.cs.

◆ TwlDigest

NdsRegion NdsForge.NdsDsiHeader.TwlDigest
get

Locates the TWL-mode content range covered by the hierarchical DSi digest tables.

Definition at line 73 of file NdsDsiHeader.cs.

◆ UsesInsecureModcryptKey

bool NdsForge.NdsDsiHeader.UsesInsecureModcryptKey
get

Indicates that modcrypt uses the public first sixteen header bytes instead of a securely derived normal key. Either common-header flag 0x04 or DSi application flag 0x80 selects this development mode.

Definition at line 106 of file NdsDsiHeader.cs.


The documentation for this class was generated from the following file: