silicon v0.1.0 Silicon.AES View Source

Implemented AES-CBC, AES-CBC-PKCS7, AES-CTR, AES-GCM

Link to this section Summary

Link to this section Types

Link to this type

padding() View Source
padding() :: :pkcs7 | :none

Link to this section Functions

Link to this function

cbc_decrypt(key, ciphertext, iv, padding \\ :pkcs7) View Source
cbc_decrypt(binary(), binary(), binary(), padding()) :: binary()

Link to this function

cbc_encrypt(key, plaintext, iv, padding \\ :pkcs7) View Source
cbc_encrypt(binary(), binary(), binary(), padding()) :: [
  iv: binary(),
  ciphertext: binary()
]

Link to this function

ctr_decrypt(key, ciphertext, iv) View Source
ctr_decrypt(binary(), binary(), binary()) :: binary()

Link to this function

ctr_encrypt(key, plaintext, iv) View Source
ctr_encrypt(binary(), binary(), binary()) :: [
  iv: binary(),
  ciphertext: binary()
]

Link to this function

gcm_decrypt(key, ciphertext, iv, aad, tag) View Source
gcm_decrypt(binary(), binary(), binary(), binary(), binary()) :: binary()

Link to this function

gcm_encrypt(key, plaintext, iv, aad, tag_length) View Source
gcm_encrypt(binary(), binary(), binary(), binary(), integer()) :: [
  iv: binary(),
  ciphertext: binary(),
  tag: binary()
]