Skip to content

Commit

Permalink
Adds Apache-2.0 license in addition to CC0
Browse files Browse the repository at this point in the history
To enable re-use in https://github.com/pq-code-package/mlkem-c-embedded.
This is applied only to the sources of pqm4 itself that are to a vast
degree written by the pqm4 maintainers.
The scheme implementations plus symmetric primitives have other
licenses.
  • Loading branch information
mkannwischer committed Mar 20, 2024
1 parent 4b2fc60 commit 5d0fe86
Show file tree
Hide file tree
Showing 27 changed files with 29 additions and 2 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0 or CC0-1.0
.PHONY: all
all: tests tests-bin

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -406,5 +406,6 @@ Each subdirectory containing implementations contains a LICENSE or COPYING file
under what license that specific implementation is released.
The files in common contain licensing information at the top of the file (and
are currently either public domain or MIT).
All other code in this repository is released under the conditions of [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
All other code in this repository is dual-licensed under [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) and under the conditions of [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
1 change: 1 addition & 0 deletions benchmarks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: Apache-2.0 or CC0-1.0
from mupq import mupq
from interface import parse_arguments, get_platform
import sys
Expand Down
1 change: 1 addition & 0 deletions build_everything.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: Apache-2.0 or CC0-1.0
"""
Builds all of the binaries without flashing them.
"""
Expand Down
1 change: 1 addition & 0 deletions common/aes.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0 or CC0-1.0
#include <stdint.h>
#include <string.h>
#include "aes.h"
Expand Down
1 change: 1 addition & 0 deletions common/aes.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0 or CC0-1.0
#ifndef AES_H
#define AES_H

Expand Down
1 change: 1 addition & 0 deletions common/hal-mps2.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0 or CC0-1.0
#include <hal.h>
#include <CMSDK_CM4.h>

Expand Down
1 change: 1 addition & 0 deletions common/hal-opencm3.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0 or CC0-1.0
#include "hal.h"
#include <sys/cdefs.h>

Expand Down
1 change: 1 addition & 0 deletions common/keccaktest.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0 or CC0-1.0
#include "randombytes.h"
#include <hal.h>
#include <fips202.h>
Expand Down
1 change: 1 addition & 0 deletions common/randombytes.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0 or CC0-1.0
#include "randombytes.h"

#if defined(STM32F2) || defined(STM32F4) || defined(STM32L4R5ZI) && !defined(MPS2_AN386)
Expand Down
1 change: 1 addition & 0 deletions common/test.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0 or CC0-1.0
#include <hal.h>
#include <randombytes.h>
#include <sendfn.h>
Expand Down
1 change: 1 addition & 0 deletions convert_benchmarks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: Apache-2.0 or CC0-1.0
import sys
from mupq import mupq

Expand Down
1 change: 1 addition & 0 deletions interface.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0 or CC0-1.0
import argparse

from mupq import mupq
Expand Down
1 change: 1 addition & 0 deletions mk/config.mk
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# SPDX-License-Identifier: Apache-2.0 or CC0-1.0
CPPFLAGS += \
-DPQM4
1 change: 1 addition & 0 deletions mk/crypto.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0 or CC0-1.0
SYMCRYPTO_SRC = \
mupq/common/fips202.c \
mupq/common/sp800-185.c \
Expand Down
1 change: 1 addition & 0 deletions mk/cw308t-stm32f3.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0 or CC0-1.0
DEVICE=stm32f303rct7
OPENCM3_TARGET=lib/stm32/f3

Expand Down
1 change: 1 addition & 0 deletions mk/cw308t-stm32f415.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0 or CC0-1.0
DEVICE=stm32f415rgt6
OPENCM3_TARGET=lib/stm32/f4

Expand Down
1 change: 1 addition & 0 deletions mk/mps2-an386.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0 or CC0-1.0
EXCLUDED_SCHEMES = \
mupq/crypto_sign/tuov_v/ref%

Expand Down
1 change: 1 addition & 0 deletions mk/nucleo-l476rg.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0 or CC0-1.0
DEVICE=stm32l476rg
OPENCM3_TARGET=lib/stm32/l4

Expand Down
1 change: 1 addition & 0 deletions mk/nucleo-l4r5zi.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0 or CC0-1.0
DEVICE=stm32l4r5zi
OPENCM3_TARGET=lib/stm32/l4

Expand Down
1 change: 1 addition & 0 deletions mk/opencm3.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0 or CC0-1.0
LIBHAL_SRC := \
common/hal-opencm3.c \
common/randombytes.c
Expand Down
1 change: 1 addition & 0 deletions mk/stm32f4discovery.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0 or CC0-1.0
DEVICE=stm32f407vg
OPENCM3_TARGET=lib/stm32/f4

Expand Down
1 change: 1 addition & 0 deletions mk/tests.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0 or CC0-1.0
ifeq ($(AIO),1)
elf/boardtest.elf: common/test.c $(LINKDEPS) $(CONFIG)
$(compiletest)
Expand Down
2 changes: 2 additions & 0 deletions st_nucleo_l4r5.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0 or CC0-1.0

# This is for STM32L4R5 Nucleo Dev Boards.
source [find interface/stlink-dap.cfg]

Expand Down
1 change: 1 addition & 0 deletions test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: Apache-2.0 or CC0-1.0
from mupq import mupq
from interface import parse_arguments, get_platform

Expand Down
1 change: 1 addition & 0 deletions testvectors.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: Apache-2.0 or CC0-1.0
from mupq import mupq
from interface import parse_arguments, get_platform
import sys
Expand Down

0 comments on commit 5d0fe86

Please sign in to comment.