protected static class ChaCha20Cipher.ChaChaEngine
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static int |
BLOCK_BYTES |
private static int |
BLOCK_INTS |
private static int |
COUNTER_OFFSET |
private static int[] |
ENGINE_STATE_HEADER |
protected int[] |
engineState |
protected long |
initialNonce |
private static int |
KEY_BYTES |
private static int |
KEY_INTS |
private static int |
KEY_OFFSET |
protected byte[] |
nonce |
private static int |
NONCE_BYTES |
private static int |
NONCE_INTS |
private static int |
NONCE_OFFSET |
protected int[] |
x |
| Modifier | Constructor and Description |
|---|---|
protected |
ChaChaEngine() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
advanceNonce() |
protected static void |
columnRound(int[] state) |
protected void |
crypt(byte[] in,
int offset,
int length,
byte[] out,
int outOffset) |
protected static void |
diagonalRound(int[] state) |
protected void |
initCounter(long counter) |
protected void |
initKey(byte[] key) |
protected void |
initNonce(byte[] nonce) |
private static void |
packIntLE(int value,
byte[] dst,
int off,
int len) |
protected static void |
permute(int[] state) |
protected byte[] |
polyKey() |
protected static void |
quarterRound(int[] state,
int a,
int b,
int c,
int d) |
private static int |
unpackIntLE(byte[] buf,
int off) |
private static int |
unpackIntLE(byte[] buf,
int off,
int len) |
private static void |
unpackIntsLE(byte[] buf,
int off,
int nrInts,
int[] dst,
int dstOff) |
private static int[] |
unpackSigmaString(byte[] buf) |
private static final int BLOCK_BYTES
private static final int BLOCK_INTS
private static final int KEY_OFFSET
private static final int KEY_BYTES
private static final int KEY_INTS
private static final int COUNTER_OFFSET
private static final int NONCE_OFFSET
private static final int NONCE_BYTES
private static final int NONCE_INTS
private static final int[] ENGINE_STATE_HEADER
protected final int[] x
protected final int[] engineState
protected final byte[] nonce
protected long initialNonce
protected void initKey(byte[] key)
protected void initNonce(byte[] nonce)
protected void advanceNonce()
protected void initCounter(long counter)
protected void crypt(byte[] in,
int offset,
int length,
byte[] out,
int outOffset)
protected byte[] polyKey()
protected static void permute(int[] state)
protected static void columnRound(int[] state)
protected static void diagonalRound(int[] state)
protected static void quarterRound(int[] state,
int a,
int b,
int c,
int d)
private static int unpackIntLE(byte[] buf,
int off)
private static int unpackIntLE(byte[] buf,
int off,
int len)
private static void unpackIntsLE(byte[] buf,
int off,
int nrInts,
int[] dst,
int dstOff)
private static int[] unpackSigmaString(byte[] buf)
private static void packIntLE(int value,
byte[] dst,
int off,
int len)