Use a secure counter for OCB's nonce. Protect nonce in Network::Packet.

This commit is contained in:
John Hood
2015-12-25 17:38:26 -05:00
parent de30452498
commit 13928e9c10
4 changed files with 27 additions and 18 deletions
+7
View File
@@ -58,6 +58,13 @@ namespace Crypto {
~CryptoException() throw () {}
};
/*
* OCB (and other algorithms) require a source of nonce/sequence
* numbers that never repeats its output. Enforce that with this
* function.
*/
uint64_t unique( void );
/* 16-byte-aligned buffer, with length. */
class AlignedBuffer {
private: