public class XChaCha20Engine extends ChaCha7539Engine
XChaCha20 takes a 256 bit key and a 192 bit nonce. The first 128 bits of the nonce are used together with the key in HChaCha20 to derive a 256 bit subkey; that subkey, together with the remaining 64 bits of the nonce (prefixed by four zero bytes to form a 96 bit IETF nonce), then drives a standard ChaCha20-IETF stream as defined by RFC 7539.
DEFAULT_ROUNDS, engineState, rounds, sigma, tau, x| Constructor and Description |
|---|
XChaCha20Engine() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAlgorithmName()
Return the name of the algorithm the cipher implements.
|
protected int |
getNonceSize() |
protected void |
setKey(byte[] keyBytes,
byte[] ivBytes) |
advanceCounter, advanceCounter, generateKeyStream, getCounter, resetCounter, retreatCounter, retreatCountergetPosition, init, packTauOrSigma, processBytes, reset, returnByte, salsaCore, seekTo, skippublic java.lang.String getAlgorithmName()
StreamCiphergetAlgorithmName in interface StreamCiphergetAlgorithmName in class ChaCha7539Engineprotected int getNonceSize()
getNonceSize in class ChaCha7539Engineprotected void setKey(byte[] keyBytes,
byte[] ivBytes)
setKey in class ChaCha7539Engine