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

Poly1305 message authentication code, designed by D. J. Bernstein.
Poly1305 computes a 128-bit (16 bytes) authenticator, using a 128 bit nonce and a 256 bit key consisting of a 128 bit key applied to an underlying cipher, and a 128 bit key (with 106 effective key bits) used in the authenticator. The polynomial calculation in this implementation is adapted from the public domain poly1305-donna-unrolled C implementation by Andrew M (@floodyberry).
Inheritance: IMac
Afficher le fichier Open project: gkardava/WinPass Class Usage Examples

Méthodes publiques

Méthode Description
BlockUpdate ( byte input, int inOff, int len ) : void
DoFinal ( byte output, int outOff ) : int
GetMacSize ( ) : int
Init ( ICipherParameters parameters ) : void

Initialises the Poly1305 MAC.

Poly1305 ( ) : System
Poly1305 ( IBlockCipher cipher ) : System
Reset ( ) : void
Update ( byte input ) : void

Private Methods

Méthode Description
ProcessBlock ( ) : void
SetKey ( byte key, byte nonce ) : void
mul32x32_64 ( uint i1, uint i2 ) : ulong

Method Details

BlockUpdate() public méthode

public BlockUpdate ( byte input, int inOff, int len ) : void
input byte
inOff int
len int
Résultat void

DoFinal() public méthode

public DoFinal ( byte output, int outOff ) : int
output byte
outOff int
Résultat int

GetMacSize() public méthode

public GetMacSize ( ) : int
Résultat int

Init() public méthode

Initialises the Poly1305 MAC.
public Init ( ICipherParameters parameters ) : void
parameters ICipherParameters a {@link ParametersWithIV} containing a 128 bit nonce and a {@link KeyParameter} with /// a 256 bit key complying to the {@link Poly1305KeyGenerator Poly1305 key format}.
Résultat void

Poly1305() public méthode

public Poly1305 ( ) : System
Résultat System

Poly1305() public méthode

public Poly1305 ( IBlockCipher cipher ) : System
cipher IBlockCipher
Résultat System

Reset() public méthode

public Reset ( ) : void
Résultat void

Update() public méthode

public Update ( byte input ) : void
input byte
Résultat void