nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches
cracen_sw_common.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2025 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
17#ifndef CRACEN_SW_COMMON_H
18#define CRACEN_SW_COMMON_H
19
20#include <stddef.h>
21#include <stdint.h>
22#include <psa/crypto.h>
23#include <sxsymcrypt/keyref.h>
24
41psa_status_t cracen_sw_aes_ecb_encrypt(struct sxblkcipher *blkciph, const struct sxkeyref *key,
42 const uint8_t *input, size_t input_length, uint8_t *output,
43 size_t output_size, size_t *output_length);
44
60psa_status_t cracen_sw_aes_ecb_decrypt(struct sxblkcipher *blkciph, const struct sxkeyref *key,
61 const uint8_t *input, size_t input_length, uint8_t *output,
62 size_t output_size, size_t *output_length);
63
76psa_status_t cracen_sw_aes_primitive(struct sxblkcipher *blkciph, const struct sxkeyref *key,
77 const uint8_t *input, uint8_t *output);
78
90psa_status_t cracen_sw_increment_counter_be(uint8_t *ctr_buf, size_t ctr_buf_size,
91 size_t start_pos);
92
102void cracen_sw_encode_value_be(uint8_t *buffer, size_t buffer_size, size_t value,
103 size_t value_size);
104
107#endif /* CRACEN_SW_COMMON_H */
int32_t psa_status_t
Definition error.h:26
psa_status_t cracen_sw_increment_counter_be(uint8_t *ctr_buf, size_t ctr_buf_size, size_t start_pos)
Increment counter value stored as a big endian buffer.
psa_status_t cracen_sw_aes_ecb_decrypt(struct sxblkcipher *blkciph, const struct sxkeyref *key, const uint8_t *input, size_t input_length, uint8_t *output, size_t output_size, size_t *output_length)
Decrypt a single AES block using ECB mode.
void cracen_sw_encode_value_be(uint8_t *buffer, size_t buffer_size, size_t value, size_t value_size)
Encode value as big-endian, right-aligned in buffer.
psa_status_t cracen_sw_aes_ecb_encrypt(struct sxblkcipher *blkciph, const struct sxkeyref *key, const uint8_t *input, size_t input_length, uint8_t *output, size_t output_size, size_t *output_length)
Encrypt a single AES block using ECB mode.
psa_status_t cracen_sw_aes_primitive(struct sxblkcipher *blkciph, const struct sxkeyref *key, const uint8_t *input, uint8_t *output)
Perform a single AES block encryption operation.