Class ChaCha20Cipher.ChaChaEngine

  • Enclosing class:
    ChaCha20Cipher

    protected static class ChaCha20Cipher.ChaChaEngine
    extends java.lang.Object
    • Constructor Detail

      • ChaChaEngine

        protected ChaChaEngine()
    • 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)
      • unpackIntLE

        private static int unpackIntLE​(byte[] buf,
                                       int off)
      • unpackIntLE

        private static int unpackIntLE​(byte[] buf,
                                       int off,
                                       int len)
      • unpackIntsLE

        private static void unpackIntsLE​(byte[] buf,
                                         int off,
                                         int nrInts,
                                         int[] dst,
                                         int dstOff)
      • unpackSigmaString

        private static int[] unpackSigmaString​(byte[] buf)
      • packIntLE

        private static void packIntLE​(int value,
                                      byte[] dst,
                                      int off,
                                      int len)