Whitespace check-in
parent
ca302c952e
commit
365e65c2eb
|
|
@ -3,7 +3,7 @@
|
||||||
// Daniel J. Bernstein, Bernard van Gastel, Wesley Janssen,
|
// Daniel J. Bernstein, Bernard van Gastel, Wesley Janssen,
|
||||||
// Tanja Lange, Peter Schwabe and Sjaak Smetsers.
|
// Tanja Lange, Peter Schwabe and Sjaak Smetsers.
|
||||||
|
|
||||||
// The Tweet API was added to the Crypto++ library to cross-validate results.
|
// The Tweet API was added to the Crypto++ library to cross-validate results.
|
||||||
// We debated over putting it in the Test namespace, but settled for the NaCl
|
// We debated over putting it in the Test namespace, but settled for the NaCl
|
||||||
// namespace to segreate it from other parts of the library.
|
// namespace to segreate it from other parts of the library.
|
||||||
|
|
||||||
|
|
@ -384,7 +384,7 @@ int crypto_sign_keypair(byte *pk, byte *sk);
|
||||||
/// 32-byte secret key. The function does not backfill the tail bytes of the
|
/// 32-byte secret key. The function does not backfill the tail bytes of the
|
||||||
/// secret key with the calculated public key.
|
/// secret key with the calculated public key.
|
||||||
/// \details crypto_sign_sk2pk() is not part of libsodium or Tweet API. It was
|
/// \details crypto_sign_sk2pk() is not part of libsodium or Tweet API. It was
|
||||||
/// added for interop with the I2P Java library.
|
/// added for interop with some anonymous routing protocols.
|
||||||
/// \returns 0 on success, non-0 otherwise
|
/// \returns 0 on success, non-0 otherwise
|
||||||
/// \sa <A HREF="https://nacl.cr.yp.to/sign.html">NaCl crypto_sign documentation</A>
|
/// \sa <A HREF="https://nacl.cr.yp.to/sign.html">NaCl crypto_sign documentation</A>
|
||||||
/// \since Crypto++ 7.1
|
/// \since Crypto++ 7.1
|
||||||
|
|
|
||||||
2
sha.cpp
2
sha.cpp
|
|
@ -1189,7 +1189,7 @@ void SHA512_HashBlock_CXX(word64 *state, const word64 *data)
|
||||||
|
|
||||||
/* Copy context->state[] to working vars */
|
/* Copy context->state[] to working vars */
|
||||||
std::memcpy(T, state, sizeof(T));
|
std::memcpy(T, state, sizeof(T));
|
||||||
|
|
||||||
/* Solaris/Sparc64 crash */
|
/* Solaris/Sparc64 crash */
|
||||||
std::memcpy(D, data, sizeof(D));
|
std::memcpy(D, data, sizeof(D));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -455,11 +455,11 @@ bool TestCryptoSignKeys()
|
||||||
{
|
{
|
||||||
fail = (crypto_sign_keypair(pk, sk) != 0);
|
fail = (crypto_sign_keypair(pk, sk) != 0);
|
||||||
pass = !fail && pass;
|
pass = !fail && pass;
|
||||||
|
|
||||||
byte xk[crypto_sign_PUBLICKEYBYTES];
|
byte xk[crypto_sign_PUBLICKEYBYTES];
|
||||||
fail = (crypto_sign_sk2pk(xk, sk) != 0);
|
fail = (crypto_sign_sk2pk(xk, sk) != 0);
|
||||||
pass = !fail && pass;
|
pass = !fail && pass;
|
||||||
|
|
||||||
fail = std::memcmp(xk, pk, sizeof(xk)) != 0;
|
fail = std::memcmp(xk, pk, sizeof(xk)) != 0;
|
||||||
pass = !fail && pass;
|
pass = !fail && pass;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue