Object/Trait

tsec.cipher.symmetric.bouncy

ChaCha20Poly1305

Related Docs: trait ChaCha20Poly1305 | package bouncy

Permalink

object ChaCha20Poly1305 extends AEADAPI[ChaCha20Poly1305, BouncySecretKey] with ChaCha20Cipher[ChaCha20Poly1305, ChaChaEngine]

Linear Supertypes
ChaCha20Cipher[ChaCha20Poly1305, ChaChaEngine], AEADAPI[ChaCha20Poly1305, BouncySecretKey], AuthCipherAPI[ChaCha20Poly1305, BouncySecretKey], CipherAPI[ChaCha20Poly1305, BouncySecretKey], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ChaCha20Poly1305
  2. ChaCha20Cipher
  3. AEADAPI
  4. AuthCipherAPI
  5. CipherAPI
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val KeySize: Int

    Permalink
    Definition Classes
    ChaCha20Cipher
  5. val TagSize: Int

    Permalink
    Definition Classes
    ChaCha20Cipher
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. implicit def authEncryptor[F[_]](implicit F: Sync[F]): AADEncryptor[F, ChaCha20Poly1305, BouncySecretKey]

    Permalink
    Definition Classes
    ChaCha20Cipher
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def decrypt[F[_]](cipherText: CipherText[ChaCha20Poly1305], key: BouncySecretKey[ChaCha20Poly1305])(implicit E: Encryptor[F, ChaCha20Poly1305, BouncySecretKey]): F[PlainText]

    Permalink
    Definition Classes
    CipherAPI
  10. final def decryptDetached[F[_]](cipherText: CipherText[ChaCha20Poly1305], key: BouncySecretKey[ChaCha20Poly1305], authTag: AuthTag[ChaCha20Poly1305])(implicit E: AuthEncryptor[F, ChaCha20Poly1305, BouncySecretKey]): F[PlainText]

    Permalink
    Definition Classes
    AuthCipherAPI
  11. final def decryptWithAAD[F[_]](cipherText: CipherText[ChaCha20Poly1305], key: BouncySecretKey[ChaCha20Poly1305], aad: AAD)(implicit E: AADEncryptor[F, ChaCha20Poly1305, BouncySecretKey]): F[PlainText]

    Permalink
    Definition Classes
    AEADAPI
  12. final def decryptWithAADDetached[F[_]](cipherText: CipherText[ChaCha20Poly1305], key: BouncySecretKey[ChaCha20Poly1305], aad: AAD, authTag: AuthTag[ChaCha20Poly1305])(implicit E: AADEncryptor[F, ChaCha20Poly1305, BouncySecretKey]): F[PlainText]

    Permalink
    Definition Classes
    AEADAPI
  13. def defaultIvGen[F[_]](implicit F: Sync[F]): IvGen[F, ChaCha20Poly1305]

    Permalink
    Definition Classes
    ChaCha20Cipher
  14. implicit def defaultKeyGen[F[_]](implicit F: Sync[F]): SymmetricKeyGen[F, ChaCha20Poly1305, BouncySecretKey]

    Permalink
    Definition Classes
    ChaCha20Cipher
  15. final def encrypt[F[_]](plainText: PlainText, key: BouncySecretKey[ChaCha20Poly1305], iv: Iv[ChaCha20Poly1305])(implicit E: Encryptor[F, ChaCha20Poly1305, BouncySecretKey]): F[CipherText[ChaCha20Poly1305]]

    Permalink
    Definition Classes
    CipherAPI
  16. final def encrypt[F[_]](plainText: PlainText, key: BouncySecretKey[ChaCha20Poly1305], ivs: IvGen[F, ChaCha20Poly1305])(E: Encryptor[F, ChaCha20Poly1305, BouncySecretKey])(implicit arg0: Monad[F]): F[CipherText[ChaCha20Poly1305]]

    Permalink
    Definition Classes
    CipherAPI
  17. final def encrypt[F[_]](plainText: PlainText, key: BouncySecretKey[ChaCha20Poly1305])(implicit arg0: Monad[F], E: Encryptor[F, ChaCha20Poly1305, BouncySecretKey], ivStrategy: IvGen[F, ChaCha20Poly1305]): F[CipherText[ChaCha20Poly1305]]

    Permalink
    Definition Classes
    CipherAPI
  18. final def encryptDetached[F[_]](plainText: PlainText, key: BouncySecretKey[ChaCha20Poly1305], iv: Iv[ChaCha20Poly1305])(implicit E: AuthEncryptor[F, ChaCha20Poly1305, BouncySecretKey]): F[(CipherText[ChaCha20Poly1305], AuthTag[ChaCha20Poly1305])]

    Permalink
    Definition Classes
    AuthCipherAPI
  19. final def encryptDetached[F[_]](plainText: PlainText, key: BouncySecretKey[ChaCha20Poly1305], ivs: IvGen[F, ChaCha20Poly1305])(implicit E: AuthEncryptor[F, ChaCha20Poly1305, BouncySecretKey], F: Monad[F]): F[(CipherText[ChaCha20Poly1305], AuthTag[ChaCha20Poly1305])]

    Permalink
    Definition Classes
    AuthCipherAPI
  20. final def encryptDetached[F[_]](plainText: PlainText, key: BouncySecretKey[ChaCha20Poly1305])(implicit arg0: Monad[F], E: AuthEncryptor[F, ChaCha20Poly1305, BouncySecretKey], ivStrategy: IvGen[F, ChaCha20Poly1305]): F[(CipherText[ChaCha20Poly1305], AuthTag[ChaCha20Poly1305])]

    Permalink
    Definition Classes
    AuthCipherAPI
  21. final def encryptWithAAD[F[_]](plainText: PlainText, key: BouncySecretKey[ChaCha20Poly1305], iv: Iv[ChaCha20Poly1305], aad: AAD)(implicit E: AADEncryptor[F, ChaCha20Poly1305, BouncySecretKey]): F[CipherText[ChaCha20Poly1305]]

    Permalink
    Definition Classes
    AEADAPI
  22. final def encryptWithAAD[F[_]](plainText: PlainText, key: BouncySecretKey[ChaCha20Poly1305], ivs: IvGen[F, ChaCha20Poly1305], aad: AAD)(implicit E: AADEncryptor[F, ChaCha20Poly1305, BouncySecretKey], F: Monad[F]): F[CipherText[ChaCha20Poly1305]]

    Permalink
    Definition Classes
    AEADAPI
  23. final def encryptWithAAD[F[_]](plainText: PlainText, key: BouncySecretKey[ChaCha20Poly1305], aad: AAD)(implicit arg0: Monad[F], E: AADEncryptor[F, ChaCha20Poly1305, BouncySecretKey], ivStrategy: IvGen[F, ChaCha20Poly1305]): F[CipherText[ChaCha20Poly1305]]

    Permalink
    Definition Classes
    AEADAPI
  24. final def encryptWithAADDetached[F[_]](plainText: PlainText, key: BouncySecretKey[ChaCha20Poly1305], iv: Iv[ChaCha20Poly1305], aad: AAD)(implicit E: AADEncryptor[F, ChaCha20Poly1305, BouncySecretKey]): F[(CipherText[ChaCha20Poly1305], AuthTag[ChaCha20Poly1305])]

    Permalink
    Definition Classes
    AEADAPI
  25. final def encryptWithAADDetached[F[_]](plainText: PlainText, key: BouncySecretKey[ChaCha20Poly1305], ivs: IvGen[F, ChaCha20Poly1305], aad: AAD)(implicit E: AADEncryptor[F, ChaCha20Poly1305, BouncySecretKey], F: Monad[F]): F[(CipherText[ChaCha20Poly1305], AuthTag[ChaCha20Poly1305])]

    Permalink
    Definition Classes
    AEADAPI
  26. final def encryptWithAADDetached[F[_]](plainText: PlainText, key: BouncySecretKey[ChaCha20Poly1305], aad: AAD)(implicit arg0: Monad[F], E: AADEncryptor[F, ChaCha20Poly1305, BouncySecretKey], ivStrategy: IvGen[F, ChaCha20Poly1305]): F[(CipherText[ChaCha20Poly1305], AuthTag[ChaCha20Poly1305])]

    Permalink
    Definition Classes
    AEADAPI
  27. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  28. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  29. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  30. def getCipherImpl: ChaChaEngine

    Permalink
    Attributes
    protected
    Definition Classes
    ChaCha20Poly1305 → ChaCha20Cipher
  31. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  32. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  33. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  34. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  35. def nonceSize: Int

    Permalink
    Definition Classes
    ChaCha20Poly1305 → ChaCha20Cipher
  36. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  37. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  38. def poly1305Auth(key: KeyParameter, aad: AAD, in: Array[Byte], inSize: Int, tagOut: Array[Byte], tOutOffset: Int): Unit

    Permalink

    Mutates the internal

    Mutates the internal

    Attributes
    protected
    Definition Classes
    ChaCha20Poly1305 → ChaCha20Cipher
  39. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  40. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  41. def unsafeDecrypt(ct: CipherText[ChaCha20Poly1305], k: BouncySecretKey[ChaCha20Poly1305]): PlainText

    Permalink

    Decrypt the plaintext using the chacha function.

    Decrypt the plaintext using the chacha function.

    Using the DJB ciphers, encryption and decryption are the same operation applied. simply in reverse, thus, the init parameter in the StreamCipher is irrelevant.

    We assume the ciphertext is of the form cipherText || block Thus, it must have a minimum size of at least one.

    Definition Classes
    ChaCha20Cipher
  42. def unsafeDecryptAAD(ct: CipherText[ChaCha20Poly1305], k: BouncySecretKey[ChaCha20Poly1305], aad: AAD): PlainText

    Permalink

    Decrypt the plaintext using the chacha function.

    Decrypt the plaintext using the chacha function.

    Using the DJB ciphers, encryption and decryption are the same operation applied. simply in reverse, thus, the init parameter in the StreamCipher is irrelevant.

    We assume the ciphertext is of the form cipherText || block Thus, it must have a minimum size of at least one.

    Run the empty block on the cipher, run the encryption algorithm (which is essentially decryption) and compare the tag computed from the original ciphertext.

    Definition Classes
    ChaCha20Cipher
  43. def unsafeDecryptDetached(ct: CipherText[ChaCha20Poly1305], authTag: AuthTag[ChaCha20Poly1305], k: BouncySecretKey[ChaCha20Poly1305]): PlainText

    Permalink

    Decrypt the plaintext using the chacha function.

    Decrypt the plaintext using the chacha function.

    Run an empty block of 64 bytes through the cipher to generate the Poly1305 key. Decrypt the plaintext, generate the authentication tag and compare it to the supplied tag.

    Definition Classes
    ChaCha20Cipher
  44. def unsafeDecryptDetachedAAD(ct: CipherText[ChaCha20Poly1305], authTag: AuthTag[ChaCha20Poly1305], k: BouncySecretKey[ChaCha20Poly1305], aad: AAD): PlainText

    Permalink
    Definition Classes
    ChaCha20Cipher
  45. def unsafeEncrypt(plainText: PlainText, k: BouncySecretKey[ChaCha20Poly1305], iv: Iv[ChaCha20Poly1305]): CipherText[ChaCha20Poly1305]

    Permalink

    Encrypt the plaintext using the chacha function.

    Encrypt the plaintext using the chacha function.

    Run an empty block of 64 bytes through the cipher to generate the Poly1305 key. Encrypt the plaintext, then return the block and the tag concatenated like:

    cipherText || block

    Definition Classes
    ChaCha20Cipher
  46. def unsafeEncryptAAD(plainText: PlainText, k: BouncySecretKey[ChaCha20Poly1305], iv: Iv[ChaCha20Poly1305], aad: AAD): CipherText[ChaCha20Poly1305]

    Permalink

    Encrypt the plaintext using the chacha function.

    Encrypt the plaintext using the chacha function.

    Run an empty block of 64 bytes through the cipher to generate the Poly1305 key. Encrypt the plaintext, then return the block and the tag concatenated like:

    cipherText || block

    Definition Classes
    ChaCha20Cipher
  47. def unsafeEncryptDetached(plainText: PlainText, k: BouncySecretKey[ChaCha20Poly1305], iv: Iv[ChaCha20Poly1305]): (CipherText[ChaCha20Poly1305], AuthTag[ChaCha20Poly1305])

    Permalink

    Encrypt the plaintext using the chacha function.

    Encrypt the plaintext using the chacha function.

    Run an empty block of 64 bytes through the cipher to generate the Poly1305 key. Encrypt the plaintext, then return the block and the tag in a separate fashion.

    Definition Classes
    ChaCha20Cipher
  48. def unsafeEncryptDetachedAAD(plainText: PlainText, k: BouncySecretKey[ChaCha20Poly1305], iv: Iv[ChaCha20Poly1305], aad: AAD): (CipherText[ChaCha20Poly1305], AuthTag[ChaCha20Poly1305])

    Permalink

    Encrypt the plaintext using the chacha function.

    Encrypt the plaintext using the chacha function.

    Run an empty block of 64 bytes through the cipher to generate the Poly1305 key. Encrypt the plaintext, then return the block and the tag in a separate fashion.

    Definition Classes
    ChaCha20Cipher
  49. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  50. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ChaCha20Cipher[ChaCha20Poly1305, ChaChaEngine]

Inherited from AEADAPI[ChaCha20Poly1305, BouncySecretKey]

Inherited from AuthCipherAPI[ChaCha20Poly1305, BouncySecretKey]

Inherited from CipherAPI[ChaCha20Poly1305, BouncySecretKey]

Inherited from AnyRef

Inherited from Any

Ungrouped