Implements the DSi 128-bit KeyX/KeyY scrambler in cartridge-register byte order. It contains only the public arithmetic and modcrypt slot prefix; callers remain responsible for the provenance of arbitrary key components.
More...
|
| static byte[] | DeriveNormalKey (ReadOnlySpan< byte > keyX, ReadOnlySpan< byte > keyY) |
| | Derives the normal AES key produced by DSi hardware from one KeyX/KeyY pair. Input and output arrays use the little-endian register order found in cartridge headers and hardware-facing documentation.
|
| static byte[] | CreateModcryptKeyX (string gameCode) |
| | Constructs the modcrypt slot's public KeyX from its fixed eight-byte platform prefix followed by the game code in forward and reverse order. No case folding is performed because product codes are binary identity.
|
| static byte[] | DeriveModcryptNormalKey (NdsHeader header) |
| | Derives the secure modcrypt normal key from the common game code and the first sixteen ARM9i HMAC bytes. The HMAC is consumed as stored; this operation does not establish that it was authenticated by a trusted key.
|
Implements the DSi 128-bit KeyX/KeyY scrambler in cartridge-register byte order. It contains only the public arithmetic and modcrypt slot prefix; callers remain responsible for the provenance of arbitrary key components.
Definition at line 9 of file NdsDsiKeyScrambler.cs.
◆ CreateModcryptKeyX()
| byte[] NdsForge.NdsDsiKeyScrambler.CreateModcryptKeyX |
( |
string | gameCode | ) |
|
|
inlinestatic |
Constructs the modcrypt slot's public KeyX from its fixed eight-byte platform prefix followed by the game code in forward and reverse order. No case folding is performed because product codes are binary identity.
- Parameters
-
| gameCode | Exactly four printable ASCII characters from common header offset 0x0C. |
- Returns
- A new sixteen-byte KeyX in DSi register order.
Definition at line 44 of file NdsDsiKeyScrambler.cs.
◆ DeriveModcryptNormalKey()
| byte[] NdsForge.NdsDsiKeyScrambler.DeriveModcryptNormalKey |
( |
NdsHeader | header | ) |
|
|
inlinestatic |
Derives the secure modcrypt normal key from the common game code and the first sixteen ARM9i HMAC bytes. The HMAC is consumed as stored; this operation does not establish that it was authenticated by a trusted key.
- Parameters
-
| header | Parsed DSi-family header supplying both public KeyX identity and KeyY bytes. |
- Returns
- A new sixteen-byte normal key suitable for NdsModcryptContext.
Definition at line 69 of file NdsDsiKeyScrambler.cs.
◆ DeriveNormalKey()
| byte[] NdsForge.NdsDsiKeyScrambler.DeriveNormalKey |
( |
ReadOnlySpan< byte > | keyX, |
|
|
ReadOnlySpan< byte > | keyY ) |
|
inlinestatic |
Derives the normal AES key produced by DSi hardware from one KeyX/KeyY pair. Input and output arrays use the little-endian register order found in cartridge headers and hardware-facing documentation.
- Parameters
-
| keyX | Exactly sixteen bytes of slot-specific KeyX material. |
| keyY | Exactly sixteen bytes of title- or content-specific KeyY material. |
- Returns
- A new sixteen-byte normal key; neither component is retained or modified.
Definition at line 22 of file NdsDsiKeyScrambler.cs.
The documentation for this class was generated from the following file: