Root master key facade.
RMK providers protect KMS secret material before persistence, including KEK master keys, principal/session private-key payloads, factor secrets, and RMK PDK payloads.
Configure one provider:
config :kms, :rmk_provider, KMS.RMK.LocalMost application code should use higher-level APIs such as KMS.encrypt_alias/3.
Direct RMK calls are useful for provider checks and application-owned secret
wrapping.
Summary
Functions
Decrypts ciphertext using the configured RMK provider.
Encrypts cleartext using the configured RMK provider.
Checks whether the configured RMK provider is ready.
Callbacks
Functions
Decrypts ciphertext using the configured RMK provider.
Provider/AAD context must match the values used for encryption. Provider mismatch fails closed for envelope ciphertexts.
Encrypts cleartext using the configured RMK provider.
Options are passed through to the provider. Providers that support additional
authenticated data accept :aad.
Checks whether the configured RMK provider is ready.
Providers use this to validate local key files or remote key access. Providers without an explicit readiness callback are treated as ready.
The check is bounded by config :kms, :rmk_readiness_timeout_ms (five seconds by
default). Pass :readiness_timeout_ms to override that bound for one call. The
bound is also passed to the provider as :timeout_ms unless already specified.
Provider exceptions and timeouts return redacted error atoms.