Skip to content

Commit 35bf8e1

Browse files
committed
AES ECB for NUCLEO_F439ZI
+---------------------------+--------+--------+--------+ | test case | passed | failed | result | +---------------------------+--------+--------+--------+ | mbedtls_aes_self_test | 1 | 0 | OK | | mbedtls_entropy_self_test | 1 | 0 | OK | | mbedtls_sha256_self_test | 1 | 0 | OK | | mbedtls_sha512_self_test | 1 | 0 | OK | +---------------------------+--------+--------+--------+
1 parent 3a27568 commit 35bf8e1

File tree

5 files changed

+797
-1
lines changed

5 files changed

+797
-1
lines changed

TESTS/mbedtls/selftest/main.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ using namespace utest::v1;
3232
#include "mbedtls/sha512.h"
3333
#include "mbedtls/entropy.h"
3434
#include "mbedtls/entropy_poll.h"
35+
#include "mbedtls/aes.h"
3536

3637
#include <string.h>
3738

@@ -67,6 +68,9 @@ MBEDTLS_SELF_TEST_TEST_CASE(mbedtls_sha512_self_test)
6768
MBEDTLS_SELF_TEST_TEST_CASE(mbedtls_entropy_self_test)
6869
#endif
6970

71+
#if defined(MBEDTLS_AES_C)
72+
MBEDTLS_SELF_TEST_TEST_CASE(mbedtls_aes_self_test)
73+
#endif
7074
#else
7175
#warning "MBEDTLS_SELF_TEST not enabled"
7276
#endif /* MBEDTLS_SELF_TEST */
@@ -86,6 +90,9 @@ Case cases[] = {
8690
Case("mbedtls_entropy_self_test", mbedtls_entropy_self_test_test_case),
8791
#endif
8892

93+
#if defined(MBEDTLS_AES_C)
94+
Case("mbedtls_aes_self_test",mbedtls_aes_self_test_test_case),
95+
#endif
8996
#endif /* MBEDTLS_SELF_TEST */
9097
};
9198

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* mbedtls_device.h
3+
*******************************************************************************
4+
* Copyright (c) 2017, STMicroelectronics
5+
* SPDX-License-Identifier: Apache-2.0
6+
*
7+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
8+
* not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
*
19+
*/
20+
#ifndef MBEDTLS_DEVICE_H
21+
#define MBEDTLS_DEVICE_H
22+
23+
24+
#define MBEDTLS_AES_SETKEY_ENC_ALT
25+
#define MBEDTLS_AES_SETKEY_DEC_ALT
26+
#define MBEDTLS_AES_ENCRYPT_ALT
27+
#define MBEDTLS_AES_DECRYPT_ALT
28+
29+
30+
#endif /* MBEDTLS_DEVICE_H */

0 commit comments

Comments
 (0)