Fabcoin Core  0.16.2
P2P Digital Currency
Classes
siphash.h File Reference

Classes for SipHash message authentication code. More...

#include "cryptlib.h"
#include "secblock.h"
#include "misc.h"
Include dependency graph for siphash.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  SipHash_Info< T_128bit >
 SipHash message authentication code information. More...
 
class  SipHash_Base< C, D, T_128bit >
 SipHash message authentication code base class. More...
 
class  SipHash< C, D, T_128bit >
 SipHash message authentication code. More...
 

Detailed Description

Classes for SipHash message authentication code.

SipHash computes a 64-bit or 128-bit message authentication code from a variable-length message and 128-bit secret key. It was designed to be efficient even for short inputs, with performance comparable to non-cryptographic hash functions.

To create a SipHash-2-4 object with a 64-bit MAC use code similar to the following.

  SecByteBlock key(16);
  prng.GenerateBlock(key, key.size());
  SipHash<2,4,false> hash(key, key.size());
  hash.Update(...);
  hash.Final(...);

To create a SipHash-2-4 object with a 128-bit MAC use code similar to the following.

  SecByteBlock key(16);
  prng.GenerateBlock(key, key.size());
  SipHash<2,4,true> hash(key, key.size());
  hash.Update(...);
  hash.Final(...);
See also
Jean-Philippe Aumasson and Daniel J. Bernstein SipHash: a fast short-input PRF
Since
Crypto++ 5.7

Definition in file siphash.h.