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

Represents one explicitly trusted RSA-1024 public key for DSi header authentication. Trust is supplied by the caller; constructing this value does not imply that a modulus belongs to Nintendo or any particular publisher. More...

Public Member Functions

 NdsDsiRsaPublicKey (ReadOnlySpan< byte > modulus, ReadOnlySpan< byte > exponent)
 Copies raw parameters so trust configuration remains stable after caller buffers are reused or cleared.
bool VerifyHeader (ReadOnlySpan< byte > signedHeader, ReadOnlySpan< byte > signature)
 Verifies the format-mandated RSA-SHA1 PKCS#1 v1.5 signature over a finalized header prefix.

Static Public Member Functions

static NdsDsiRsaPublicKey FromRsa (RSA rsa)
 Snapshots the public portion of an existing RSA object after enforcing the DSi key size.

Properties

ReadOnlyMemory< byte > Modulus [get]
 Exports the conventional big-endian modulus without exposing internal mutable storage.
ReadOnlyMemory< byte > Exponent [get]
 Exports the conventional big-endian public exponent without exposing internal mutable storage.

Detailed Description

Represents one explicitly trusted RSA-1024 public key for DSi header authentication. Trust is supplied by the caller; constructing this value does not imply that a modulus belongs to Nintendo or any particular publisher.

Definition at line 9 of file NdsDsiRsaPublicKey.cs.

Constructor & Destructor Documentation

◆ NdsDsiRsaPublicKey()

NdsForge.NdsDsiRsaPublicKey.NdsDsiRsaPublicKey ( ReadOnlySpan< byte > modulus,
ReadOnlySpan< byte > exponent )
inline

Copies raw parameters so trust configuration remains stable after caller buffers are reused or cleared.

Parameters
modulusExactly 128 bytes forming a 1024-bit modulus.
exponentNon-empty positive public exponent, commonly 01 00 01.

Definition at line 19 of file NdsDsiRsaPublicKey.cs.

Member Function Documentation

◆ FromRsa()

NdsDsiRsaPublicKey NdsForge.NdsDsiRsaPublicKey.FromRsa ( RSA rsa)
inlinestatic

Snapshots the public portion of an existing RSA object after enforcing the DSi key size.

Parameters
rsaRSA instance whose ownership and lifetime remain with the caller.
Returns
An independent immutable public-key value.

Definition at line 33 of file NdsDsiRsaPublicKey.cs.

◆ VerifyHeader()

bool NdsForge.NdsDsiRsaPublicKey.VerifyHeader ( ReadOnlySpan< byte > signedHeader,
ReadOnlySpan< byte > signature )
inline

Verifies the format-mandated RSA-SHA1 PKCS#1 v1.5 signature over a finalized header prefix.

Parameters
signedHeaderExactly 0xE00 bytes from header offset zero.
signatureExactly 128 on-disk signature bytes.
Returns
true only when the signature matches this caller-trusted key.

Definition at line 55 of file NdsDsiRsaPublicKey.cs.

Property Documentation

◆ Exponent

ReadOnlyMemory<byte> NdsForge.NdsDsiRsaPublicKey.Exponent
get

Exports the conventional big-endian public exponent without exposing internal mutable storage.

Definition at line 49 of file NdsDsiRsaPublicKey.cs.

◆ Modulus

ReadOnlyMemory<byte> NdsForge.NdsDsiRsaPublicKey.Modulus
get

Exports the conventional big-endian modulus without exposing internal mutable storage.

Definition at line 46 of file NdsDsiRsaPublicKey.cs.


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