PASERK uses symmetric-key encryption to wrap PASETO keys.
This is the most flexible mode in PASERK, as it offers a way to integrate PASERK with multiple key management solutions.
Summary
Types
The configuration created by the wrapper module used to hold that state required to encrypt and decrypt.
Callbacks
Invoked to decrypt the wrapped data into its original key material.
Invoked to encrypt the key material into an opaque binary blob through wrapping.
Invoked when a wrapper is created to initialise its state.
The prefix for the custom wrapping protocol.
Functions
Creates a wrapper using the given module and options.
Types
Callbacks
@callback decrypt( config(), Pasexto.Key.version(), header :: binary(), wrapped :: binary() ) :: {:ok, Pasexto.Key.material()} | {:error, term()}
Invoked to decrypt the wrapped data into its original key material.
@callback encrypt( config(), Pasexto.Key.version(), header :: binary(), material :: Pasexto.Key.material() ) :: {:ok, binary()} | {:error, term()}
Invoked to encrypt the key material into an opaque binary blob through wrapping.
Invoked when a wrapper is created to initialise its state.
@callback prefix() :: atom()
The prefix for the custom wrapping protocol.