C# Class Org.BouncyCastle.Crypto.Macs.SipHash

Implementation of SipHash as specified in "SipHash: a fast short-input PRF", by Jean-Philippe Aumasson and Daniel J. Bernstein (https://131002.net/siphash/siphash.pdf).
"SipHash is a family of PRFs SipHash-c-d where the integer parameters c and d are the number of compression rounds and the number of finalization rounds. A compression round is identical to a finalization round and this round function is called SipRound. Given a 128-bit key k and a (possibly empty) byte string m, SipHash-c-d returns a 64-bit value..."
Inheritance: IMac
ファイルを表示 Open project: nonorganic/dssnet Class Usage Examples

Protected Properties

Property Type Description
buf byte[]
bufPos int
c int
k0 long
v0 long
wordCount int

Public Methods

Method Description
BlockUpdate ( byte input, int offset, int length ) : void
DoFinal ( byte output, int outOff ) : int
DoFinal ( ) : long
GetMacSize ( ) : int
Init ( ICipherParameters parameters ) : void
Reset ( ) : void
SipHash ( ) : System

SipHash-2-4

SipHash ( int c, int d ) : System

SipHash-c-d

Update ( byte input ) : void

Protected Methods

Method Description
ApplySipRounds ( int n ) : void
ProcessMessageWord ( ) : void
RotateLeft ( long x, int n ) : long

Method Details

ApplySipRounds() protected method

protected ApplySipRounds ( int n ) : void
n int
return void

BlockUpdate() public method

public BlockUpdate ( byte input, int offset, int length ) : void
input byte
offset int
length int
return void

DoFinal() public method

public DoFinal ( byte output, int outOff ) : int
output byte
outOff int
return int

DoFinal() public method

public DoFinal ( ) : long
return long

GetMacSize() public method

public GetMacSize ( ) : int
return int

Init() public method

public Init ( ICipherParameters parameters ) : void
parameters ICipherParameters
return void

ProcessMessageWord() protected method

protected ProcessMessageWord ( ) : void
return void

Reset() public method

public Reset ( ) : void
return void

RotateLeft() protected static method

protected static RotateLeft ( long x, int n ) : long
x long
n int
return long

SipHash() public method

SipHash-2-4
public SipHash ( ) : System
return System

SipHash() public method

SipHash-c-d
public SipHash ( int c, int d ) : System
c int the number of compression rounds
d int the number of finalization rounds
return System

Update() public method

public Update ( byte input ) : void
input byte
return void

Property Details

buf protected_oe property

protected byte[] buf
return byte[]

bufPos protected_oe property

protected int bufPos
return int

c protected_oe property

protected int c
return int

k0 protected_oe property

protected long k0
return long

v0 protected_oe property

protected long v0
return long

wordCount protected_oe property

protected int wordCount
return int