mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
KeyDerivationFunction for NTCP2
This commit is contained in:
@@ -411,6 +411,14 @@ namespace crypto
|
||||
}
|
||||
}
|
||||
|
||||
void Ed25519::Mul (const uint8_t * p, const uint8_t * e, uint8_t * buf, BN_CTX * ctx) const
|
||||
{
|
||||
auto P = DecodePublicKey (p, ctx);
|
||||
BIGNUM * e1 = DecodeBN<32> (e);
|
||||
EncodePublicKey (Mul (P, e1, ctx), buf, ctx);
|
||||
BN_free (e1);
|
||||
}
|
||||
|
||||
void Ed25519::ExpandPrivateKey (const uint8_t * key, uint8_t * expandedKey)
|
||||
{
|
||||
SHA512 (key, EDDSA25519_PRIVATE_KEY_LENGTH, expandedKey);
|
||||
|
||||
Reference in New Issue
Block a user