Package org.apache.sshd.common.cipher
Class ChaCha20Cipher.ChaChaEngine
- java.lang.Object
-
- org.apache.sshd.common.cipher.ChaCha20Cipher.ChaChaEngine
-
- Enclosing class:
- ChaCha20Cipher
protected static class ChaCha20Cipher.ChaChaEngine extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected int[]engineStateprotected longinitialNonceprotected byte[]nonceprotected int[]x
-
Constructor Summary
Constructors Modifier Constructor Description protectedChaChaEngine()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidadvanceNonce()protected static voidcolumnRound(int[] state)protected voidcrypt(byte[] in, int offset, int length, byte[] out, int outOffset)protected static voiddiagonalRound(int[] state)protected voidinitCounter(long counter)protected voidinitKey(byte[] key)protected voidinitNonce(byte[] nonce)protected static voidpermute(int[] state)protected byte[]polyKey()protected static voidquarterRound(int[] state, int a, int b, int c, int d)
-
-
-
Method Detail
-
initKey
protected void initKey(byte[] key)
-
initNonce
protected void initNonce(byte[] nonce)
-
advanceNonce
protected void advanceNonce()
-
initCounter
protected void initCounter(long counter)
-
crypt
protected void crypt(byte[] in, int offset, int length, byte[] out, int outOffset)
-
polyKey
protected byte[] polyKey()
-
permute
protected static void permute(int[] state)
-
columnRound
protected static void columnRound(int[] state)
-
diagonalRound
protected static void diagonalRound(int[] state)
-
quarterRound
protected static void quarterRound(int[] state, int a, int b, int c, int d)
-
-