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

Defines which DSi authentication fields a build can honestly produce. Component HMACs use caller-selected key material, while an optional signing provider keeps private-key custody outside the image builder. The built-in ndstool policy remains explicitly a homebrew compatibility identity rather than a retail trust claim. More...

Static Public Member Functions

static NdsDsiIntegrityOptions CreateHmacSha1 (ReadOnlySpan< byte > key, NdsDsiSignatureMode signatureMode=NdsDsiSignatureMode.Cleared)
 Copies an application-supplied HMAC-SHA1 key without assigning it any implicit provenance. The same key must be supplied to validation when callers want authentication fields checked rather than merely parsed.
static NdsDsiIntegrityOptions CreateSignedHmacSha1 (ReadOnlySpan< byte > hmacKey, INdsDsiSignatureProvider signatureProvider)
 Combines component HMAC generation with a real header signature supplied by a caller-controlled authority. The provider is retained rather than owned and must remain usable until every build using this policy ends.

Properties

static NdsDsiIntegrityOptions Unauthenticated = new(null, NdsDsiSignatureMode.Cleared, null) [get]
 Uses zeroed HMAC and signature fields for a clearly unauthenticated DSi image.
static NdsDsiIntegrityOptions NdstoolHomebrew [get]
 Reproduces the public 64-byte HMAC-SHA1 key and no$gba development marker used by modern ndstool builds. This is a compatibility identity, not a claim that Nintendo hardware will trust the resulting image.
bool ComputesHmacSha1 [get]
 Indicates whether component HMAC fields are recomputed instead of deliberately cleared.
NdsDsiSignatureMode SignatureMode [get]
 Controls only the signature field and never upgrades a development marker into an authenticity claim.

Detailed Description

Defines which DSi authentication fields a build can honestly produce. Component HMACs use caller-selected key material, while an optional signing provider keeps private-key custody outside the image builder. The built-in ndstool policy remains explicitly a homebrew compatibility identity rather than a retail trust claim.

Definition at line 8 of file NdsDsiIntegrityOptions.cs.

Member Function Documentation

◆ CreateHmacSha1()

NdsDsiIntegrityOptions NdsForge.NdsDsiIntegrityOptions.CreateHmacSha1 ( ReadOnlySpan< byte > key,
NdsDsiSignatureMode signatureMode = NdsDsiSignatureMode::Cleared )
inlinestatic

Copies an application-supplied HMAC-SHA1 key without assigning it any implicit provenance. The same key must be supplied to validation when callers want authentication fields checked rather than merely parsed.

Parameters
keyNon-empty HMAC key bytes owned by the calling application.
signatureModeWhether the unrelated 128-byte signature field stays clear or carries a development marker.
Returns
An immutable build policy independent from the source key buffer.

Definition at line 53 of file NdsDsiIntegrityOptions.cs.

◆ CreateSignedHmacSha1()

NdsDsiIntegrityOptions NdsForge.NdsDsiIntegrityOptions.CreateSignedHmacSha1 ( ReadOnlySpan< byte > hmacKey,
INdsDsiSignatureProvider signatureProvider )
inlinestatic

Combines component HMAC generation with a real header signature supplied by a caller-controlled authority. The provider is retained rather than owned and must remain usable until every build using this policy ends.

Parameters
hmacKeyNon-empty key for DSi component and optional digest HMACs.
signatureProviderRSA-1024 provider or application adapter for a hardware/remote signer.
Returns
An immutable policy whose HMAC bytes are copied immediately.

Definition at line 77 of file NdsDsiIntegrityOptions.cs.

Property Documentation

◆ ComputesHmacSha1

bool NdsForge.NdsDsiIntegrityOptions.ComputesHmacSha1
get

Indicates whether component HMAC fields are recomputed instead of deliberately cleared.

Definition at line 91 of file NdsDsiIntegrityOptions.cs.

◆ NdstoolHomebrew

NdsDsiIntegrityOptions NdsForge.NdsDsiIntegrityOptions.NdstoolHomebrew
staticget
Initial value:
= new(
[
0x21, 0x06, 0xC0, 0xDE, 0xBA, 0x98, 0xCE, 0x3F, 0xA6, 0x92, 0xE3, 0x9D, 0x46, 0xF2, 0xED, 0x01,
0x76, 0xE3, 0xCC, 0x08, 0x56, 0x23, 0x63, 0xFA, 0xCA, 0xD4, 0xEC, 0xDF, 0x9A, 0x62, 0x78, 0x34,
0x8F, 0x6D, 0x63, 0x3C, 0xFE, 0x22, 0xCA, 0x92, 0x20, 0x88, 0x97, 0x23, 0xD2, 0xCF, 0xAE, 0xC2,
0x32, 0x67, 0x8D, 0xFE, 0xCA, 0x83, 0x64, 0x98, 0xAC, 0xFD, 0x3E, 0x37, 0x87, 0x46, 0x58, 0x24,
],
NdsDsiSignatureMode.NoGbaDevelopmentMarker,
null)
NdsDsiSignatureMode
Selects how a DSi build populates the 128-byte signature field under an explicit authenticity policy.

Reproduces the public 64-byte HMAC-SHA1 key and no$gba development marker used by modern ndstool builds. This is a compatibility identity, not a claim that Nintendo hardware will trust the resulting image.

Definition at line 22 of file NdsDsiIntegrityOptions.cs.

◆ SignatureMode

NdsDsiSignatureMode NdsForge.NdsDsiIntegrityOptions.SignatureMode
get

Controls only the signature field and never upgrades a development marker into an authenticity claim.

Definition at line 94 of file NdsDsiIntegrityOptions.cs.

◆ Unauthenticated

NdsDsiIntegrityOptions NdsForge.NdsDsiIntegrityOptions.Unauthenticated = new(null, NdsDsiSignatureMode.Cleared, null)
staticget

Uses zeroed HMAC and signature fields for a clearly unauthenticated DSi image.

Definition at line 16 of file NdsDsiIntegrityOptions.cs.


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