MCUX CLNS
MCUX Crypto Library Normal Secure
Loading...
Searching...
No Matches
mcuxClAes_Constants.h
1/*--------------------------------------------------------------------------*/
2/* Copyright 2022, 2024-2026 NXP */
3/* */
4/* SPDX-License-Identifier: BSD-3-Clause */
5/* */
6/* Redistribution and use in source and binary forms, with or without */
7/* modification, are permitted provided that the following conditions are */
8/* met: */
9/* */
10/* 1. Redistributions of source code must retain the above copyright */
11/* notice, this list of conditions and the following disclaimer. */
12/* */
13/* 2. Redistributions in binary form must reproduce the above copyright */
14/* notice, this list of conditions and the following disclaimer in the */
15/* documentation and/or other materials provided with the distribution. */
16/* */
17/* 3. Neither the name of the copyright holder nor the names of its */
18/* contributors may be used to endorse or promote products derived from */
19/* this software without specific prior written permission. */
20/* */
21/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS */
22/* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED */
23/* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A */
24/* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
25/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
26/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */
27/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR */
28/* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
29/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */
30/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */
31/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
32/*--------------------------------------------------------------------------*/
33
34#ifndef MCUXCLAES_CONSTANTS_H_
35#define MCUXCLAES_CONSTANTS_H_
36
37#include <mcuxClConfig.h> // Exported features flags header
38
39#include <mcuxClKey_Constants.h>
40
41#ifdef __cplusplus
42extern "C" {
43#endif
44
51
52/* Status code */
53#define MCUXCLAES_STATUS_OK ((mcuxClAes_Status_t) 0x0FF92E03U)
54
55/* Block size */
56#define MCUXCLAES_BLOCK_SIZE (16U)
57#define MCUXCLAES_BLOCK_SIZE_IN_WORDS (MCUXCLAES_BLOCK_SIZE / sizeof(uint32_t))
58
59/* Key sizes */
60#define MCUXCLAES_AES128_KEY_SIZE (MCUXCLKEY_SIZE_128)
61#define MCUXCLAES_AES128_KEY_SIZE_IN_WORDS (MCUXCLKEY_SIZE_128_IN_WORDS)
62#define MCUXCLAES_AES192_KEY_SIZE (MCUXCLKEY_SIZE_192)
63#define MCUXCLAES_AES192_KEY_SIZE_IN_WORDS (MCUXCLKEY_SIZE_192_IN_WORDS)
64#define MCUXCLAES_AES256_KEY_SIZE (MCUXCLKEY_SIZE_256)
65#define MCUXCLAES_AES256_KEY_SIZE_IN_WORDS (MCUXCLKEY_SIZE_256_IN_WORDS)
66
67
68/* RFC3394 key wrap/unwrap Key container data sizes */
69#define MCUXCLAES_ENCODING_RFC3394_BLOCK_SIZE (8U)
70#define MCUXCLAES_ENCODING_RFC3394_AES128_KEY_SIZE (MCUXCLAES_AES128_KEY_SIZE + MCUXCLAES_ENCODING_RFC3394_BLOCK_SIZE)
71#define MCUXCLAES_ENCODING_RFC3394_AES128_KEY_SIZE_IN_WORDS (MCUXCLAES_ENCODING_RFC3394_AES128_KEY_SIZE / sizeof(uint32_t))
72#define MCUXCLAES_ENCODING_RFC3394_AES256_KEY_SIZE (MCUXCLAES_AES256_KEY_SIZE + MCUXCLAES_ENCODING_RFC3394_BLOCK_SIZE)
73#define MCUXCLAES_ENCODING_RFC3394_AES256_KEY_SIZE_IN_WORDS (MCUXCLAES_ENCODING_RFC3394_AES256_KEY_SIZE / sizeof(uint32_t))
74
75 /* mcuxClAes_Constants */
79
80#ifdef __cplusplus
81} /* extern "C" */
82#endif
83
84#endif /* MCUXCLAES_CONSTANTS_H_ */
Constants for the mcuxClKey component.