From cc357f9638ce22a39eab8f79055f1154388ccb74 Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Wed, 13 Aug 2025 09:18:52 +0200 Subject: [PATCH] pkg/qdsa: drop package This package seems to implement the [qDSA signature scheme][1], which seemed to not have received the level of attention and scrutiny from the crypto community one would expect before adopting it outside of lab environments and experiments. Hence, it might be better hosted on a repo that focuses exclusively on research, rather than in a repo of a general purpose OS that is intended to be used outside of lab environments as well. [1]: https://link.springer.com/chapter/10.1007/978-3-319-70697-9_10 --- pkg/qdsa/Makefile | 11 ----- pkg/qdsa/Makefile.dep | 20 --------- pkg/qdsa/Makefile.include | 11 ----- pkg/qdsa/doc.txt | 12 ----- tests/pkg/qdsa/Makefile | 9 ---- tests/pkg/qdsa/Makefile.ci | 14 ------ tests/pkg/qdsa/main.c | 82 ---------------------------------- tests/pkg/qdsa/tests/01-run.py | 17 ------- 8 files changed, 176 deletions(-) delete mode 100644 pkg/qdsa/Makefile delete mode 100644 pkg/qdsa/Makefile.dep delete mode 100644 pkg/qdsa/Makefile.include delete mode 100644 pkg/qdsa/doc.txt delete mode 100644 tests/pkg/qdsa/Makefile delete mode 100644 tests/pkg/qdsa/Makefile.ci delete mode 100644 tests/pkg/qdsa/main.c delete mode 100755 tests/pkg/qdsa/tests/01-run.py diff --git a/pkg/qdsa/Makefile b/pkg/qdsa/Makefile deleted file mode 100644 index 394b7e2877..0000000000 --- a/pkg/qdsa/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -PKG_NAME=qdsa -PKG_URL=https://github.com/RIOT-OS/qdsa.git -PKG_VERSION=3fa25ffa3971000fe4a3e3b42340c40c8d79f2a2 -PKG_LICENSE=PD - -include $(RIOTBASE)/pkg/pkg.mk - -CFLAGS += -Wno-cast-align - -all: - $(QQ)"$(MAKE)" -C $(PKG_SOURCE_DIR)/$(patsubst qdsa_impl_%,%,$(filter qdsa_impl_%,$(USEMODULE))) diff --git a/pkg/qdsa/Makefile.dep b/pkg/qdsa/Makefile.dep deleted file mode 100644 index 5590d615e3..0000000000 --- a/pkg/qdsa/Makefile.dep +++ /dev/null @@ -1,20 +0,0 @@ -ifneq (,$(filter cortex-m23 cortex-m0%,$(CPU_CORE))) - USEMODULE += qdsa_asm -endif - -ifneq (,$(filter arch_avr8,$(FEATURES_USED))) - USEMODULE += qdsa_asm -endif - -ifeq (,$(filter qdsa_impl_%,$(USEMODULE))) - ifneq (,$(filter cortex-m23 cortex-m0%,$(CPU_CORE))) - USEMODULE += qdsa_impl_arm - else ifneq (,$(filter arch_avr8,$(FEATURES_USED))) - USEMODULE += qdsa_impl_avr - else - USEMODULE += qdsa_impl_cref - endif -endif - -# qDsa is not 16 bit compatible -FEATURES_BLACKLIST += arch_16bit diff --git a/pkg/qdsa/Makefile.include b/pkg/qdsa/Makefile.include deleted file mode 100644 index 9a41247f74..0000000000 --- a/pkg/qdsa/Makefile.include +++ /dev/null @@ -1,11 +0,0 @@ -PSEUDOMODULES += qdsa_impl_arm -PSEUDOMODULES += qdsa_impl_avr -PSEUDOMODULES += qdsa_impl_cref - -INCLUDES += -I$(PKGDIRBASE)/qdsa/$(patsubst qdsa_impl_%,%,$(filter qdsa_impl_%,$(USEMODULE))) - -ifeq (cortex-m0plus,$(CPU_CORE)) - # There are problems with the LLVM assembler and the Cortex-M0+ instruction - # set with this package - TOOLCHAINS_BLACKLIST += llvm -endif diff --git a/pkg/qdsa/doc.txt b/pkg/qdsa/doc.txt deleted file mode 100644 index 9d99cc8d42..0000000000 --- a/pkg/qdsa/doc.txt +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @defgroup pkg_qdsa qdsa - * @ingroup pkg - * @ingroup sys - * @brief Small and Secure Digital Signatures with Curve-based Diffie-Hellman Key Pairs - * - * # License - * - * The package code is released to public domain - * - * @see https://www.cs.ru.nl/~jrenes/ - */ diff --git a/tests/pkg/qdsa/Makefile b/tests/pkg/qdsa/Makefile deleted file mode 100644 index d04b162129..0000000000 --- a/tests/pkg/qdsa/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -include ../Makefile.pkg_common - -CFLAGS += -DTHREAD_STACKSIZE_MAIN=\(4*THREAD_STACKSIZE_DEFAULT\) - -USEPKG += qdsa -USEMODULE += random -USEMODULE += embunit - -include $(RIOTBASE)/Makefile.include diff --git a/tests/pkg/qdsa/Makefile.ci b/tests/pkg/qdsa/Makefile.ci deleted file mode 100644 index 6a2fca3caf..0000000000 --- a/tests/pkg/qdsa/Makefile.ci +++ /dev/null @@ -1,14 +0,0 @@ -BOARD_INSUFFICIENT_MEMORY := \ - arduino-duemilanove \ - arduino-leonardo \ - arduino-nano \ - arduino-uno \ - atmega328p \ - atmega328p-xplained-mini \ - atmega8 \ - nucleo-f031k6 \ - nucleo-l011k4 \ - samd10-xmini \ - stk3200 \ - stm32f030f4-demo \ - # diff --git a/tests/pkg/qdsa/main.c b/tests/pkg/qdsa/main.c deleted file mode 100644 index 61cda6c088..0000000000 --- a/tests/pkg/qdsa/main.c +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (C) 2018 Kaspar Schleiser - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup unittests - * @{ - * - * @file - * @brief qDSA crypto library tests - * - * @author Kaspar Schleiser - * - * @} - */ - -#include "embUnit.h" - -#include "random.h" -#include "sign.h" - -static const unsigned char m[] = "0123456789abcdef"; - -#define SMLEN (sizeof(m) + 64) - -static unsigned char sm[SMLEN]; -static unsigned char m_result[sizeof(m)]; -static unsigned char sk[64]; -static unsigned char pk[32]; - -static void setUp(void) -{ - /* Initialize */ - random_init(0); -} - -static void tearDown(void) -{ - /* Finalize */ -} - -static void test_qDSA_sign_verify(void) -{ - unsigned long long smlen; - - random_bytes(sk, 32); - keypair(pk, sk); - - sign(sm, &smlen, m, sizeof(m), pk, sk); - - TEST_ASSERT_EQUAL_INT(SMLEN, smlen); - TEST_ASSERT_EQUAL_STRING("0123456789abcdef", (const char *)(sm + 64)); - - TEST_ASSERT_EQUAL_INT(0, verify(m_result, 0, sm, smlen, pk)); - TEST_ASSERT_EQUAL_STRING("0123456789abcdef", (const char *)m_result); - - sm[70] = 'x'; - - TEST_ASSERT_EQUAL_INT(1, verify(m_result, 0, sm, smlen, pk)); -} - -Test *tests_qDSA(void) -{ - EMB_UNIT_TESTFIXTURES(fixtures) { - new_TestFixture(test_qDSA_sign_verify), - }; - - EMB_UNIT_TESTCALLER(qDSA_tests, setUp, tearDown, fixtures); - return (Test*)&qDSA_tests; -} - -int main(void) -{ - TESTS_START(); - TESTS_RUN(tests_qDSA()); - TESTS_END(); - return 0; -} diff --git a/tests/pkg/qdsa/tests/01-run.py b/tests/pkg/qdsa/tests/01-run.py deleted file mode 100755 index 39135370a0..0000000000 --- a/tests/pkg/qdsa/tests/01-run.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env python3 - -# Copyright (C) 2017 Freie Universität Berlin -# -# This file is subject to the terms and conditions of the GNU Lesser -# General Public License v2.1. See the file LICENSE in the top level -# directory for more details. - -import sys -from testrunner import run_check_unittests - -# It takes ~11s on nucleo-l152re, so add some margin -TIMEOUT = 15 - - -if __name__ == "__main__": - sys.exit(run_check_unittests(timeout=TIMEOUT))