mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-15 17:43:51 +01:00
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
This commit is contained in:
parent
ad4cf178eb
commit
cc357f9638
@ -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)))
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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/
|
||||
*/
|
||||
@ -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
|
||||
@ -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 \
|
||||
#
|
||||
@ -1,82 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Kaspar Schleiser <kaspar@schleiser.de>
|
||||
*
|
||||
* 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 <kaspar@schleiser.de>
|
||||
*
|
||||
* @}
|
||||
*/
|
||||
|
||||
#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;
|
||||
}
|
||||
@ -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))
|
||||
Loading…
x
Reference in New Issue
Block a user