mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 03:37:49 +02:00
KeyDerivationFunction for NTCP2
This commit is contained in:
parent
86c1984982
commit
8c9eaccc11
4 changed files with 41 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue