|
| psa_status_t | psa_crypto_init (void) |
| | Library initialization. More...
|
| |
| void | psa_key_policy_set_usage (psa_key_policy_t *policy, psa_key_usage_t usage, psa_algorithm_t alg) |
| | Set the standard fields of a policy structure. More...
|
| |
| psa_key_usage_t | psa_key_policy_get_usage (const psa_key_policy_t *policy) |
| | Retrieve the usage field of a policy structure. More...
|
| |
| psa_algorithm_t | psa_key_policy_get_algorithm (const psa_key_policy_t *policy) |
| | Retrieve the algorithm field of a policy structure. More...
|
| |
| psa_status_t | psa_set_key_policy (psa_key_handle_t handle, const psa_key_policy_t *policy) |
| | Set the usage policy on a key slot. More...
|
| |
| psa_status_t | psa_get_key_policy (psa_key_handle_t handle, psa_key_policy_t *policy) |
| | Get the usage policy for a key slot. More...
|
| |
| psa_status_t | psa_get_key_lifetime (psa_key_handle_t handle, psa_key_lifetime_t *lifetime) |
| | Retrieve the lifetime of an open key. More...
|
| |
| psa_status_t | psa_allocate_key (psa_key_handle_t *handle) |
| |
| psa_status_t | psa_open_key (psa_key_lifetime_t lifetime, psa_key_id_t id, psa_key_handle_t *handle) |
| |
| psa_status_t | psa_create_key (psa_key_lifetime_t lifetime, psa_key_id_t id, psa_key_handle_t *handle) |
| |
| psa_status_t | psa_close_key (psa_key_handle_t handle) |
| |
| psa_status_t | psa_import_key (psa_key_handle_t handle, psa_key_type_t type, const uint8_t *data, size_t data_length) |
| | Import a key in binary format. More...
|
| |
| psa_status_t | psa_destroy_key (psa_key_handle_t handle) |
| | Destroy a key. More...
|
| |
| psa_status_t | psa_get_key_information (psa_key_handle_t handle, psa_key_type_t *type, size_t *bits) |
| | Get basic metadata about a key. More...
|
| |
| psa_status_t | psa_set_key_domain_parameters (psa_key_handle_t handle, psa_key_type_t type, const uint8_t *data, size_t data_length) |
| | Set domain parameters for a key. More...
|
| |
| psa_status_t | psa_get_key_domain_parameters (psa_key_handle_t handle, uint8_t *data, size_t data_size, size_t *data_length) |
| | Get domain parameters for a key. More...
|
| |
| psa_status_t | psa_export_key (psa_key_handle_t handle, uint8_t *data, size_t data_size, size_t *data_length) |
| | Export a key in binary format. More...
|
| |
| psa_status_t | psa_export_public_key (psa_key_handle_t handle, uint8_t *data, size_t data_size, size_t *data_length) |
| | Export a public key or the public part of a key pair in binary format. More...
|
| |
| psa_status_t | psa_copy_key (psa_key_handle_t source_handle, psa_key_handle_t target_handle, const psa_key_policy_t *constraint) |
| |
| psa_status_t | psa_hash_compute (psa_algorithm_t alg, const uint8_t *input, size_t input_length, uint8_t *hash, size_t hash_size, size_t *hash_length) |
| |
| psa_status_t | psa_hash_compare (psa_algorithm_t alg, const uint8_t *input, size_t input_length, const uint8_t *hash, const size_t hash_length) |
| |
| psa_status_t | psa_hash_setup (psa_hash_operation_t *operation, psa_algorithm_t alg) |
| |
| psa_status_t | psa_hash_update (psa_hash_operation_t *operation, const uint8_t *input, size_t input_length) |
| |
| psa_status_t | psa_hash_finish (psa_hash_operation_t *operation, uint8_t *hash, size_t hash_size, size_t *hash_length) |
| |
| psa_status_t | psa_hash_verify (psa_hash_operation_t *operation, const uint8_t *hash, size_t hash_length) |
| |
| psa_status_t | psa_hash_abort (psa_hash_operation_t *operation) |
| |
| psa_status_t | psa_hash_clone (const psa_hash_operation_t *source_operation, psa_hash_operation_t *target_operation) |
| |
| psa_status_t | psa_mac_compute (psa_key_handle_t handle, psa_algorithm_t alg, const uint8_t *input, size_t input_length, uint8_t *mac, size_t mac_size, size_t *mac_length) |
| |
| psa_status_t | psa_mac_verify (psa_key_handle_t handle, psa_algorithm_t alg, const uint8_t *input, size_t input_length, const uint8_t *mac, const size_t mac_length) |
| |
| psa_status_t | psa_mac_sign_setup (psa_mac_operation_t *operation, psa_key_handle_t handle, psa_algorithm_t alg) |
| |
| psa_status_t | psa_mac_verify_setup (psa_mac_operation_t *operation, psa_key_handle_t handle, psa_algorithm_t alg) |
| |
| psa_status_t | psa_mac_update (psa_mac_operation_t *operation, const uint8_t *input, size_t input_length) |
| |
| psa_status_t | psa_mac_sign_finish (psa_mac_operation_t *operation, uint8_t *mac, size_t mac_size, size_t *mac_length) |
| |
| psa_status_t | psa_mac_verify_finish (psa_mac_operation_t *operation, const uint8_t *mac, size_t mac_length) |
| |
| psa_status_t | psa_mac_abort (psa_mac_operation_t *operation) |
| |
| psa_status_t | psa_cipher_encrypt (psa_key_handle_t handle, psa_algorithm_t alg, const uint8_t *input, size_t input_length, uint8_t *output, size_t output_size, size_t *output_length) |
| |
| psa_status_t | psa_cipher_decrypt (psa_key_handle_t handle, psa_algorithm_t alg, const uint8_t *input, size_t input_length, uint8_t *output, size_t output_size, size_t *output_length) |
| |
| psa_status_t | psa_cipher_encrypt_setup (psa_cipher_operation_t *operation, psa_key_handle_t handle, psa_algorithm_t alg) |
| |
| psa_status_t | psa_cipher_decrypt_setup (psa_cipher_operation_t *operation, psa_key_handle_t handle, psa_algorithm_t alg) |
| |
| psa_status_t | psa_cipher_generate_iv (psa_cipher_operation_t *operation, unsigned char *iv, size_t iv_size, size_t *iv_length) |
| |
| psa_status_t | psa_cipher_set_iv (psa_cipher_operation_t *operation, const unsigned char *iv, size_t iv_length) |
| |
| psa_status_t | psa_cipher_update (psa_cipher_operation_t *operation, const uint8_t *input, size_t input_length, unsigned char *output, size_t output_size, size_t *output_length) |
| |
| psa_status_t | psa_cipher_finish (psa_cipher_operation_t *operation, uint8_t *output, size_t output_size, size_t *output_length) |
| |
| psa_status_t | psa_cipher_abort (psa_cipher_operation_t *operation) |
| |
| psa_status_t | psa_aead_encrypt (psa_key_handle_t handle, psa_algorithm_t alg, const uint8_t *nonce, size_t nonce_length, const uint8_t *additional_data, size_t additional_data_length, const uint8_t *plaintext, size_t plaintext_length, uint8_t *ciphertext, size_t ciphertext_size, size_t *ciphertext_length) |
| |
| psa_status_t | psa_aead_decrypt (psa_key_handle_t handle, psa_algorithm_t alg, const uint8_t *nonce, size_t nonce_length, const uint8_t *additional_data, size_t additional_data_length, const uint8_t *ciphertext, size_t ciphertext_length, uint8_t *plaintext, size_t plaintext_size, size_t *plaintext_length) |
| |
| psa_status_t | psa_aead_encrypt_setup (psa_aead_operation_t *operation, psa_key_handle_t handle, psa_algorithm_t alg) |
| |
| psa_status_t | psa_aead_decrypt_setup (psa_aead_operation_t *operation, psa_key_handle_t handle, psa_algorithm_t alg) |
| |
| psa_status_t | psa_aead_generate_nonce (psa_aead_operation_t *operation, unsigned char *nonce, size_t nonce_size, size_t *nonce_length) |
| |
| psa_status_t | psa_aead_set_nonce (psa_aead_operation_t *operation, const unsigned char *nonce, size_t nonce_length) |
| |
| psa_status_t | psa_aead_set_lengths (psa_aead_operation_t *operation, size_t ad_length, size_t plaintext_length) |
| |
| psa_status_t | psa_aead_update_ad (psa_aead_operation_t *operation, const uint8_t *input, size_t input_length) |
| |
| psa_status_t | psa_aead_update (psa_aead_operation_t *operation, const uint8_t *input, size_t input_length, unsigned char *output, size_t output_size, size_t *output_length) |
| |
| psa_status_t | psa_aead_finish (psa_aead_operation_t *operation, uint8_t *ciphertext, size_t ciphertext_size, size_t *ciphertext_length, uint8_t *tag, size_t tag_size, size_t *tag_length) |
| |
| psa_status_t | psa_aead_verify (psa_aead_operation_t *operation, const uint8_t *tag, size_t tag_length) |
| |
| psa_status_t | psa_aead_abort (psa_aead_operation_t *operation) |
| |
| psa_status_t | psa_asymmetric_sign (psa_key_handle_t handle, psa_algorithm_t alg, const uint8_t *hash, size_t hash_length, uint8_t *signature, size_t signature_size, size_t *signature_length) |
| | Sign a hash or short message with a private key. More...
|
| |
| psa_status_t | psa_asymmetric_verify (psa_key_handle_t handle, psa_algorithm_t alg, const uint8_t *hash, size_t hash_length, const uint8_t *signature, size_t signature_length) |
| | Verify the signature a hash or short message using a public key. More...
|
| |
| psa_status_t | psa_asymmetric_encrypt (psa_key_handle_t handle, psa_algorithm_t alg, const uint8_t *input, size_t input_length, const uint8_t *salt, size_t salt_length, uint8_t *output, size_t output_size, size_t *output_length) |
| | Encrypt a short message with a public key. More...
|
| |
| psa_status_t | psa_asymmetric_decrypt (psa_key_handle_t handle, psa_algorithm_t alg, const uint8_t *input, size_t input_length, const uint8_t *salt, size_t salt_length, uint8_t *output, size_t output_size, size_t *output_length) |
| | Decrypt a short message with a private key. More...
|
| |
| psa_status_t | psa_get_generator_capacity (const psa_crypto_generator_t *generator, size_t *capacity) |
| |
| psa_status_t | psa_set_generator_capacity (psa_crypto_generator_t *generator, size_t capacity) |
| |
| psa_status_t | psa_generator_read (psa_crypto_generator_t *generator, uint8_t *output, size_t output_length) |
| |
| psa_status_t | psa_generator_import_key (psa_key_handle_t handle, psa_key_type_t type, size_t bits, psa_crypto_generator_t *generator) |
| |
| psa_status_t | psa_generator_abort (psa_crypto_generator_t *generator) |
| |
| psa_status_t | psa_key_derivation_setup (psa_crypto_generator_t *generator, psa_algorithm_t alg) |
| |
| psa_status_t | psa_key_derivation_input_bytes (psa_crypto_generator_t *generator, psa_key_derivation_step_t step, const uint8_t *data, size_t data_length) |
| |
| psa_status_t | psa_key_derivation_input_key (psa_crypto_generator_t *generator, psa_key_derivation_step_t step, psa_key_handle_t handle) |
| |
| psa_status_t | psa_key_agreement (psa_crypto_generator_t *generator, psa_key_derivation_step_t step, psa_key_handle_t private_key, const uint8_t *peer_key, size_t peer_key_length) |
| |
| psa_status_t | psa_key_agreement_raw_shared_secret (psa_algorithm_t alg, psa_key_handle_t private_key, const uint8_t *peer_key, size_t peer_key_length, uint8_t *output, size_t output_size, size_t *output_length) |
| |
| psa_status_t | psa_generate_random (uint8_t *output, size_t output_size) |
| | Generate random bytes. More...
|
| |
| psa_status_t | psa_generate_key (psa_key_handle_t handle, psa_key_type_t type, size_t bits, const void *extra, size_t extra_size) |
| | Generate a key or key pair. More...
|
| |
Platform Security Architecture cryptography module.