[All] - [crypto_errno] - [keypair_encoding] - [publickey_encoding] - [secretkey_encoding] - [signature_encoding] - [algorithm_type] - [version] - [size] - [timestamp] - [u64] - [array_output] - [options] - [secrets_manager] - [keypair] - [signature_state] - [signature] - [publickey] - [secretkey] - [signature_verification_state] - [symmetric_state] - [symmetric_key] - [symmetric_tag] - [opt_options_u] - [opt_options] - [opt_symmetric_key_u] - [opt_symmetric_key]
[All] - [external_secret_store()] - [external_secret_replace()] - [external_secret_from_id()] - [external_secret_invalidate()] - [external_secret_encapsulate()] - [external_secret_decapsulate()]
Enumeration with tag type: u16, and the following members:
success:crypto_errnoguest_error:crypto_errnonot_implemented:crypto_errnounsupported_feature:crypto_errnoprohibited_operation:crypto_errnounsupported_encoding:crypto_errnounsupported_algorithm:crypto_errnounsupported_option:crypto_errnoinvalid_key:crypto_errnoinvalid_length:crypto_errnoverification_failed:crypto_errnorng_error:crypto_errnoalgorithm_failure:crypto_errnoinvalid_signature:crypto_errnoclosed:crypto_errnoinvalid_handle:crypto_errnooverflow:crypto_errnointernal_error:crypto_errnotoo_many_handles:crypto_errnokey_not_supported:crypto_errnokey_required:crypto_errnoinvalid_tag:crypto_errnoinvalid_operation:crypto_errnononce_required:crypto_errnoinvalid_nonce:crypto_errnooption_not_set:crypto_errnonot_found:crypto_errnoparameters_missing:crypto_errnoin_progress:crypto_errnoincompatible_keys:crypto_errnoexpired:crypto_errno
Error codes.
Enumeration with tag type: u16, and the following members:
raw:keypair_encodingpkcs8:keypair_encodingpem:keypair_encodinglocal:keypair_encoding
Encoding to use for importing or exporting a key pair.
Enumeration with tag type: u16, and the following members:
raw:publickey_encodingpkcs8:publickey_encodingpem:publickey_encodingsec:publickey_encodinglocal:publickey_encoding
Encoding to use for importing or exporting a public key.
Enumeration with tag type: u16, and the following members:
raw:secretkey_encodingpkcs8:secretkey_encodingpem:secretkey_encodingsec:secretkey_encodinglocal:secretkey_encoding
Encoding to use for importing or exporting a secret key.
Enumeration with tag type: u16, and the following members:
raw:signature_encodingder:signature_encoding
Encoding to use for importing or exporting a signature.
Enumeration with tag type: u16, and the following members:
signatures:algorithm_typesymmetric:algorithm_typekey_exchange:algorithm_type
An algorithm category.
Alias for u64.
Version of a managed key.
A version can be an arbitrary
u64integer, with the exception of some reserved values.
Alias for usize.
Size of a value.
Alias for u64.
A UNIX timestamp, in seconds since 01/01/1970.
Alias for u64.
A 64-bit value
Alias for handle.
Handle for functions returning output whose size may be large or not known in advance.
An
array_outputobject contains a host-allocated byte array.A guest can get the size of that array after a function returns in order to then allocate a buffer of the correct size. In addition, the content of such an object can be consumed by a guest in a streaming fashion.
An
array_outputhandle is automatically closed after its full content has been consumed.
Alias for handle.
A set of options.
This type is used to set non-default parameters.
The exact set of allowed options depends on the algorithm being used.
Alias for handle.
A handle to the optional secrets management facilities offered by a host.
This is used to generate, retrieve and invalidate managed keys.
Alias for handle.
A key pair.
Alias for handle.
A state to absorb data to be signed.
After a signature has been computed or verified, the state remains valid for further operations.
A subsequent signature would sign all the data accumulated since the creation of the state object.
Alias for handle.
A signature.
Alias for handle.
A public key, for key exchange and signature verification.
Alias for handle.
A secret key, for key exchange mechanisms.
Alias for handle.
A state to absorb signed data to be verified.
Alias for handle.
A state to perform symmetric operations.
The state is not reset nor invalidated after an operation has been performed. Incremental updates and sessions are thus supported.
Alias for handle.
A symmetric key.
The key can be imported from raw bytes, or can be a reference to a managed key.
If it was imported, the host will wipe it from memory as soon as the handle is closed.
Alias for handle.
An authentication tag.
This is an object returned by functions computing authentication tags.
A tag can be compared against another tag (directly supplied as raw bytes) in constant time with the
symmetric_tag_verify()function.This object type can't be directly created from raw bytes. They are only returned by functions computing MACs.
The host is responsible for securely wiping them from memory on close.
Enumeration with tag type: u8, and the following members:
some:opt_options_unone:opt_options_u
Options index, only required by the Interface Types translation layer.
Tagged union with tag type: u8 and the following possibilities:
some:optionsnone: (empty)
An optional options set.
This union simulates an
Option\<Options\>type to make theoptionsparameter of some functions optional.
Enumeration with tag type: u8, and the following members:
some:opt_symmetric_key_unone:opt_symmetric_key_u
Symmetric key index, only required by the Interface Types translation layer.
Tagged union with tag type: u8 and the following possibilities:
some:symmetric_keynone: (empty)
An optional symmetric key.
This union simulates an
Option\<SymmetricKey\>type to make thesymmetric_keyparameter of some functions optional.
Returned error type: crypto_errno
secrets_manager:secrets_managersecret:u8pointersecret_len:sizeexpiration:timestampsecret_id:u8mutable pointersecret_id_max_len:size
This function has no output.
Store an external secret into the secrets manager.
$expirationis the expiration date of the secret as a UNIX timestamp, in seconds. An expiration date is mandatory.On success, the secret identifier is put into
$secret_idif it fits into$secret_id_max_lenbytes. If the supplied output buffer is too small,$overflowis returned.If this function is not supported by the host the
$unsupported_featureerror is returned.
Returned error type: crypto_errno
secrets_manager:secrets_managersecret:u8pointersecret_len:sizeexpiration:timestampsecret_id:u8pointersecret_id_len:size
versionmutable pointer
Replace a managed external secret with a new version.
$expirationis the expiration date of the secret as a UNIX timestamp, in seconds. An expiration date is mandatory.On success, a new version is created and returned.
If this function is not supported by the host the
$unsupported_featureerror is returned.
Returned error type: crypto_errno
secrets_manager:secrets_managersecret_id:u8pointersecret_id_len:sizesecret_version:version
array_outputmutable pointer
Get a copy of an external secret given an identifier and version.
secret_versioncan be set to a version number, or toversion.latestto retrieve the most recent version of a secret.On success, a copy of the secret is returned.
The function returns
$unsupported_featureif this operation is not supported by the host, andnot_foundif the identifier and version don't match any existing secret.
Returned error type: crypto_errno
secrets_manager:secrets_managersecret_id:u8pointersecret_id_len:sizesecret_version:version
This function has no output.
Invalidate an external secret given an identifier and a version.
This asks the secrets manager to delete or revoke a stored secret, a specific version of a secret.
secret_versioncan be set to a version number, or toversion.latestto invalidate the current version, or toversion.allto invalidate all versions of a secret.The function returns
$unsupported_featureif this operation is not supported by the host, andnot_foundif the identifier and version don't match any existing secret.
Returned error type: crypto_errno
secrets_manager:secrets_managersecret:u8pointersecret_len:sizeexpiration:timestamp
array_outputmutable pointer
Encrypt an external secret.
Applications don't have access to the encryption key, and the secrets manager is free to choose any suitable algorithm.
However, the returned ciphertext must include and authenticate both the secret and the expiration date.
On success, the ciphertext is returned.
Returned error type: crypto_errno
secrets_manager:secrets_managerencrypted_secret:u8pointerencrypted_secret_len:size
array_outputmutable pointer
Decrypt an external secret previously encrypted by the secrets manager.
Returns the original secret if the ciphertext is valid. Returns
$expiredif the current date is past the stored expiration date. Returns$verification_failedif the ciphertext format is invalid or if its authentication tag couldn't be verified.