Skip to content

Commit fecda2d

Browse files
committed
ext: Pull in tinycrypt v0.2.6
Zephyr 1.9 moves to tinycrypt v0.2.7. This introduces a breaking API change. This makes things challenging for mcuboot, which would like to be able to work across multiple platforms. To help with this, bring in the last working version of Tinycrypt v0.2.6 from https://github.com/01org/tinycrypt. Tinycrypt is released under a 3-clause BSD-style license, with parts under the micro-ecc license, which is a 2-clause license. Please see ext/tinycrypt/LICENSE for details. Signed-off-by: David Brown <david.brown@linaro.org>
1 parent ef35f0a commit fecda2d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+12002
-0
lines changed

ext/tinycrypt/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*.o
2+
*~
3+
*.d
4+
*.exe
5+
*.a

ext/tinycrypt/AUTHORS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Open Source Maintainer: Constanza Heath <constanza.m.heath@intel.com>
2+
Author: Rafael Misoczki <rafael.misoczki@intel.com>

ext/tinycrypt/LICENSE

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
2+
================================================================================
3+
4+
TinyCrypt Cryptographic Library
5+
6+
================================================================================
7+
8+
Copyright (c) 2015, Intel Corporation. All rights reserved.
9+
10+
Redistribution and use in source and binary forms, with or without modification,
11+
are permitted provided that the following conditions are met:
12+
13+
- Redistributions of source code must retain the above copyright notice, this
14+
list of conditions and the following disclaimer.
15+
16+
- Redistributions in binary form must reproduce the above copyright notice,
17+
this list of conditions and the following disclaimer in the documentation
18+
and/or other materials provided with the distribution.
19+
20+
- Neither the name of the Intel Corporation nor the names of its contributors
21+
may be used to endorse or promote products derived from this software
22+
without specific prior written permission.
23+
24+
25+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
26+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
27+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
28+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
29+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
30+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
32+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
34+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35+
36+
================================================================================
37+
38+
Copyright (c) 2013, Kenneth MacKay
39+
All rights reserved.
40+
41+
https://github.com/kmackay/micro-ecc
42+
43+
Redistribution and use in source and binary forms, with or without modification,
44+
are permitted provided that the following conditions are met:
45+
* Redistributions of source code must retain the above copyright notice, this
46+
list of conditions and the following disclaimer.
47+
* Redistributions in binary form must reproduce the above copyright notice,
48+
this list of conditions and the following disclaimer in the documentation
49+
and/or other materials provided with the distribution.
50+
51+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
52+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
53+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
54+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
55+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
56+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
57+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
58+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
59+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
60+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
61+
62+
================================================================================

ext/tinycrypt/Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
################################################################################
2+
#
3+
# Copyright (C) 2015 by Intel Corporation, All Rights Reserved.
4+
#
5+
# Global Makefile.
6+
# See lib/Makefile and tests/Makefile for further configuration.
7+
#
8+
################################################################################
9+
include config.mk
10+
11+
all:
12+
$(MAKE) -C lib
13+
ifeq ($(ENABLE_TESTS),true)
14+
$(MAKE) -C tests
15+
endif
16+
17+
clean:
18+
$(MAKE) -C lib clean
19+
$(MAKE) -C tests clean
20+
$(RM) *~
21+

ext/tinycrypt/README

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
2+
================================================================================
3+
4+
TinyCrypt Cryptographic Library
5+
6+
================================================================================
7+
8+
Copyright (c) 2015, Intel Corporation. All rights reserved.
9+
10+
Redistribution and use in source and binary forms, with or without modification,
11+
are permitted provided that the following conditions are met:
12+
13+
- Redistributions of source code must retain the above copyright notice, this
14+
list of conditions and the following disclaimer.
15+
16+
- Redistributions in binary form must reproduce the above copyright notice,
17+
this list of conditions and the following disclaimer in the documentation
18+
and/or other materials provided with the distribution.
19+
20+
- Neither the name of the Intel Corporation nor the names of its contributors
21+
may be used to endorse or promote products derived from this software
22+
without specific prior written permission.
23+
24+
25+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
26+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
27+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
28+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
29+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
30+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
32+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
34+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35+
36+
================================================================================
37+
38+
Overview:
39+
40+
The TinyCrypt Library provides an implementation for constrained devices of a
41+
minimal set of standard cryptography primitives.
42+
43+
Please, ***SEE THE DOCUMENTATION*** folder for more information on the supported
44+
cryptographic primitives and the limitations of TinyCrypt library. For usage,
45+
security and technicalities, please see the corresponding header file of each
46+
cryptographic primitive.
47+
48+
================================================================================
49+
50+
Organization:
51+
52+
/lib: C source code of the cryptographic primitives.
53+
/tests: Test vectors of the cryptographic primitives.
54+
/doc: Documentation of TinyCrypt.
55+
56+
================================================================================
57+
58+
Building:
59+
60+
1) In Makefile.conf set:
61+
- CFLAGS for compiler flags.
62+
- CC for compiler.
63+
2) In lib/Makefile select the primitives required by your project.
64+
3) In tests/Makefile select the corresponding tests of the selected primitives.
65+
4) make
66+
5) run tests in tests/
67+
68+
================================================================================
69+

ext/tinycrypt/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.2.6

ext/tinycrypt/config.mk

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
################################################################################
2+
#
3+
# Copyright (C) 2015 by Intel Corporation, All Rights Reserved.
4+
#
5+
# Global configuration Makefile. Included everywhere.
6+
#
7+
################################################################################
8+
9+
CC:=gcc
10+
CFLAGS:=-Os -std=c99 -Wall -Wextra -D_ISOC99_SOURCE -MMD -I../lib/include/ -I../lib/source/ -I../tests/include/
11+
vpath %.c ../lib/source/
12+
ENABLE_TESTS=true
13+
14+
# override MinGW built-in recipe
15+
%.o: %.c
16+
$(COMPILE.c) $(OUTPUT_OPTION) $<
17+
18+
ifeq ($(OS),Windows_NT)
19+
DOTEXE:=.exe
20+
endif
21+
22+
# DO NOT EDIT THIS:
23+
ifeq ($(ENABLE_TESTS), true)
24+
CFLAGS += -DENABLE_TESTS
25+
else
26+
CFLAGS += -DDISABLE_TESTS
27+
endif
28+
29+
################################################################################

0 commit comments

Comments
 (0)