From 50d8535b4f3d129d50e07dbcff9dc2c98adcf087 Mon Sep 17 00:00:00 2001 From: Shen Weilong Date: Tue, 4 Mar 2025 15:23:22 +0800 Subject: [PATCH] change(bt): moved porting/ext/tinycrypt into common --- components/bt/CMakeLists.txt | 32 +++++++++---------- .../{porting/ext => common}/tinycrypt/AUTHORS | 0 .../{porting/ext => common}/tinycrypt/LICENSE | 0 .../{porting/ext => common}/tinycrypt/README | 0 .../{porting/ext => common}/tinycrypt/VERSION | 0 .../tinycrypt/documentation/tinycrypt.rst | 0 .../tinycrypt/include/tinycrypt/aes.h | 6 +++- .../tinycrypt/include/tinycrypt/cbc_mode.h | 6 +++- .../tinycrypt/include/tinycrypt/ccm_mode.h | 6 +++- .../tinycrypt/include/tinycrypt/cmac_mode.h | 6 +++- .../tinycrypt/include/tinycrypt/constants.h | 6 +++- .../tinycrypt/include/tinycrypt/ctr_mode.h | 6 +++- .../tinycrypt/include/tinycrypt/ctr_prng.h | 6 ++++ .../tinycrypt/include/tinycrypt/ecc.h | 6 ++++ .../tinycrypt/include/tinycrypt/ecc_dh.h | 6 +++- .../tinycrypt/include/tinycrypt/ecc_dsa.h | 6 ++++ .../include/tinycrypt/ecc_platform_specific.h | 6 +++- .../tinycrypt/include/tinycrypt/hmac.h | 8 +++-- .../tinycrypt/include/tinycrypt/hmac_prng.h | 6 +++- .../tinycrypt/include/tinycrypt/sha256.h | 6 ++++ .../tinycrypt/include/tinycrypt/utils.h | 6 ++++ .../tinycrypt/src/aes_decrypt.c | 8 ++++- .../tinycrypt/src/aes_encrypt.c | 6 ++++ .../ext => common}/tinycrypt/src/cbc_mode.c | 6 +++- .../ext => common}/tinycrypt/src/ccm_mode.c | 8 ++++- .../ext => common}/tinycrypt/src/cmac_mode.c | 6 +++- .../ext => common}/tinycrypt/src/ctr_mode.c | 6 ++++ .../ext => common}/tinycrypt/src/ctr_prng.c | 6 +++- .../ext => common}/tinycrypt/src/ecc.c | 6 +++- .../ext => common}/tinycrypt/src/ecc_dh.c | 6 +++- .../ext => common}/tinycrypt/src/ecc_dsa.c | 6 +++- .../tinycrypt/src/ecc_platform_specific.c | 6 ++++ .../ext => common}/tinycrypt/src/hmac.c | 6 +++- .../ext => common}/tinycrypt/src/hmac_prng.c | 8 ++++- .../ext => common}/tinycrypt/src/sha256.c | 6 +++- .../ext => common}/tinycrypt/src/utils.c | 8 ++++- components/bt/host/nimble/nimble | 2 +- 37 files changed, 184 insertions(+), 40 deletions(-) rename components/bt/{porting/ext => common}/tinycrypt/AUTHORS (100%) rename components/bt/{porting/ext => common}/tinycrypt/LICENSE (100%) rename components/bt/{porting/ext => common}/tinycrypt/README (100%) rename components/bt/{porting/ext => common}/tinycrypt/VERSION (100%) rename components/bt/{porting/ext => common}/tinycrypt/documentation/tinycrypt.rst (100%) rename components/bt/{porting/ext => common}/tinycrypt/include/tinycrypt/aes.h (97%) rename components/bt/{porting/ext => common}/tinycrypt/include/tinycrypt/cbc_mode.h (98%) rename components/bt/{porting/ext => common}/tinycrypt/include/tinycrypt/ccm_mode.h (98%) rename components/bt/{porting/ext => common}/tinycrypt/include/tinycrypt/cmac_mode.h (98%) rename components/bt/{porting/ext => common}/tinycrypt/include/tinycrypt/constants.h (94%) rename components/bt/{porting/ext => common}/tinycrypt/include/tinycrypt/ctr_mode.h (97%) rename components/bt/{porting/ext => common}/tinycrypt/include/tinycrypt/ctr_prng.h (98%) rename components/bt/{porting/ext => common}/tinycrypt/include/tinycrypt/ecc.h (99%) rename components/bt/{porting/ext => common}/tinycrypt/include/tinycrypt/ecc_dh.h (97%) rename components/bt/{porting/ext => common}/tinycrypt/include/tinycrypt/ecc_dsa.h (98%) rename components/bt/{porting/ext => common}/tinycrypt/include/tinycrypt/ecc_platform_specific.h (97%) rename components/bt/{porting/ext => common}/tinycrypt/include/tinycrypt/hmac.h (96%) rename components/bt/{porting/ext => common}/tinycrypt/include/tinycrypt/hmac_prng.h (98%) rename components/bt/{porting/ext => common}/tinycrypt/include/tinycrypt/sha256.h (97%) rename components/bt/{porting/ext => common}/tinycrypt/include/tinycrypt/utils.h (96%) rename components/bt/{porting/ext => common}/tinycrypt/src/aes_decrypt.c (98%) rename components/bt/{porting/ext => common}/tinycrypt/src/aes_encrypt.c (98%) rename components/bt/{porting/ext => common}/tinycrypt/src/cbc_mode.c (96%) rename components/bt/{porting/ext => common}/tinycrypt/src/ccm_mode.c (98%) rename components/bt/{porting/ext => common}/tinycrypt/src/cmac_mode.c (98%) rename components/bt/{porting/ext => common}/tinycrypt/src/ctr_mode.c (96%) rename components/bt/{porting/ext => common}/tinycrypt/src/ctr_prng.c (98%) rename components/bt/{porting/ext => common}/tinycrypt/src/ecc.c (99%) rename components/bt/{porting/ext => common}/tinycrypt/src/ecc_dh.c (98%) rename components/bt/{porting/ext => common}/tinycrypt/src/ecc_dsa.c (98%) rename components/bt/{porting/ext => common}/tinycrypt/src/ecc_platform_specific.c (97%) rename components/bt/{porting/ext => common}/tinycrypt/src/hmac.c (97%) rename components/bt/{porting/ext => common}/tinycrypt/src/hmac_prng.c (98%) rename components/bt/{porting/ext => common}/tinycrypt/src/sha256.c (98%) rename components/bt/{porting/ext => common}/tinycrypt/src/utils.c (95%) diff --git a/components/bt/CMakeLists.txt b/components/bt/CMakeLists.txt index d3be3340a2..f7e82adb6d 100644 --- a/components/bt/CMakeLists.txt +++ b/components/bt/CMakeLists.txt @@ -644,23 +644,23 @@ if(CONFIG_BT_ENABLED) if(NOT (CONFIG_BT_LE_CRYPTO_STACK_MBEDTLS OR CONFIG_BT_NIMBLE_CRYPTO_STACK_MBEDTLS)) list(APPEND include_dirs - porting/ext/tinycrypt/include + common/tinycrypt/include ) - list(APPEND srcs "porting/ext/tinycrypt/src/utils.c" - "porting/ext/tinycrypt/src/sha256.c" - "porting/ext/tinycrypt/src/ecc.c" - "porting/ext/tinycrypt/src/ctr_prng.c" - "porting/ext/tinycrypt/src/ctr_mode.c" - "porting/ext/tinycrypt/src/aes_decrypt.c" - "porting/ext/tinycrypt/src/aes_encrypt.c" - "porting/ext/tinycrypt/src/ccm_mode.c" - "porting/ext/tinycrypt/src/ecc_dsa.c" - "porting/ext/tinycrypt/src/cmac_mode.c" - "porting/ext/tinycrypt/src/ecc_dh.c" - "porting/ext/tinycrypt/src/hmac_prng.c" - "porting/ext/tinycrypt/src/ecc_platform_specific.c" - "porting/ext/tinycrypt/src/hmac.c" - "porting/ext/tinycrypt/src/cbc_mode.c") + list(APPEND srcs "common/tinycrypt/src/utils.c" + "common/tinycrypt/src/sha256.c" + "common/tinycrypt/src/ecc.c" + "common/tinycrypt/src/ctr_prng.c" + "common/tinycrypt/src/ctr_mode.c" + "common/tinycrypt/src/aes_decrypt.c" + "common/tinycrypt/src/aes_encrypt.c" + "common/tinycrypt/src/ccm_mode.c" + "common/tinycrypt/src/ecc_dsa.c" + "common/tinycrypt/src/cmac_mode.c" + "common/tinycrypt/src/ecc_dh.c" + "common/tinycrypt/src/hmac_prng.c" + "common/tinycrypt/src/ecc_platform_specific.c" + "common/tinycrypt/src/hmac.c" + "common/tinycrypt/src/cbc_mode.c") endif() if(CONFIG_BT_NIMBLE_ENABLED) diff --git a/components/bt/porting/ext/tinycrypt/AUTHORS b/components/bt/common/tinycrypt/AUTHORS similarity index 100% rename from components/bt/porting/ext/tinycrypt/AUTHORS rename to components/bt/common/tinycrypt/AUTHORS diff --git a/components/bt/porting/ext/tinycrypt/LICENSE b/components/bt/common/tinycrypt/LICENSE similarity index 100% rename from components/bt/porting/ext/tinycrypt/LICENSE rename to components/bt/common/tinycrypt/LICENSE diff --git a/components/bt/porting/ext/tinycrypt/README b/components/bt/common/tinycrypt/README similarity index 100% rename from components/bt/porting/ext/tinycrypt/README rename to components/bt/common/tinycrypt/README diff --git a/components/bt/porting/ext/tinycrypt/VERSION b/components/bt/common/tinycrypt/VERSION similarity index 100% rename from components/bt/porting/ext/tinycrypt/VERSION rename to components/bt/common/tinycrypt/VERSION diff --git a/components/bt/porting/ext/tinycrypt/documentation/tinycrypt.rst b/components/bt/common/tinycrypt/documentation/tinycrypt.rst similarity index 100% rename from components/bt/porting/ext/tinycrypt/documentation/tinycrypt.rst rename to components/bt/common/tinycrypt/documentation/tinycrypt.rst diff --git a/components/bt/porting/ext/tinycrypt/include/tinycrypt/aes.h b/components/bt/common/tinycrypt/include/tinycrypt/aes.h similarity index 97% rename from components/bt/porting/ext/tinycrypt/include/tinycrypt/aes.h rename to components/bt/common/tinycrypt/include/tinycrypt/aes.h index 885c02e089..04f6de5085 100644 --- a/components/bt/porting/ext/tinycrypt/include/tinycrypt/aes.h +++ b/components/bt/common/tinycrypt/include/tinycrypt/aes.h @@ -1,4 +1,8 @@ -/* aes.h - TinyCrypt interface to an AES-128 implementation */ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ /* * Copyright (C) 2017 by Intel Corporation, All Rights Reserved. diff --git a/components/bt/porting/ext/tinycrypt/include/tinycrypt/cbc_mode.h b/components/bt/common/tinycrypt/include/tinycrypt/cbc_mode.h similarity index 98% rename from components/bt/porting/ext/tinycrypt/include/tinycrypt/cbc_mode.h rename to components/bt/common/tinycrypt/include/tinycrypt/cbc_mode.h index 4a837fd01a..dadc59fc8e 100644 --- a/components/bt/porting/ext/tinycrypt/include/tinycrypt/cbc_mode.h +++ b/components/bt/common/tinycrypt/include/tinycrypt/cbc_mode.h @@ -1,4 +1,8 @@ -/* cbc_mode.h - TinyCrypt interface to a CBC mode implementation */ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ /* * Copyright (C) 2017 by Intel Corporation, All Rights Reserved. diff --git a/components/bt/porting/ext/tinycrypt/include/tinycrypt/ccm_mode.h b/components/bt/common/tinycrypt/include/tinycrypt/ccm_mode.h similarity index 98% rename from components/bt/porting/ext/tinycrypt/include/tinycrypt/ccm_mode.h rename to components/bt/common/tinycrypt/include/tinycrypt/ccm_mode.h index 69c798e2f5..af9d79ba39 100644 --- a/components/bt/porting/ext/tinycrypt/include/tinycrypt/ccm_mode.h +++ b/components/bt/common/tinycrypt/include/tinycrypt/ccm_mode.h @@ -1,4 +1,8 @@ -/* ccm_mode.h - TinyCrypt interface to a CCM mode implementation */ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ /* * Copyright (C) 2017 by Intel Corporation, All Rights Reserved. diff --git a/components/bt/porting/ext/tinycrypt/include/tinycrypt/cmac_mode.h b/components/bt/common/tinycrypt/include/tinycrypt/cmac_mode.h similarity index 98% rename from components/bt/porting/ext/tinycrypt/include/tinycrypt/cmac_mode.h rename to components/bt/common/tinycrypt/include/tinycrypt/cmac_mode.h index f44b0a53c1..e1cf7d5698 100644 --- a/components/bt/porting/ext/tinycrypt/include/tinycrypt/cmac_mode.h +++ b/components/bt/common/tinycrypt/include/tinycrypt/cmac_mode.h @@ -1,4 +1,8 @@ -/* cmac_mode.h -- interface to a CMAC implementation */ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ /* * Copyright (C) 2017 by Intel Corporation, All Rights Reserved diff --git a/components/bt/porting/ext/tinycrypt/include/tinycrypt/constants.h b/components/bt/common/tinycrypt/include/tinycrypt/constants.h similarity index 94% rename from components/bt/porting/ext/tinycrypt/include/tinycrypt/constants.h rename to components/bt/common/tinycrypt/include/tinycrypt/constants.h index 965490e00c..3abe98dbbf 100644 --- a/components/bt/porting/ext/tinycrypt/include/tinycrypt/constants.h +++ b/components/bt/common/tinycrypt/include/tinycrypt/constants.h @@ -1,4 +1,8 @@ -/* constants.h - TinyCrypt interface to constants */ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ /* * Copyright (C) 2017 by Intel Corporation, All Rights Reserved. diff --git a/components/bt/porting/ext/tinycrypt/include/tinycrypt/ctr_mode.h b/components/bt/common/tinycrypt/include/tinycrypt/ctr_mode.h similarity index 97% rename from components/bt/porting/ext/tinycrypt/include/tinycrypt/ctr_mode.h rename to components/bt/common/tinycrypt/include/tinycrypt/ctr_mode.h index dc221f9ee7..1b0bab4323 100644 --- a/components/bt/porting/ext/tinycrypt/include/tinycrypt/ctr_mode.h +++ b/components/bt/common/tinycrypt/include/tinycrypt/ctr_mode.h @@ -1,4 +1,8 @@ -/* ctr_mode.h - TinyCrypt interface to CTR mode */ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ /* * Copyright (C) 2017 by Intel Corporation, All Rights Reserved. diff --git a/components/bt/porting/ext/tinycrypt/include/tinycrypt/ctr_prng.h b/components/bt/common/tinycrypt/include/tinycrypt/ctr_prng.h similarity index 98% rename from components/bt/porting/ext/tinycrypt/include/tinycrypt/ctr_prng.h rename to components/bt/common/tinycrypt/include/tinycrypt/ctr_prng.h index 69cbe020ad..ecff008ded 100644 --- a/components/bt/porting/ext/tinycrypt/include/tinycrypt/ctr_prng.h +++ b/components/bt/common/tinycrypt/include/tinycrypt/ctr_prng.h @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + /* ctr_prng.h - TinyCrypt interface to a CTR-PRNG implementation */ /* diff --git a/components/bt/porting/ext/tinycrypt/include/tinycrypt/ecc.h b/components/bt/common/tinycrypt/include/tinycrypt/ecc.h similarity index 99% rename from components/bt/porting/ext/tinycrypt/include/tinycrypt/ecc.h rename to components/bt/common/tinycrypt/include/tinycrypt/ecc.h index e8357320ab..d963ae3c08 100644 --- a/components/bt/porting/ext/tinycrypt/include/tinycrypt/ecc.h +++ b/components/bt/common/tinycrypt/include/tinycrypt/ecc.h @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + /* ecc.h - TinyCrypt interface to common ECC functions */ /* Copyright (c) 2014, Kenneth MacKay diff --git a/components/bt/porting/ext/tinycrypt/include/tinycrypt/ecc_dh.h b/components/bt/common/tinycrypt/include/tinycrypt/ecc_dh.h similarity index 97% rename from components/bt/porting/ext/tinycrypt/include/tinycrypt/ecc_dh.h rename to components/bt/common/tinycrypt/include/tinycrypt/ecc_dh.h index b828e195db..e28e8a6538 100644 --- a/components/bt/porting/ext/tinycrypt/include/tinycrypt/ecc_dh.h +++ b/components/bt/common/tinycrypt/include/tinycrypt/ecc_dh.h @@ -1,4 +1,8 @@ -/* ecc_dh.h - TinyCrypt interface to EC-DH implementation */ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ /* * Copyright (c) 2014, Kenneth MacKay diff --git a/components/bt/porting/ext/tinycrypt/include/tinycrypt/ecc_dsa.h b/components/bt/common/tinycrypt/include/tinycrypt/ecc_dsa.h similarity index 98% rename from components/bt/porting/ext/tinycrypt/include/tinycrypt/ecc_dsa.h rename to components/bt/common/tinycrypt/include/tinycrypt/ecc_dsa.h index aca00bc95e..76181088e3 100644 --- a/components/bt/porting/ext/tinycrypt/include/tinycrypt/ecc_dsa.h +++ b/components/bt/common/tinycrypt/include/tinycrypt/ecc_dsa.h @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + /* ecc_dh.h - TinyCrypt interface to EC-DSA implementation */ /* diff --git a/components/bt/porting/ext/tinycrypt/include/tinycrypt/ecc_platform_specific.h b/components/bt/common/tinycrypt/include/tinycrypt/ecc_platform_specific.h similarity index 97% rename from components/bt/porting/ext/tinycrypt/include/tinycrypt/ecc_platform_specific.h rename to components/bt/common/tinycrypt/include/tinycrypt/ecc_platform_specific.h index a55adf4f6a..553c8a03de 100644 --- a/components/bt/porting/ext/tinycrypt/include/tinycrypt/ecc_platform_specific.h +++ b/components/bt/common/tinycrypt/include/tinycrypt/ecc_platform_specific.h @@ -1,4 +1,8 @@ -/* uECC_platform_specific.h - Interface to platform specific functions*/ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ /* Copyright (c) 2014, Kenneth MacKay * All rights reserved. diff --git a/components/bt/porting/ext/tinycrypt/include/tinycrypt/hmac.h b/components/bt/common/tinycrypt/include/tinycrypt/hmac.h similarity index 96% rename from components/bt/porting/ext/tinycrypt/include/tinycrypt/hmac.h rename to components/bt/common/tinycrypt/include/tinycrypt/hmac.h index 3a081494a8..1f624ef827 100644 --- a/components/bt/porting/ext/tinycrypt/include/tinycrypt/hmac.h +++ b/components/bt/common/tinycrypt/include/tinycrypt/hmac.h @@ -1,4 +1,8 @@ -/* hmac.h - TinyCrypt interface to an HMAC implementation */ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ /* * Copyright (C) 2017 by Intel Corporation, All Rights Reserved. @@ -124,7 +128,7 @@ int tc_hmac_update(TCHmacState_t ctx, const void *data, * key == NULL or * taglen != TC_SHA256_DIGEST_SIZE * @note ctx is erased before exiting. This should never be changed/removed. - * @note Assumes the tag bufer is at least sizeof(hmac_tag_size(state)) bytes + * @note Assumes the tag buffer is at least sizeof(hmac_tag_size(state)) bytes * state has been initialized by tc_hmac_init * @param tag IN/OUT -- buffer to receive computed HMAC tag * @param taglen IN -- size of tag in bytes diff --git a/components/bt/porting/ext/tinycrypt/include/tinycrypt/hmac_prng.h b/components/bt/common/tinycrypt/include/tinycrypt/hmac_prng.h similarity index 98% rename from components/bt/porting/ext/tinycrypt/include/tinycrypt/hmac_prng.h rename to components/bt/common/tinycrypt/include/tinycrypt/hmac_prng.h index ad12cbbf0f..98c2e70c31 100644 --- a/components/bt/porting/ext/tinycrypt/include/tinycrypt/hmac_prng.h +++ b/components/bt/common/tinycrypt/include/tinycrypt/hmac_prng.h @@ -1,4 +1,8 @@ -/* hmac_prng.h - TinyCrypt interface to an HMAC-PRNG implementation */ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ /* * Copyright (C) 2017 by Intel Corporation, All Rights Reserved. diff --git a/components/bt/porting/ext/tinycrypt/include/tinycrypt/sha256.h b/components/bt/common/tinycrypt/include/tinycrypt/sha256.h similarity index 97% rename from components/bt/porting/ext/tinycrypt/include/tinycrypt/sha256.h rename to components/bt/common/tinycrypt/include/tinycrypt/sha256.h index af5e8baf79..860665eeaf 100644 --- a/components/bt/porting/ext/tinycrypt/include/tinycrypt/sha256.h +++ b/components/bt/common/tinycrypt/include/tinycrypt/sha256.h @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + /* sha256.h - TinyCrypt interface to a SHA-256 implementation */ /* diff --git a/components/bt/porting/ext/tinycrypt/include/tinycrypt/utils.h b/components/bt/common/tinycrypt/include/tinycrypt/utils.h similarity index 96% rename from components/bt/porting/ext/tinycrypt/include/tinycrypt/utils.h rename to components/bt/common/tinycrypt/include/tinycrypt/utils.h index bab5c3202e..18224c894e 100644 --- a/components/bt/porting/ext/tinycrypt/include/tinycrypt/utils.h +++ b/components/bt/common/tinycrypt/include/tinycrypt/utils.h @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + /* utils.h - TinyCrypt interface to platform-dependent run-time operations */ /* diff --git a/components/bt/porting/ext/tinycrypt/src/aes_decrypt.c b/components/bt/common/tinycrypt/src/aes_decrypt.c similarity index 98% rename from components/bt/porting/ext/tinycrypt/src/aes_decrypt.c rename to components/bt/common/tinycrypt/src/aes_decrypt.c index 993a6180ce..7da523491f 100644 --- a/components/bt/porting/ext/tinycrypt/src/aes_decrypt.c +++ b/components/bt/common/tinycrypt/src/aes_decrypt.c @@ -1,4 +1,8 @@ -/* aes_decrypt.c - TinyCrypt implementation of AES decryption procedure */ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ /* * Copyright (C) 2017 by Intel Corporation, All Rights Reserved. @@ -30,6 +34,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ +/* aes_decrypt.c - TinyCrypt implementation of AES decryption procedure */ + #include #include #include diff --git a/components/bt/porting/ext/tinycrypt/src/aes_encrypt.c b/components/bt/common/tinycrypt/src/aes_encrypt.c similarity index 98% rename from components/bt/porting/ext/tinycrypt/src/aes_encrypt.c rename to components/bt/common/tinycrypt/src/aes_encrypt.c index 8991aee522..7095695dfa 100644 --- a/components/bt/porting/ext/tinycrypt/src/aes_encrypt.c +++ b/components/bt/common/tinycrypt/src/aes_encrypt.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + /* aes_encrypt.c - TinyCrypt implementation of AES encryption procedure */ /* diff --git a/components/bt/porting/ext/tinycrypt/src/cbc_mode.c b/components/bt/common/tinycrypt/src/cbc_mode.c similarity index 96% rename from components/bt/porting/ext/tinycrypt/src/cbc_mode.c rename to components/bt/common/tinycrypt/src/cbc_mode.c index 62d7879ebd..86a00c8da6 100644 --- a/components/bt/porting/ext/tinycrypt/src/cbc_mode.c +++ b/components/bt/common/tinycrypt/src/cbc_mode.c @@ -1,4 +1,8 @@ -/* cbc_mode.c - TinyCrypt implementation of CBC mode encryption & decryption */ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ /* * Copyright (C) 2017 by Intel Corporation, All Rights Reserved. diff --git a/components/bt/porting/ext/tinycrypt/src/ccm_mode.c b/components/bt/common/tinycrypt/src/ccm_mode.c similarity index 98% rename from components/bt/porting/ext/tinycrypt/src/ccm_mode.c rename to components/bt/common/tinycrypt/src/ccm_mode.c index 929adac630..4017d249df 100644 --- a/components/bt/porting/ext/tinycrypt/src/ccm_mode.c +++ b/components/bt/common/tinycrypt/src/ccm_mode.c @@ -1,4 +1,8 @@ -/* ccm_mode.c - TinyCrypt implementation of CCM mode */ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ /* * Copyright (C) 2017 by Intel Corporation, All Rights Reserved. @@ -30,6 +34,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ +/* ccm_mode.c - TinyCrypt implementation of CCM mode */ + #include #include #include diff --git a/components/bt/porting/ext/tinycrypt/src/cmac_mode.c b/components/bt/common/tinycrypt/src/cmac_mode.c similarity index 98% rename from components/bt/porting/ext/tinycrypt/src/cmac_mode.c rename to components/bt/common/tinycrypt/src/cmac_mode.c index 96d147e809..c3e2c4ee31 100644 --- a/components/bt/porting/ext/tinycrypt/src/cmac_mode.c +++ b/components/bt/common/tinycrypt/src/cmac_mode.c @@ -1,4 +1,8 @@ -/* cmac_mode.c - TinyCrypt CMAC mode implementation */ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ /* * Copyright (C) 2017 by Intel Corporation, All Rights Reserved. diff --git a/components/bt/porting/ext/tinycrypt/src/ctr_mode.c b/components/bt/common/tinycrypt/src/ctr_mode.c similarity index 96% rename from components/bt/porting/ext/tinycrypt/src/ctr_mode.c rename to components/bt/common/tinycrypt/src/ctr_mode.c index 1dfb92dfec..96d03a5bed 100644 --- a/components/bt/porting/ext/tinycrypt/src/ctr_mode.c +++ b/components/bt/common/tinycrypt/src/ctr_mode.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + /* ctr_mode.c - TinyCrypt CTR mode implementation */ /* diff --git a/components/bt/porting/ext/tinycrypt/src/ctr_prng.c b/components/bt/common/tinycrypt/src/ctr_prng.c similarity index 98% rename from components/bt/porting/ext/tinycrypt/src/ctr_prng.c rename to components/bt/common/tinycrypt/src/ctr_prng.c index 5090c3975e..009c7de20a 100644 --- a/components/bt/porting/ext/tinycrypt/src/ctr_prng.c +++ b/components/bt/common/tinycrypt/src/ctr_prng.c @@ -1,4 +1,8 @@ -/* ctr_prng.c - TinyCrypt implementation of CTR-PRNG */ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ /* * Copyright (c) 2016, Chris Morrison diff --git a/components/bt/porting/ext/tinycrypt/src/ecc.c b/components/bt/common/tinycrypt/src/ecc.c similarity index 99% rename from components/bt/porting/ext/tinycrypt/src/ecc.c rename to components/bt/common/tinycrypt/src/ecc.c index 03d9187f3a..97737882e4 100644 --- a/components/bt/porting/ext/tinycrypt/src/ecc.c +++ b/components/bt/common/tinycrypt/src/ecc.c @@ -1,4 +1,8 @@ -/* ecc.c - TinyCrypt implementation of common ECC functions */ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ /* * Copyright (c) 2014, Kenneth MacKay diff --git a/components/bt/porting/ext/tinycrypt/src/ecc_dh.c b/components/bt/common/tinycrypt/src/ecc_dh.c similarity index 98% rename from components/bt/porting/ext/tinycrypt/src/ecc_dh.c rename to components/bt/common/tinycrypt/src/ecc_dh.c index ecd8df3b70..fab692da80 100644 --- a/components/bt/porting/ext/tinycrypt/src/ecc_dh.c +++ b/components/bt/common/tinycrypt/src/ecc_dh.c @@ -1,4 +1,8 @@ -/* ec_dh.c - TinyCrypt implementation of EC-DH */ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ /* * Copyright (c) 2014, Kenneth MacKay diff --git a/components/bt/porting/ext/tinycrypt/src/ecc_dsa.c b/components/bt/common/tinycrypt/src/ecc_dsa.c similarity index 98% rename from components/bt/porting/ext/tinycrypt/src/ecc_dsa.c rename to components/bt/common/tinycrypt/src/ecc_dsa.c index 02424d4ea6..03a91f09dd 100644 --- a/components/bt/porting/ext/tinycrypt/src/ecc_dsa.c +++ b/components/bt/common/tinycrypt/src/ecc_dsa.c @@ -1,4 +1,8 @@ -/* ec_dsa.c - TinyCrypt implementation of EC-DSA */ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ /* Copyright (c) 2014, Kenneth MacKay * All rights reserved. diff --git a/components/bt/porting/ext/tinycrypt/src/ecc_platform_specific.c b/components/bt/common/tinycrypt/src/ecc_platform_specific.c similarity index 97% rename from components/bt/porting/ext/tinycrypt/src/ecc_platform_specific.c rename to components/bt/common/tinycrypt/src/ecc_platform_specific.c index ca7650d89a..b76ea994c2 100644 --- a/components/bt/porting/ext/tinycrypt/src/ecc_platform_specific.c +++ b/components/bt/common/tinycrypt/src/ecc_platform_specific.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + /* uECC_platform_specific.c - Implementation of platform specific functions*/ /* Copyright (c) 2014, Kenneth MacKay diff --git a/components/bt/porting/ext/tinycrypt/src/hmac.c b/components/bt/common/tinycrypt/src/hmac.c similarity index 97% rename from components/bt/porting/ext/tinycrypt/src/hmac.c rename to components/bt/common/tinycrypt/src/hmac.c index 89878cec78..7723243475 100644 --- a/components/bt/porting/ext/tinycrypt/src/hmac.c +++ b/components/bt/common/tinycrypt/src/hmac.c @@ -1,4 +1,8 @@ -/* hmac.c - TinyCrypt implementation of the HMAC algorithm */ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ /* * Copyright (C) 2017 by Intel Corporation, All Rights Reserved. diff --git a/components/bt/porting/ext/tinycrypt/src/hmac_prng.c b/components/bt/common/tinycrypt/src/hmac_prng.c similarity index 98% rename from components/bt/porting/ext/tinycrypt/src/hmac_prng.c rename to components/bt/common/tinycrypt/src/hmac_prng.c index 68b5b1fafb..1e3a52fb46 100644 --- a/components/bt/porting/ext/tinycrypt/src/hmac_prng.c +++ b/components/bt/common/tinycrypt/src/hmac_prng.c @@ -1,4 +1,8 @@ -/* hmac_prng.c - TinyCrypt implementation of HMAC-PRNG */ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ /* * Copyright (C) 2017 by Intel Corporation, All Rights Reserved. @@ -30,6 +34,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ +/* hmac_prng.c - TinyCrypt implementation of HMAC-PRNG */ + #include #include #include diff --git a/components/bt/porting/ext/tinycrypt/src/sha256.c b/components/bt/common/tinycrypt/src/sha256.c similarity index 98% rename from components/bt/porting/ext/tinycrypt/src/sha256.c rename to components/bt/common/tinycrypt/src/sha256.c index b4efd20445..53fd6191e7 100644 --- a/components/bt/porting/ext/tinycrypt/src/sha256.c +++ b/components/bt/common/tinycrypt/src/sha256.c @@ -1,4 +1,8 @@ -/* sha256.c - TinyCrypt SHA-256 crypto hash algorithm implementation */ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ /* * Copyright (C) 2017 by Intel Corporation, All Rights Reserved. diff --git a/components/bt/porting/ext/tinycrypt/src/utils.c b/components/bt/common/tinycrypt/src/utils.c similarity index 95% rename from components/bt/porting/ext/tinycrypt/src/utils.c rename to components/bt/common/tinycrypt/src/utils.c index 13cc495123..8f8278bb4a 100644 --- a/components/bt/porting/ext/tinycrypt/src/utils.c +++ b/components/bt/common/tinycrypt/src/utils.c @@ -1,4 +1,8 @@ -/* utils.c - TinyCrypt platform-dependent run-time operations */ +/* + * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ /* * Copyright (C) 2017 by Intel Corporation, All Rights Reserved. @@ -30,6 +34,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ +/* utils.c - TinyCrypt platform-dependent run-time operations */ + #include #include diff --git a/components/bt/host/nimble/nimble b/components/bt/host/nimble/nimble index d69d8789f9..4831c488a4 160000 --- a/components/bt/host/nimble/nimble +++ b/components/bt/host/nimble/nimble @@ -1 +1 @@ -Subproject commit d69d8789f93c1d139f2c874f698e95655a7e7adc +Subproject commit 4831c488a4d23a70e4237b42d0df31b49c414183