![]() |
nRF Connect SDK API 3.3.99
|
Shared internal utilities for the PSA layer. More...
Data Structures | |
| struct | ikg_opaque_key |
Macros | |
| #define | CRACEN_PSA_IS_KEY_FLAG(flag, attr) |
| #define | CRACEN_PSA_IS_KEY_TYPE(flag, attr) |
| #define | cracen_abs(x) |
Functions | |
| __must_check psa_status_t | silex_statuscodes_to_psa (int sx_status) |
| __must_check psa_status_t | hash_get_algo (psa_algorithm_t alg, const struct sxhashalg **sx_hash_algo) |
| psa_status_t | cracen_rnd_in_range (uint8_t *n, size_t sz, const uint8_t *upperlimit, size_t retrylimit) |
| Use cracen_get_random up to generate a random number in the range [1, upperlimit). | |
| void | cracen_xorbytes (uint8_t *a, const uint8_t *b, size_t sz) |
| XOR two byte buffers and store result in first buffer. | |
| psa_status_t | cracen_load_keyref (const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, struct sxkeyref *k) |
| Loads key buffer and attributes. | |
| int | cracen_prepare_ik_key (const uint8_t *user_data) |
| Prepare ik key. | |
| void | cracen_be_add (uint8_t *v, size_t v_size, size_t summand) |
| Compute v = v + summand. | |
| int | cracen_be_sub (const uint8_t *a, const uint8_t *b, uint8_t *c, size_t sz) |
| Compute c = a - b. | |
| void | cracen_be_rshift (const uint8_t *a, int n, uint8_t *r, size_t sz) |
| Compute r = a >> n. | |
| int | cracen_be_cmp (const uint8_t *a, const uint8_t *b, size_t sz, int carry) |
| Big-Endian compare with carry. | |
| void | cracen_be_xor (uint8_t *buf, size_t buf_sz, size_t xor_val) |
| Compute buf = buf ^ xor_val. | |
| int | cracen_hash_all_inputs_with_context (struct sxhash *sxhashopctx, const uint8_t *inputs[], const size_t input_lengths[], size_t input_count, const struct sxhashalg *hashalg, uint8_t *digest) |
| Hash several elements at different locations in memory with a previously created hash context(sxhash) | |
| int | cracen_hash_input_with_context (struct sxhash *hashopctx, const uint8_t *input, const size_t input_length, const struct sxhashalg *hashalg, uint8_t *digest) |
| Hash a single element with a previously created hash context(sxhash) | |
| int | cracen_hash_all_inputs (const uint8_t *inputs[], const size_t input_lengths[], size_t input_count, const struct sxhashalg *hashalg, uint8_t *digest) |
| Hash several elements, managing hardware reservation internally. | |
| int | cracen_hash_input (const uint8_t *input, const size_t input_length, const struct sxhashalg *hashalg, uint8_t *digest) |
| Hash a single input, managing hardware reservation internally. | |
| int | cracen_get_rnd_in_range (const uint8_t *n, size_t nsz, uint8_t *out) |
| Generate a random number within the specified range. | |
Shared internal utilities for the PSA layer.
Shared internal utilities for the CRACEN PSA layer.
Provides big-endian arithmetic helpers, XOR and hashing helpers, key reference loading, and random-in-range generation.