Update comments
parent
33e401116c
commit
d852c18fe8
|
|
@ -27,11 +27,10 @@
|
||||||
|
|
||||||
////////////////////////////// Common Poly1305 //////////////////////////////
|
////////////////////////////// Common Poly1305 //////////////////////////////
|
||||||
|
|
||||||
#define CONSTANT_TIME_CARRY(a,b) ((a ^ ((a ^ b) | ((a - b) ^ b))) >> (sizeof(a) * 8 - 1))
|
|
||||||
|
|
||||||
ANONYMOUS_NAMESPACE_BEGIN
|
ANONYMOUS_NAMESPACE_BEGIN
|
||||||
|
|
||||||
using namespace CryptoPP;
|
using namespace CryptoPP;
|
||||||
|
#define CONSTANT_TIME_CARRY(a,b) ((a ^ ((a ^ b) | ((a - b) ^ b))) >> (sizeof(a) * 8 - 1))
|
||||||
|
|
||||||
void Poly1305_HashBlocks(word32 h[5], word32 r[4], const byte *input, size_t length, word32 padbit)
|
void Poly1305_HashBlocks(word32 h[5], word32 r[4], const byte *input, size_t length, word32 padbit)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
10
poly1305.h
10
poly1305.h
|
|
@ -1,5 +1,13 @@
|
||||||
// poly1305.h - written and placed in the public domain by Jeffrey Walton and Jean-Pierre Munch
|
// poly1305.h - written and placed in the public domain by Jeffrey Walton and Jean-Pierre Munch
|
||||||
// Based on Andy Polyakov's Base-2^26 scalar multiplication implementation for OpenSSL.
|
// Based on Andy Polyakov's Base-2^26 scalar multiplication implementation.
|
||||||
|
// For more information, see https://www.openssl.org/~appro/cryptogams/.
|
||||||
|
|
||||||
|
// The library added Bernstein's Poly1305 classses at Crypto++ 5.6.4. The IETF
|
||||||
|
// uses a slightly different implementation than Bernstein, and the IETF
|
||||||
|
// classes were added at Crypto++ 8.1. We wanted to maintain ABI compatibility
|
||||||
|
// at the 8.1 release so the original Poly1305 classes were not disturbed.
|
||||||
|
// Instead new classes were added for IETF Poly1305. The back-end implementation
|
||||||
|
// shares code as expected, however.
|
||||||
|
|
||||||
/// \file poly1305.h
|
/// \file poly1305.h
|
||||||
/// \brief Classes for Poly1305 message authentication code
|
/// \brief Classes for Poly1305 message authentication code
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue