->MBEDTLS_PRIVATE(policy).MBEDTLS_PRIVATE(alg2) = alg2;
84 return attributes->MBEDTLS_PRIVATE(policy).MBEDTLS_PRIVATE(alg2);
87 #if defined(MBEDTLS_PSA_CRYPTO_SE_C) 138 static inline voidpsa_set_key_slot_number(
142 attributes->MBEDTLS_PRIVATE(has_slot_number) = 1;
143 attributes->MBEDTLS_PRIVATE(slot_number) = slot_number;
152 static inline voidpsa_clear_key_slot_number(
155 attributes->MBEDTLS_PRIVATE(has_slot_number) = 0;
347 #define PSA_KEY_TYPE_DSA_PUBLIC_KEY ((psa_key_type_t) 0x4002) 365 #define PSA_KEY_TYPE_DSA_KEY_PAIR ((psa_key_type_t) 0x7002) 368 #define PSA_KEY_TYPE_IS_DSA(type) \ 369 (PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR(type) == PSA_KEY_TYPE_DSA_PUBLIC_KEY) 371 #define PSA_ALG_DSA_BASE ((psa_algorithm_t) 0x06000400) 386 #define PSA_ALG_DSA(hash_alg) \ 387 (PSA_ALG_DSA_BASE | ((hash_alg) & PSA_ALG_HASH_MASK)) 388 #define PSA_ALG_DETERMINISTIC_DSA_BASE ((psa_algorithm_t) 0x06000500) 389 #define PSA_ALG_DSA_DETERMINISTIC_FLAG PSA_ALG_ECDSA_DETERMINISTIC_FLAG 404 #define PSA_ALG_DETERMINISTIC_DSA(hash_alg) \ 405 (PSA_ALG_DETERMINISTIC_DSA_BASE | ((hash_alg) & PSA_ALG_HASH_MASK)) 406 #define PSA_ALG_IS_DSA(alg) \ 407 (((alg) & ~PSA_ALG_HASH_MASK & ~PSA_ALG_DSA_DETERMINISTIC_FLAG) == \ 409 #define PSA_ALG_DSA_IS_DETERMINISTIC(alg) \ 410 (((alg) & PSA_ALG_DSA_DETERMINISTIC_FLAG) != 0) 411 #define PSA_ALG_IS_DETERMINISTIC_DSA(alg) \ 412 (PSA_ALG_IS_DSA(alg) && PSA_ALG_DSA_IS_DETERMINISTIC(alg)) 413 #define PSA_ALG_IS_RANDOMIZED_DSA(alg) \ 414 (PSA_ALG_IS_DSA(alg) && !PSA_ALG_DSA_IS_DETERMINISTIC(alg)) 419 #undef PSA_ALG_IS_VENDOR_HASH_AND_SIGN 420 #define PSA_ALG_IS_VENDOR_HASH_AND_SIGN(alg) \ 430 #define PSA_PAKE_OPERATION_STAGE_SETUP 0 431 #define PSA_PAKE_OPERATION_STAGE_COLLECT_INPUTS 1 432 #define PSA_PAKE_OPERATION_STAGE_COMPUTATION 2 441 #if defined(MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG) 482mbedtls_psa_external_random_context_t *
context,
483 uint8_t*
output,
size_toutput_size,
size_t*output_length);
503 #define MBEDTLS_PSA_KEY_ID_BUILTIN_MIN ((psa_key_id_t) 0x7fff0000) 510 #define MBEDTLS_PSA_KEY_ID_BUILTIN_MAX ((psa_key_id_t) 0x7fffefff) 518 #if defined(MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS) 528 static inline intpsa_key_id_is_builtin(
psa_key_id_tkey_id)
619 #define PSA_ALG_CATEGORY_PAKE ((psa_algorithm_t) 0x0a000000) 630 #define PSA_ALG_IS_PAKE(alg) \ 631 (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_PAKE) 748 #define PSA_ALG_JPAKE ((psa_algorithm_t) 0x0a000100) 807 #define PSA_PAKE_ROLE_NONE ((psa_pake_role_t) 0x00) 816 #define PSA_PAKE_ROLE_FIRST ((psa_pake_role_t) 0x01) 825 #define PSA_PAKE_ROLE_SECOND ((psa_pake_role_t) 0x02) 831 #define PSA_PAKE_ROLE_CLIENT ((psa_pake_role_t) 0x11) 837 #define PSA_PAKE_ROLE_SERVER ((psa_pake_role_t) 0x12) 857 #define PSA_PAKE_PRIMITIVE_TYPE_ECC ((psa_pake_primitive_type_t) 0x01) 877 #define PSA_PAKE_PRIMITIVE_TYPE_DH ((psa_pake_primitive_type_t) 0x02) 898 #define PSA_PAKE_PRIMITIVE(pake_type, pake_family, pake_bits) \ 899 ((pake_bits & 0xFFFF) != pake_bits) ? 0 : \ 900 ((psa_pake_primitive_t) (((pake_type) << 24 | \ 901 (pake_family) << 16) | (pake_bits))) 915 #define PSA_PAKE_STEP_KEY_SHARE ((psa_pake_step_t) 0x01) 932 #define PSA_PAKE_STEP_ZK_PUBLIC ((psa_pake_step_t) 0x02) 953 #define PSA_PAKE_STEP_ZK_PROOF ((psa_pake_step_t) 0x03) 977 #define PSA_PAKE_OUTPUT_SIZE(alg, primitive, output_step) \ 978 (alg == PSA_ALG_JPAKE && \ 979 primitive == PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, \ 980 PSA_ECC_FAMILY_SECP_R1, 256) ? \ 982 output_step == PSA_PAKE_STEP_KEY_SHARE ? 65 : \ 983 output_step == PSA_PAKE_STEP_ZK_PUBLIC ? 65 : \ 1007 #define PSA_PAKE_INPUT_SIZE(alg, primitive, input_step) \ 1008 (alg == PSA_ALG_JPAKE && \ 1009 primitive == PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, \ 1010 PSA_ECC_FAMILY_SECP_R1, 256) ? \ 1012 input_step == PSA_PAKE_STEP_KEY_SHARE ? 65 : \ 1013 input_step == PSA_PAKE_STEP_ZK_PUBLIC ? 65 : \ 1028 #define PSA_PAKE_OUTPUT_MAX_SIZE 65 1040 #define PSA_PAKE_INPUT_MAX_SIZE 65 1045 #define PSA_PAKE_CIPHER_SUITE_INIT { PSA_ALG_NONE, 0, 0, 0, PSA_ALG_NONE } 1050 #if defined(MBEDTLS_PSA_CRYPTO_CLIENT) && !defined(MBEDTLS_PSA_CRYPTO_C) 1051 #define PSA_PAKE_OPERATION_INIT { 0 } 1053 #define PSA_PAKE_OPERATION_INIT { 0, PSA_ALG_NONE, 0, PSA_PAKE_OPERATION_STAGE_SETUP, \ 1116 #define PSA_JPAKE_EXPECTED_INPUTS(round) ((round) == PSA_JPAKE_FINISHED ? 0 : \ 1117 ((round) == PSA_JPAKE_FIRST ? 2 : 1)) 1118 #define PSA_JPAKE_EXPECTED_OUTPUTS(round) ((round) == PSA_JPAKE_FINISHED ? 0 : \ 1119 ((round) == PSA_JPAKE_FIRST ? 2 : 1)) 1122 #if defined(MBEDTLS_PSA_CRYPTO_CLIENT) && !defined(MBEDTLS_PSA_CRYPTO_C) 1123mbedtls_psa_client_handle_t handle;
1142 #if defined(PSA_WANT_ALG_JPAKE) 1314 size_t*password_len);
1330 uint8_t*
buffer,
size_tbuffer_size,
size_t*buffer_length);
1376 uint8_t*user_id,
size_tuser_id_size,
size_t*user_id_len);
1394 uint8_t*peer_id,
size_tpeer_id_size,
size_t*peer_id_length);
1570 size_tuser_id_len);
1612 size_tpeer_id_len);
1714 size_t*output_length);
1768 size_tinput_length);
1880cipher_suite->
bits);
1889cipher_suite->
bits= (
uint16_t) (0xFFFF & primitive);
1895 returncipher_suite->
family;
1901 returncipher_suite->
bits;
1907 returncipher_suite->
hash;
1914cipher_suite->
hash= 0;
PSA cryptography module: Backward compatibility aliases.
PSA cryptography module: type aliases.
static const struct attribute attributes[]
static SQLCHAR output[256]
static psa_algorithm_t psa_get_key_enrollment_algorithm(const psa_key_attributes_t *attributes)
Retrieve the enrollment algorithm policy from key attributes.
static void psa_set_key_enrollment_algorithm(psa_key_attributes_t *attributes, psa_algorithm_t alg2)
Declare the enrollment algorithm for a key.
operation
Bit operations.
#define PSA_ALG_IS_PAKE(alg)
Whether the specified algorithm is a password-authenticated key exchange.
uint32_t psa_algorithm_t
Encoding of a cryptographic algorithm.
#define PSA_ALG_IS_HASH(alg)
Whether the specified algorithm is a hash algorithm.
int32_t psa_status_t
Function return status.
uint32_t psa_key_id_t
Encoding of identifiers of persistent keys.
uint32_t psa_key_lifetime_t
Encoding of key lifetimes.
psa_key_id_t mbedtls_svc_key_id_t
Encoding of key identifiers as seen inside the PSA Crypto implementation.
static uint16_t psa_pake_cs_get_bits(const psa_pake_cipher_suite_t *cipher_suite)
Retrieve the PAKE primitive bit-size from a PAKE cipher suite.
psa_status_t psa_pake_set_password_key(psa_pake_operation_t *operation, mbedtls_svc_key_id_t password)
Set the password for a password-authenticated key exchange from key ID.
static psa_pake_primitive_t psa_pake_cs_get_primitive(const psa_pake_cipher_suite_t *cipher_suite)
Retrieve the primitive from a PAKE cipher suite.
psa_status_t psa_pake_abort(psa_pake_operation_t *operation)
Abort a PAKE operation.
psa_status_t psa_crypto_driver_pake_get_password(const psa_crypto_driver_pake_inputs_t *inputs, uint8_t *buffer, size_t buffer_size, size_t *buffer_length)
Get the password from given inputs.
psa_status_t psa_pake_input(psa_pake_operation_t *operation, psa_pake_step_t step, const uint8_t *input, size_t input_length)
Provide input for a step of a password-authenticated key exchange.
uint32_t psa_pake_primitive_t
Encoding of the primitive associated with the PAKE.
static void psa_pake_cs_set_hash(psa_pake_cipher_suite_t *cipher_suite, psa_algorithm_t hash)
Declare the hash algorithm for a PAKE cipher suite.
psa_status_t psa_pake_setup(psa_pake_operation_t *operation, const psa_pake_cipher_suite_t *cipher_suite)
Set the session information for a password-authenticated key exchange.
psa_status_t psa_pake_output(psa_pake_operation_t *operation, psa_pake_step_t step, uint8_t *output, size_t output_size, size_t *output_length)
Get output for a step of a password-authenticated key exchange.
psa_status_t psa_pake_set_user(psa_pake_operation_t *operation, const uint8_t *user_id, size_t user_id_len)
Set the user ID for a password-authenticated key exchange.
static void psa_pake_cs_set_primitive(psa_pake_cipher_suite_t *cipher_suite, psa_pake_primitive_t primitive)
Declare the primitive for a PAKE cipher suite.
static psa_pake_cipher_suite_t psa_pake_cipher_suite_init(void)
Return an initial value for a PAKE cipher suite object.
psa_status_t psa_crypto_driver_pake_get_password_len(const psa_crypto_driver_pake_inputs_t *inputs, size_t *password_len)
Get the length of the password in bytes from given inputs.
static void psa_pake_cs_set_algorithm(psa_pake_cipher_suite_t *cipher_suite, psa_algorithm_t algorithm)
Declare the PAKE algorithm for the cipher suite.
uint8_t psa_pake_role_t
Encoding of the application role of PAKE.
static psa_pake_family_t psa_pake_cs_get_family(const psa_pake_cipher_suite_t *cipher_suite)
Retrieve the PAKE family from a PAKE cipher suite.
psa_status_t psa_pake_set_peer(psa_pake_operation_t *operation, const uint8_t *peer_id, size_t peer_id_len)
Set the peer ID for a password-authenticated key exchange.
static psa_pake_operation_t psa_pake_operation_init(void)
Return an initial value for a PAKE operation object.
uint8_t psa_pake_step_t
Encoding of input and output indicators for PAKE.
psa_status_t psa_crypto_driver_pake_get_peer(const psa_crypto_driver_pake_inputs_t *inputs, uint8_t *peer_id, size_t peer_id_size, size_t *peer_id_length)
Get the peer id from given inputs.
uint8_t psa_pake_primitive_type_t
Encoding of the type of the PAKE's primitive.
psa_status_t psa_crypto_driver_pake_get_peer_len(const psa_crypto_driver_pake_inputs_t *inputs, size_t *peer_len)
Get the length of the peer id in bytes from given inputs.
psa_status_t psa_crypto_driver_pake_get_user_len(const psa_crypto_driver_pake_inputs_t *inputs, size_t *user_len)
Get the length of the user id in bytes from given inputs.
psa_status_t psa_pake_get_implicit_key(psa_pake_operation_t *operation, psa_key_derivation_operation_t *output)
Get implicitly confirmed shared secret from a PAKE.
uint8_t psa_pake_family_t
Encoding of the family of the primitive associated with the PAKE.
psa_status_t psa_crypto_driver_pake_get_user(const psa_crypto_driver_pake_inputs_t *inputs, uint8_t *user_id, size_t user_id_size, size_t *user_id_len)
Get the user id from given inputs.
static psa_algorithm_t psa_pake_cs_get_algorithm(const psa_pake_cipher_suite_t *cipher_suite)
Retrieve the PAKE algorithm from a PAKE cipher suite.
#define PSA_PAKE_PRIMITIVE(pake_type, pake_family, pake_bits)
Construct a PAKE primitive from type, family and bit-size.
psa_status_t psa_pake_set_role(psa_pake_operation_t *operation, psa_pake_role_t role)
Set the application role for a password-authenticated key exchange.
psa_status_t psa_crypto_driver_pake_get_cipher_suite(const psa_crypto_driver_pake_inputs_t *inputs, psa_pake_cipher_suite_t *cipher_suite)
Get the cipher suite from given inputs.
static psa_algorithm_t psa_pake_cs_get_hash(const psa_pake_cipher_suite_t *cipher_suite)
Retrieve the hash algorithm from a PAKE cipher suite.
#define MBEDTLS_PSA_KEY_ID_BUILTIN_MAX
The maximum value for a key identifier that is built into the implementation.
uint64_t psa_drv_slot_number_t
A slot number identifying a key in a driver.
#define MBEDTLS_PSA_KEY_ID_BUILTIN_MIN
The minimum value for a key identifier that is built into the implementation.
int psa_can_do_hash(psa_algorithm_t hash_alg)
Check if PSA is capable of handling the specified hash algorithm.
uint64_t psa_key_slot_number_t
An internal designation of a key slot between the core part of the PSA Crypto implementation and the ...
Macro wrapper for struct's members.
Statistics about resource consumption related to the PSA keystore.
size_t MBEDTLS_PRIVATE(volatile_slots)
Number of slots containing key material for a volatile key.
psa_key_id_t MBEDTLS_PRIVATE(max_open_external_key_id)
Largest key id value among open keys in secure elements.
size_t MBEDTLS_PRIVATE(locked_slots)
Number of slots that are locked.
size_t MBEDTLS_PRIVATE(empty_slots)
Number of slots that are not used for anything.
psa_key_id_t MBEDTLS_PRIVATE(max_open_internal_key_id)
Largest key id value among open keys in internal persistent storage.
size_t MBEDTLS_PRIVATE(half_filled_slots)
Number of slots which are occupied, but do not contain key material yet.
size_t MBEDTLS_PRIVATE(external_slots)
Number of slots containing a reference to a key in a secure element.
size_t MBEDTLS_PRIVATE(persistent_slots)
Number of slots containing key material for a key which is in internal persistent storage.
size_t MBEDTLS_PRIVATE(cache_slots)
Number of slots that contain cache data.
uint8_t * MBEDTLS_PRIVATE(password)
size_t MBEDTLS_PRIVATE(peer_len)
size_t MBEDTLS_PRIVATE(password_len)
uint8_t * MBEDTLS_PRIVATE(user)
size_t MBEDTLS_PRIVATE(user_len)
struct psa_pake_cipher_suite_s MBEDTLS_PRIVATE(cipher_suite)
uint8_t * MBEDTLS_PRIVATE(peer)
uint8_t MBEDTLS_PRIVATE(inputs)
uint8_t MBEDTLS_PRIVATE(outputs)
psa_jpake_io_mode_t MBEDTLS_PRIVATE(io_mode)
psa_jpake_round_t MBEDTLS_PRIVATE(round)
psa_pake_step_t MBEDTLS_PRIVATE(step)
psa_algorithm_t algorithm
psa_pake_primitive_type_t type
psa_algorithm_t MBEDTLS_PRIVATE(alg)
psa_pake_primitive_t MBEDTLS_PRIVATE(primitive)
unsigned int MBEDTLS_PRIVATE(id)
Unique ID indicating which driver got assigned to do the operation.
union psa_pake_operation_s::@990 MBEDTLS_PRIVATE(data)
static CS_CONTEXT * context
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4