View Source Cryppo.DerivedKey (CryppoEx v0.2.3)

A struct for a derived encryption key and its derivation artefacts

A Cryppo.EncryptedData struct may be marked as belonging to a certain key derivation strategy using field key_derivation_strategy containing the module of the key derivation.

A Cryppo.DerivedKey comes in 2 flavors:

  • With a derived encryption key. When used for encryption or decryption this key will be used
  • Without an encryption key. Encrypting or decrypting with this struct requires a passphrase to derive the key

Summary

Types

@type t() :: %Cryppo.DerivedKey{
  encryption_key: Cryppo.EncryptionKey.t() | nil,
  hash: String.t(),
  iter: integer(),
  key_derivation_strategy: Cryppo.encryption_strategy_module(),
  length: integer(),
  salt: binary()
}

Struct Cryppo.DerivedKey

A Cryppo.DerivedKey struct contains

  • encryption_key - nil or a Cryppo.EncryptionKey
  • key_derivation_strategy - module of the key derivation strategy
  • salt - salt used for key derivation
  • iter - number of iterations for key derivation
  • length - key length
  • hash - hash function for key derivation

Functions

@spec current_version() :: <<_::8>>