public class ChaChaEngine extends Salsa20Engine
DEFAULT_ROUNDS, engineState, rounds, sigma, tau, x| Constructor and Description |
|---|
ChaChaEngine()
Creates a 20 rounds ChaCha engine.
|
ChaChaEngine(int rounds)
Creates a ChaCha engine with a specific number of rounds.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
advanceCounter() |
protected void |
advanceCounter(long diff) |
static void |
chachaCore(int rounds,
int[] input,
int[] x)
ChaCha function
|
protected void |
generateKeyStream(byte[] output) |
java.lang.String |
getAlgorithmName()
Return the name of the algorithm the cipher implements.
|
protected long |
getCounter() |
protected void |
resetCounter() |
protected void |
retreatCounter() |
protected void |
retreatCounter(long diff) |
protected void |
setKey(byte[] keyBytes,
byte[] ivBytes) |
getNonceSize, getPosition, init, packTauOrSigma, processBytes, reset, returnByte, rotl, salsaCore, seekTo, skippublic ChaChaEngine()
public ChaChaEngine(int rounds)
rounds - the number of rounds (must be an even number).public java.lang.String getAlgorithmName()
StreamCiphergetAlgorithmName in interface StreamCiphergetAlgorithmName in class Salsa20Engineprotected void advanceCounter(long diff)
advanceCounter in class Salsa20Engineprotected void advanceCounter()
advanceCounter in class Salsa20Engineprotected void retreatCounter(long diff)
retreatCounter in class Salsa20Engineprotected void retreatCounter()
retreatCounter in class Salsa20Engineprotected long getCounter()
getCounter in class Salsa20Engineprotected void resetCounter()
resetCounter in class Salsa20Engineprotected void setKey(byte[] keyBytes,
byte[] ivBytes)
setKey in class Salsa20Engineprotected void generateKeyStream(byte[] output)
generateKeyStream in class Salsa20Enginepublic static void chachaCore(int rounds,
int[] input,
int[] x)
input - input data