Class AbstractChaCha20Cipher

java.lang.Object
org.apache.sshd.common.cipher.AbstractChaCha20Cipher
All Implemented Interfaces:
AlgorithmNameProvider, Cipher, CipherInformation, KeySizeIndicator
Direct Known Subclasses:
ChaCha20Cipher

public abstract class AbstractChaCha20Cipher extends Object implements Cipher
Abstract super class for ChaCha20-Poly1305 implementations.
  • Field Details

  • Constructor Details

    • AbstractChaCha20Cipher

      protected AbstractChaCha20Cipher()
  • Method Details

    • getAlgorithm

      public String getAlgorithm()
      Specified by:
      getAlgorithm in interface AlgorithmNameProvider
    • getTransformation

      public String getTransformation()
      Specified by:
      getTransformation in interface CipherInformation
      Returns:
      The actual transformation used - e.g., AES/CBC/NoPadding
    • getIVSize

      public int getIVSize()
      Specified by:
      getIVSize in interface CipherInformation
      Returns:
      Size of the initialization vector (in bytes)
    • getAuthenticationTagSize

      public int getAuthenticationTagSize()
      Specified by:
      getAuthenticationTagSize in interface CipherInformation
      Returns:
      Size of the authentication tag (AT) in bytes or 0 if this cipher does not support authentication
    • getCipherBlockSize

      public int getCipherBlockSize()
      Specified by:
      getCipherBlockSize in interface CipherInformation
      Returns:
      Size of block data used by the cipher (in bytes). For stream ciphers this value is (currently) used to indicate some average work buffer size to be used for the automatic re-keying mechanism described in RFC 4253 - Section 9
    • getKdfSize

      public int getKdfSize()
      Specified by:
      getKdfSize in interface CipherInformation
      Returns:
      The block size (in bytes) used to derive the secret key for this cipher
    • getKeySize

      public int getKeySize()
      Specified by:
      getKeySize in interface KeySizeIndicator
      Returns:
      The number of bits used in the key
    • toString

      public String toString()
      Overrides:
      toString in class Object