mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2024-11-16 00:12:43 +00:00
tc26 paramSetA 512 for GOST 34.1002012
This commit is contained in:
parent
af2a3f3a65
commit
da2c49ab66
8
Gost.cpp
8
Gost.cpp
@ -131,6 +131,14 @@ namespace crypto
|
|||||||
"91E38443A5E82C0D880923425712B2BB658B9196932E02C78B2582FE742DAA28",
|
"91E38443A5E82C0D880923425712B2BB658B9196932E02C78B2582FE742DAA28",
|
||||||
"32879423AB1A0375895786C4BB46E9565FDE0B5344766740AF268ADB32322E5C"
|
"32879423AB1A0375895786C4BB46E9565FDE0B5344766740AF268ADB32322E5C"
|
||||||
}, // tc26-2012-paramSetA-256
|
}, // tc26-2012-paramSetA-256
|
||||||
|
{
|
||||||
|
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDC4",
|
||||||
|
"E8C2505DEDFC86DDC1BD0B2B6667F1DA34B82574761CB0E879BD081CFD0B6265EE3CB090F30D27614CB4574010DA90DD862EF9D4EBEE4761503190785A71C760",
|
||||||
|
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDC7",
|
||||||
|
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF27E69532F48D89116FF22B8D4E0560609B4B38ABFAD2B85DCACDB1411F10B275",
|
||||||
|
"3",
|
||||||
|
"7503CFE87A836AE3A61B8816E25450E6CE5E1C93ACF1ABC1778064FDCBEFA921DF1626BE4FD036E93D75E6A50E3A41E98028FE5FC235F5B889A589CB5215F2A"
|
||||||
|
}, // tc26-2012-paramSetA-512
|
||||||
{
|
{
|
||||||
"DC9203E514A721875485A529D2C722FB187BC8980EB866644DE41C68E143064546E861C0E2C9EDD92ADE71F46FCF50FF2AD97F951FDA9F2A2EB6546F39689BD3",
|
"DC9203E514A721875485A529D2C722FB187BC8980EB866644DE41C68E143064546E861C0E2C9EDD92ADE71F46FCF50FF2AD97F951FDA9F2A2EB6546F39689BD3",
|
||||||
"B4C4EE28CEBC6C2C8AC12952CF37F16AC7EFB6A9F69F4B57FFDA2E4F0DE5ADE038CBC2FFF719D2C18DE0284B8BFEF3B52B8CC7A5F5BF0A3C8D2319A5312557E1",
|
"B4C4EE28CEBC6C2C8AC12952CF37F16AC7EFB6A9F69F4B57FFDA2E4F0DE5ADE038CBC2FFF719D2C18DE0284B8BFEF3B52B8CC7A5F5BF0A3C8D2319A5312557E1",
|
||||||
|
1
Gost.h
1
Gost.h
@ -22,6 +22,7 @@ namespace crypto
|
|||||||
//eGOSTR3410CryptoProXchB, // 1.2.643.2.2.36.1
|
//eGOSTR3410CryptoProXchB, // 1.2.643.2.2.36.1
|
||||||
// GOST R 34.10-2012
|
// GOST R 34.10-2012
|
||||||
eGOSTR3410TC26A256, // 1.2.643.7.1.2.1.1.1
|
eGOSTR3410TC26A256, // 1.2.643.7.1.2.1.1.1
|
||||||
|
eGOSTR3410TC26A512, // 1.2.643.7.1.2.1.2.1
|
||||||
eGOSTR3410TC26C512, // 1.2.643.7.1.2.1.2.3
|
eGOSTR3410TC26C512, // 1.2.643.7.1.2.1.2.3
|
||||||
eGOSTR3410NumParamSets
|
eGOSTR3410NumParamSets
|
||||||
};
|
};
|
||||||
|
@ -535,7 +535,7 @@ namespace crypto
|
|||||||
{
|
{
|
||||||
uint8_t digest[Hash::hashLen];
|
uint8_t digest[Hash::hashLen];
|
||||||
Hash::CalculateHash (buf, len, digest);
|
Hash::CalculateHash (buf, len, digest);
|
||||||
BIGNUM * d = BN_bin2bn (digest, 32, nullptr);
|
BIGNUM * d = BN_bin2bn (digest, Hash::hashLen, nullptr);
|
||||||
BIGNUM * r = BN_new (), * s = BN_new ();
|
BIGNUM * r = BN_new (), * s = BN_new ();
|
||||||
GetGOSTR3410Curve (m_ParamSet)->Sign (m_PrivateKey, d, r, s);
|
GetGOSTR3410Curve (m_ParamSet)->Sign (m_PrivateKey, d, r, s);
|
||||||
bn2buf (r, signature, keyLen);
|
bn2buf (r, signature, keyLen);
|
||||||
|
Loading…
Reference in New Issue
Block a user