Class XChaCha20Engine

  • All Implemented Interfaces:
    org.bouncycastle.crypto.SkippingCipher, org.bouncycastle.crypto.SkippingStreamCipher, org.bouncycastle.crypto.StreamCipher

    public class XChaCha20Engine
    extends org.bouncycastle.crypto.engines.ChaChaEngine
    Taken from dangling PR https://github.com/bcgit/bc-java/pull/957
    • Field Summary

      • Fields inherited from class org.bouncycastle.crypto.engines.Salsa20Engine

        DEFAULT_ROUNDS, engineState, rounds, sigma, tau, x
    • Constructor Summary

      Constructors 
      Constructor Description
      XChaCha20Engine()
      Create a new XChaCha20 engine.
    • Constructor Detail

      • XChaCha20Engine

        public XChaCha20Engine()
        Create a new XChaCha20 engine.
    • Method Detail

      • getAlgorithmName

        public String getAlgorithmName()
        Specified by:
        getAlgorithmName in interface org.bouncycastle.crypto.StreamCipher
        Overrides:
        getAlgorithmName in class org.bouncycastle.crypto.engines.ChaChaEngine
      • getNonceSize

        protected int getNonceSize()
        Overrides:
        getNonceSize in class org.bouncycastle.crypto.engines.Salsa20Engine
      • setKey

        protected void setKey​(byte[] keyBytes,
                              byte[] ivBytes)
        Overrides:
        setKey in class org.bouncycastle.crypto.engines.ChaChaEngine
      • hChaChaDeriveSubKey

        public int[] hChaChaDeriveSubKey​(byte[] keyBytes,
                                         byte[] ivBytes)