This is an automated email from the ASF dual-hosted git repository.

sjanc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 2914b4a3ba077ba4e98d0294026ef13dc4f38c83
Author: Szymon Janc <[email protected]>
AuthorDate: Thu Jun 11 14:06:08 2026 +0200

    encflash: Remove Tincyrypt encryption support
    
    Tinycrypt is deprecated and will be removed. Use Mbed TLS
    implementation instead.
---
 .../include/ef_tinycrypt/ef_tinycrypt.h            | 44 -------------
 hw/drivers/flash/enc_flash/ef_tinycrypt/pkg.yml    | 32 ----------
 .../enc_flash/ef_tinycrypt/src/ef_tinycrypt.c      | 73 ----------------------
 3 files changed, 149 deletions(-)

diff --git 
a/hw/drivers/flash/enc_flash/ef_tinycrypt/include/ef_tinycrypt/ef_tinycrypt.h 
b/hw/drivers/flash/enc_flash/ef_tinycrypt/include/ef_tinycrypt/ef_tinycrypt.h
deleted file mode 100644
index 9e75694d3..000000000
--- 
a/hw/drivers/flash/enc_flash/ef_tinycrypt/include/ef_tinycrypt/ef_tinycrypt.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#ifndef __EF_TINYCRYPT_H__
-#define __EF_TINYCRYPT_H__
-
-/*
- * Encrypting flash driver using AES from Tinycrypt
- */
-#include <enc_flash/enc_flash.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Tinycrypt specific version of the flash device.
- */
-struct eflash_tinycrypt_dev {
-    struct enc_flash_dev etd_dev;
-    uint8_t etd_key[ENC_FLASH_BLK];
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __ENC_FLASH_TINYCRYPT_H__ */
diff --git a/hw/drivers/flash/enc_flash/ef_tinycrypt/pkg.yml 
b/hw/drivers/flash/enc_flash/ef_tinycrypt/pkg.yml
deleted file mode 100644
index 5d0f5c16e..000000000
--- a/hw/drivers/flash/enc_flash/ef_tinycrypt/pkg.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-pkg.name: hw/drivers/flash/enc_flash/ef_tinycrypt
-pkg.description: Encrypting flash driver using Tincrypt AES.
-pkg.author: "Apache Mynewt <[email protected]>"
-pkg.homepage: "http://mynewt.apache.org/";
-pkg.keywords:
-    - security
-    - encrypt
-    - flash
-
-pkg.deps:
-    - "@apache-mynewt-core/hw/drivers/flash/enc_flash"
-    - "@apache-mynewt-core/crypto/tinycrypt"
-
diff --git a/hw/drivers/flash/enc_flash/ef_tinycrypt/src/ef_tinycrypt.c 
b/hw/drivers/flash/enc_flash/ef_tinycrypt/src/ef_tinycrypt.c
deleted file mode 100644
index 6a072ae04..000000000
--- a/hw/drivers/flash/enc_flash/ef_tinycrypt/src/ef_tinycrypt.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include <assert.h>
-#include <string.h>
-
-#include <os/mynewt.h>
-
-#include <tinycrypt/aes.h>
-
-#include <enc_flash/enc_flash.h>
-#include "ef_tinycrypt/ef_tinycrypt.h"
-
-#define EDEV_TO_TC(dev) (struct eflash_tinycrypt_dev *)(edev)
-#define ENC_FLASH_NONCE "mynewtencfla"
-
-static void
-ef_tc_get_block(struct eflash_tinycrypt_dev *dev, uint32_t addr, uint8_t *blk)
-{
-    struct tc_aes_key_sched_struct ctx;
-
-    memcpy(blk, ENC_FLASH_NONCE, 12);
-    memcpy(blk + 12, &addr, sizeof(addr));
-
-    tc_aes128_set_encrypt_key(&ctx, dev->etd_key);
-    tc_aes_encrypt(blk, blk, &ctx);
-}
-
-void
-enc_flash_crypt_arch(struct enc_flash_dev *edev, uint32_t blk_addr,
-                     const uint8_t *src, uint8_t *tgt, int off, int cnt)
-{
-    struct eflash_tinycrypt_dev *dev = EDEV_TO_TC(edev);
-    uint8_t blk[ENC_FLASH_BLK];
-    uint8_t *b;
-    int i;
-
-    ef_tc_get_block(dev, blk_addr, blk);
-    b = &blk[off];
-    for (i = 0 ; i < cnt; i++) {
-        *tgt++ = *b++ ^ *src++;
-    }
-}
-
-void
-enc_flash_setkey_arch(struct enc_flash_dev *edev, uint8_t *key)
-{
-    struct eflash_tinycrypt_dev *dev = EDEV_TO_TC(edev);
-
-    memcpy(dev->etd_key, key, ENC_FLASH_BLK);
-}
-
-int
-enc_flash_init_arch(const struct enc_flash_dev *edev)
-{
-    return 0;
-}

Reply via email to