mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-10-23 00:01:43 +00:00
common InitNoiseIKState for all ML-KEM crypto
This commit is contained in:
1 parent
828cd9d07b
commit
1a04b59585
5 files changed
+35
-24
No files matched your search
@@ -944,21 +944,6 @@ namespace crypto
|
||||
}; // SHA256 (protocolNameHash)
|
||||
state.Init (protocolNameHash, hh, pub);
|
||||
}
|
||||
|
||||
void InitNoiseIKStateMLKEM512 (NoiseSymmetricState& state, const uint8_t * pub)
|
||||
{
|
||||
static constexpr uint8_t protocolNameHash[32] =
|
||||
{
|
||||
0xb0, 0x8f, 0xb1, 0x73, 0x92, 0x66, 0xc9, 0x90, 0x45, 0x7f, 0xdd, 0xc6, 0x4e, 0x55, 0x40, 0xd8,
|
||||
0x0a, 0x37, 0x99, 0x06, 0x92, 0x2a, 0x78, 0xc4, 0xb1, 0xef, 0x86, 0x06, 0xd0, 0x15, 0x9f, 0x4d
|
||||
}; // SHA256("Noise_IKhfselg2_25519+MLKEM512_ChaChaPoly_SHA256")
|
||||
static constexpr uint8_t hh[32] =
|
||||
{
|
||||
0x95, 0x8d, 0xf6, 0x6c, 0x95, 0xce, 0xa9, 0xf7, 0x42, 0xfc, 0xfa, 0x62, 0x71, 0x36, 0x1e, 0xa7,
|
||||
0xdc, 0x7a, 0xc0, 0x75, 0x01, 0xcf, 0xf9, 0xfc, 0x9f, 0xdb, 0x4c, 0x68, 0x3a, 0x53, 0x49, 0xeb
|
||||
}; // SHA256 (protocolNameHash)
|
||||
state.Init (protocolNameHash, hh, pub);
|
||||
}
|
||||
|
||||
// init and terminate
|
||||
|
||||
|
||||
Reference in new issue
Block a user