Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
96590b2
Add interruptible Crypto API operations
athoelke Jul 23, 2026
7b889e8
Add missing 'time' to 'bounded execution' text
athoelke Aug 4, 2026
122457f
Clarified wording on IOP usage
athoelke Aug 4, 2026
a7f1c8c
Add custom parameters for interruptible key generation
athoelke Aug 4, 2026
c4c5fa8
Add support for contexts in interruptible signature and verify operat…
athoelke Aug 4, 2026
b8552b2
Clarify interruptible setup failure state
athoelke Aug 4, 2026
0f8d3dc
Clarify interruptible signature input states
athoelke Aug 4, 2026
d32a8bc
Clarify interruptible completion summaries
athoelke Aug 4, 2026
6b8483c
Use key agreement in interruptible operations example
athoelke Aug 4, 2026
08e87e8
Allow empty messages in interruptible signatures
athoelke Aug 4, 2026
8615741
Clarify interruptible operation completion flows
athoelke Aug 4, 2026
577d6e4
Specify single-fragment interruptible signature errors
athoelke Aug 4, 2026
a8ddd07
Clarify incomplete key-agreement output
athoelke Aug 4, 2026
70ae298
Clarify persistent key collision timing
athoelke Aug 6, 2026
a26ae1e
Clarify key-agreement collision timing
athoelke Aug 6, 2026
d5548bd
Clarify single-fragment signature update errors
athoelke Aug 6, 2026
b98ea11
Add deferred-signature interruptible verification
athoelke Aug 6, 2026
beee5dd
Clarify deferred verification flow setup
athoelke Aug 7, 2026
f4b3178
Editorial polishing
athoelke Aug 7, 2026
db5926e
Rename interruptible operation starts
athoelke Aug 7, 2026
b37b5d5
Clarify interruptible key-generation sequencing
athoelke Aug 11, 2026
c929359
Clarify interruptible operation limits
athoelke Aug 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions doc/crypto/api.db/psa/crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ typedef uint32_t psa_algorithm_t;
typedef /* implementation-defined type */ psa_cipher_operation_t;
typedef uint8_t psa_dh_family_t;
typedef uint8_t psa_ecc_family_t;
typedef /* implementation-defined type */ psa_export_public_key_iop_t;
typedef /* implementation-defined type */ psa_generate_key_iop_t;
typedef /* implementation-defined type */ psa_hash_operation_t;
typedef /* implementation-defined type */ psa_key_agreement_iop_t;
typedef /* implementation-defined type */ psa_key_attributes_t;
typedef /* implementation-defined type */ psa_key_derivation_operation_t;
typedef uint16_t psa_key_derivation_step_t;
Expand All @@ -24,8 +27,10 @@ typedef uint32_t psa_pake_primitive_t;
typedef uint8_t psa_pake_primitive_type_t;
typedef uint8_t psa_pake_role_t;
typedef uint8_t psa_pake_step_t;
typedef /* implementation-defined type */ psa_sign_iop_t;
typedef /* implementation-defined type */ psa_sign_operation_t;
typedef uint8_t psa_slh_dsa_family_t;
typedef /* implementation-defined type */ psa_verify_iop_t;
typedef /* implementation-defined type */ psa_verify_operation_t;
typedef /* implementation-defined type */ psa_xof_operation_t;
typedef struct psa_custom_key_parameters_t {
Expand Down Expand Up @@ -219,6 +224,8 @@ typedef struct psa_custom_key_parameters_t {
#define PSA_ALG_SHA_512_224 ((psa_algorithm_t)0x0200000c)
#define PSA_ALG_SHA_512_256 ((psa_algorithm_t)0x0200000d)
#define PSA_ALG_SIGN_SUPPORTS_CONTEXT(alg) /* implementation-defined value */
#define PSA_ALG_SIGN_SUPPORTS_DEFERRED_SIGNATURE(alg) \
/* implementation-defined value */
#define PSA_ALG_SLH_DSA ((psa_algorithm_t) 0x06004000)
#define PSA_ALG_SM3 ((psa_algorithm_t)0x02000014)
#define PSA_ALG_SP800_108_COUNTER_CMAC ((psa_algorithm_t)0x08000800)
Expand Down Expand Up @@ -294,9 +301,11 @@ typedef struct psa_custom_key_parameters_t {
#define PSA_EXPORT_KEY_OUTPUT_SIZE(key_type, key_bits) \
/* implementation-defined value */
#define PSA_EXPORT_KEY_PAIR_MAX_SIZE /* implementation-defined value */
#define PSA_EXPORT_PUBLIC_KEY_IOP_INIT /* implementation-defined value */
#define PSA_EXPORT_PUBLIC_KEY_MAX_SIZE /* implementation-defined value */
#define PSA_EXPORT_PUBLIC_KEY_OUTPUT_SIZE(key_type, key_bits) \
/* implementation-defined value */
#define PSA_GENERATE_KEY_IOP_INIT /* implementation-defined value */
#define PSA_HASH_BLOCK_LENGTH(alg) /* implementation-defined value */
#define PSA_HASH_LENGTH(alg) /* implementation-defined value */
#define PSA_HASH_MAX_SIZE /* implementation-defined value */
Expand All @@ -308,6 +317,8 @@ typedef struct psa_custom_key_parameters_t {
/* specification-defined value */
#define PSA_HASH_SUSPEND_OUTPUT_MAX_SIZE /* implementation-defined value */
#define PSA_HASH_SUSPEND_OUTPUT_SIZE(alg) /* specification-defined value */
#define PSA_IOP_MAX_OPS_UNLIMITED UINT32_MAX
#define PSA_KEY_AGREEMENT_IOP_INIT /* implementation-defined value */
#define PSA_KEY_ATTRIBUTES_INIT /* implementation-defined value */
#define PSA_KEY_DERIVATION_INPUT_CONTEXT /* implementation-defined value */
#define PSA_KEY_DERIVATION_INPUT_COST /* implementation-defined value */
Expand Down Expand Up @@ -473,6 +484,7 @@ typedef struct psa_custom_key_parameters_t {
#define PSA_RAW_KEY_AGREEMENT_OUTPUT_SIZE(key_type, key_bits) \
/* implementation-defined value */
#define PSA_SIGNATURE_MAX_SIZE /* implementation-defined value */
#define PSA_SIGN_IOP_INIT /* implementation-defined value */
#define PSA_SIGN_OPERATION_INIT /* implementation-defined value */
#define PSA_SIGN_OUTPUT_SIZE(key_type, key_bits, alg) \
/* implementation-defined value */
Expand All @@ -482,6 +494,7 @@ typedef struct psa_custom_key_parameters_t {
#define PSA_SLH_DSA_FAMILY_SHAKE_S ((psa_slh_dsa_family_t) 0x0b)
#define PSA_TLS12_ECJPAKE_TO_PMS_OUTPUT_SIZE 32
#define PSA_TLS12_PSK_TO_MS_PSK_MAX_SIZE /* implementation-defined value */
#define PSA_VERIFY_IOP_INIT /* implementation-defined value */
#define PSA_VERIFY_OPERATION_INIT /* implementation-defined value */
#define PSA_WRAP_KEY_OUTPUT_SIZE(wrap_key_type, alg, key_type, key_bits) \
/* implementation-defined value */
Expand Down Expand Up @@ -639,13 +652,33 @@ psa_status_t psa_export_public_key(psa_key_id_t key,
uint8_t * data,
size_t data_size,
size_t * data_length);
psa_status_t psa_export_public_key_iop_abort(psa_export_public_key_iop_t * operation);
psa_status_t psa_export_public_key_iop_complete(psa_export_public_key_iop_t * operation,
uint8_t * data,
size_t data_size,
size_t * data_length);
uint32_t psa_export_public_key_iop_get_num_ops(psa_export_public_key_iop_t * operation);
psa_export_public_key_iop_t psa_export_public_key_iop_init(void);
psa_status_t psa_export_public_key_iop_start(psa_export_public_key_iop_t * operation,
psa_key_id_t key);
psa_status_t psa_generate_key(const psa_key_attributes_t * attributes,
psa_key_id_t * key);
psa_status_t psa_generate_key_custom(const psa_key_attributes_t * attributes,
const psa_custom_key_parameters_t * custom,
const uint8_t * custom_data,
size_t custom_data_length,
psa_key_id_t * key);
psa_status_t psa_generate_key_iop_abort(psa_generate_key_iop_t * operation);
psa_status_t psa_generate_key_iop_complete(psa_generate_key_iop_t * operation,
psa_key_id_t * key);
psa_status_t psa_generate_key_iop_custom(psa_generate_key_iop_t * operation,
const psa_custom_key_parameters_t * custom,
const uint8_t * custom_data,
size_t custom_data_length);
uint32_t psa_generate_key_iop_get_num_ops(psa_generate_key_iop_t * operation);
psa_generate_key_iop_t psa_generate_key_iop_init(void);
psa_status_t psa_generate_key_iop_start(psa_generate_key_iop_t * operation,
const psa_key_attributes_t * attributes);
psa_status_t psa_generate_random(uint8_t * output,
size_t output_size);
psa_algorithm_t psa_get_key_algorithm(const psa_key_attributes_t * attributes);
Expand Down Expand Up @@ -694,12 +727,25 @@ psa_status_t psa_import_key(const psa_key_attributes_t * attributes,
const uint8_t * data,
size_t data_length,
psa_key_id_t * key);
uint32_t psa_iop_get_max_ops(void);
void psa_iop_set_max_ops(uint32_t max_ops);
psa_status_t psa_key_agreement(psa_key_id_t private_key,
const uint8_t * peer_key,
size_t peer_key_length,
psa_algorithm_t alg,
const psa_key_attributes_t * attributes,
psa_key_id_t * key);
psa_status_t psa_key_agreement_iop_abort(psa_key_agreement_iop_t * operation);
psa_status_t psa_key_agreement_iop_complete(psa_key_agreement_iop_t * operation,
psa_key_id_t * key);
uint32_t psa_key_agreement_iop_get_num_ops(psa_key_agreement_iop_t * operation);
psa_key_agreement_iop_t psa_key_agreement_iop_init(void);
psa_status_t psa_key_agreement_iop_start(psa_key_agreement_iop_t * operation,
psa_key_id_t private_key,
const uint8_t * peer_key,
size_t peer_key_length,
psa_algorithm_t alg,
const psa_key_attributes_t * attributes);
psa_key_attributes_t psa_key_attributes_init(void);
psa_status_t psa_key_derivation_abort(psa_key_derivation_operation_t * operation);
psa_status_t psa_key_derivation_get_capacity(const psa_key_derivation_operation_t * operation,
Expand Down Expand Up @@ -852,6 +898,26 @@ psa_status_t psa_sign_hash_with_context(psa_key_id_t key,
uint8_t * signature,
size_t signature_size,
size_t * signature_length);
psa_status_t psa_sign_iop_abort(psa_sign_iop_t * operation);
psa_status_t psa_sign_iop_complete(psa_sign_iop_t * operation,
uint8_t * signature,
size_t signature_size,
size_t * signature_length);
uint32_t psa_sign_iop_get_num_ops(psa_sign_iop_t * operation);
psa_status_t psa_sign_iop_hash(psa_sign_iop_t * operation,
const uint8_t * hash,
size_t hash_length);
psa_sign_iop_t psa_sign_iop_init(void);
psa_status_t psa_sign_iop_set_context(psa_sign_iop_t * operation,
const uint8_t * context,
size_t context_length);
psa_status_t psa_sign_iop_setup_complete(psa_sign_iop_t * operation);
psa_status_t psa_sign_iop_setup_start(psa_sign_iop_t * operation,
psa_key_id_t key,
psa_algorithm_t alg);
psa_status_t psa_sign_iop_update(psa_sign_iop_t * operation,
const uint8_t * input,
size_t input_length);
Comment thread
athoelke marked this conversation as resolved.
psa_status_t psa_sign_message(psa_key_id_t key,
psa_algorithm_t alg,
const uint8_t * input,
Expand Down Expand Up @@ -900,6 +966,31 @@ psa_status_t psa_verify_hash_with_context(psa_key_id_t key,
size_t context_length,
const uint8_t * signature,
size_t signature_length);
psa_status_t psa_verify_iop_abort(psa_verify_iop_t * operation);
psa_status_t psa_verify_iop_complete(psa_verify_iop_t * operation);
uint32_t psa_verify_iop_get_num_ops(psa_verify_iop_t * operation);
psa_status_t psa_verify_iop_hash(psa_verify_iop_t * operation,
const uint8_t * hash,
size_t hash_length);
psa_verify_iop_t psa_verify_iop_init(void);
psa_status_t psa_verify_iop_set_context(psa_verify_iop_t * operation,
const uint8_t * context,
size_t context_length);
psa_status_t psa_verify_iop_set_signature(psa_verify_iop_t * operation,
const uint8_t * signature,
size_t signature_length);
psa_status_t psa_verify_iop_setup_complete(psa_verify_iop_t * operation);
psa_status_t psa_verify_iop_setup_deferred_signature_start(psa_verify_iop_t * operation,
psa_key_id_t key,
psa_algorithm_t alg);
psa_status_t psa_verify_iop_setup_start(psa_verify_iop_t * operation,
psa_key_id_t key,
psa_algorithm_t alg,
const uint8_t * signature,
size_t signature_length);
psa_status_t psa_verify_iop_update(psa_verify_iop_t * operation,
const uint8_t * input,
size_t input_length);
psa_status_t psa_verify_message(psa_key_id_t key,
psa_algorithm_t alg,
const uint8_t * input,
Expand Down
Loading