parent
2c3ca1c01e
commit
7226abd433
19
validat7.cpp
19
validat7.cpp
|
|
@ -365,6 +365,15 @@ bool TestX25519()
|
||||||
const unsigned int AGREE_COUNT = 64;
|
const unsigned int AGREE_COUNT = 64;
|
||||||
bool pass = true;
|
bool pass = true;
|
||||||
|
|
||||||
|
try {
|
||||||
|
x25519 x1(FileSource(DataDir("TestData/x25519.dat").c_str(), true).Ref());
|
||||||
|
x25519 x2(FileSource(DataDir("TestData/x25519v0.dat").c_str(), true).Ref());
|
||||||
|
x25519 x3(FileSource(DataDir("TestData/x25519v1.dat").c_str(), true).Ref());
|
||||||
|
}
|
||||||
|
catch (BERDecodeErr&) {
|
||||||
|
pass = false;
|
||||||
|
}
|
||||||
|
|
||||||
SecByteBlock priv1(32), priv2(32), pub1(32), pub2(32), share1(32), share2(32);
|
SecByteBlock priv1(32), priv2(32), pub1(32), pub2(32), share1(32), share2(32);
|
||||||
for (unsigned int i=0; i<AGREE_COUNT; ++i)
|
for (unsigned int i=0; i<AGREE_COUNT; ++i)
|
||||||
{
|
{
|
||||||
|
|
@ -414,8 +423,16 @@ bool TestEd25519()
|
||||||
std::cout << "\nTesting ed25519 Signatures...\n\n";
|
std::cout << "\nTesting ed25519 Signatures...\n\n";
|
||||||
bool pass = true;
|
bool pass = true;
|
||||||
|
|
||||||
|
try {
|
||||||
|
ed25519::Signer s1(FileSource(DataDir("TestData/ed25519.dat").c_str(), true).Ref());
|
||||||
|
ed25519::Signer s2(FileSource(DataDir("TestData/ed25519v0.dat").c_str(), true).Ref());
|
||||||
|
ed25519::Signer s3(FileSource(DataDir("TestData/ed25519v1.dat").c_str(), true).Ref());
|
||||||
|
}
|
||||||
|
catch (BERDecodeErr&) {
|
||||||
|
pass = false;
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(NO_OS_DEPENDENCE)
|
#if defined(NO_OS_DEPENDENCE)
|
||||||
std::cout << "\nNo operating system provided random number generator, skipping test." << std::endl;
|
|
||||||
return pass;
|
return pass;
|
||||||
#else
|
#else
|
||||||
const unsigned int SIGN_COUNT = 64, MSG_SIZE=128;
|
const unsigned int SIGN_COUNT = 64, MSG_SIZE=128;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue