nrfxlib API 0.1.0
Loading...
Searching...
No Matches
mpsl_ecb.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef MPSL_ECB_H__
8#define MPSL_ECB_H__
9
10#include <stdint.h>
11
12#define MPSL_ECB_KEY_LENGTH (16)
13#define MPSL_ECB_CLEARTEXT_LENGTH (16)
14#define MPSL_ECB_CIPHERTEXT_LENGTH (MPSL_ECB_CLEARTEXT_LENGTH)
17typedef struct
18{
19 uint32_t key[MPSL_ECB_KEY_LENGTH/sizeof(uint32_t)];
20 uint8_t cleartext[MPSL_ECB_CLEARTEXT_LENGTH];
21 uint8_t ciphertext[MPSL_ECB_CIPHERTEXT_LENGTH];
23
24#define MPSL_ECB_NO_FLAGS (0)
25#define MPSL_ECB_INPUT_LE (1u << 0)
26#define MPSL_ECB_OUTPUT_LE (1u << 1)
27#define MPSL_ECB_CLEARTEXT_IN_LOCAL_RAM (1u << 2)
28
38
53 const uint8_t cleartext[MPSL_ECB_CLEARTEXT_LENGTH],
54 uint8_t ciphertext[MPSL_ECB_CIPHERTEXT_LENGTH],
55 uint32_t flags);
56
57#endif /* MPSL_ECB_H__ */
#define MPSL_ECB_KEY_LENGTH
Definition: mpsl_ecb.h:12
#define MPSL_ECB_CLEARTEXT_LENGTH
Definition: mpsl_ecb.h:13
#define MPSL_ECB_CIPHERTEXT_LENGTH
Definition: mpsl_ecb.h:14
void mpsl_ecb_block_encrypt_extended(const uint8_t key[(16)], const uint8_t cleartext[(16)], uint8_t ciphertext[((16))], uint32_t flags)
Encrypts a block according to the specified parameters.
void mpsl_ecb_block_encrypt(mpsl_ecb_hal_data_t *p_ecb_data)
Encrypts a block according to the specified parameters.
AES ECB data structure.
Definition: mpsl_ecb.h:18