Skip to content
This repository was archived by the owner on Jul 22, 2023. It is now read-only.

Commit e0bd912

Browse files
fredrecDellaBitta
authored andcommitted
Add Cryptoauthlib crypto BSP implementation (#25)
Added ATECC608 Secure Element reference implementation for generating JWT signatures with private keys. See `src/bsp/crypto/cryptoauthlib/iotc_bsp_crypto_cryptoauthlib.c` for more information.
1 parent 1faf28b commit e0bd912

21 files changed

+243
-71
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[submodule "third_party/googletest"]
22
path = third_party/googletest
33
url = https://github.com/google/googletest
4+
[submodule "third_party/cryptoauthlib"]
5+
path = third_party/cryptoauthlib
6+
url = https://github.com/MicrochipTech/cryptoauthlib.git

.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ env:
3030
# WOLFSSL Tests
3131
- PRESET=POSIX_DEV
3232
IOTC_BSP_TLS=wolfssl
33+
IOTC_BSP_CRYPTO=wolfssl
3334

3435
- PRESET=POSIX_REL
3536
IOTC_BSP_TLS=wolfssl
37+
IOTC_BSP_CRYPTO=wolfssl
3638

3739
- PRESET=POSIX_THREADING_REL
3840
# - PRESET=POSIX_UNSECURE_REL

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ MD ?= @
3232
# TLS related configuration
3333
IOTC_BSP_TLS ?= mbedtls
3434

35+
# Cryptographic BSP implementation
36+
IOTC_BSP_CRYPTO ?= mbedtls
37+
3538
#detect if the build happen on Travis
3639
ifdef TRAVIS_OS_NAME
3740
IOTC_TRAVIS_BUILD=1
@@ -133,7 +136,7 @@ clean_all: clean
133136

134137
libiotc: $(XI)
135138

136-
$(XI): $(IOTC_TLS_LIB_DEP) $(IOTC_PROTOFILES_C) $(IOTC_OBJS) $(IOTC_BUILD_PRECONDITIONS) | $(IOTC_BIN_DIRS)
139+
$(XI): $(IOTC_TLS_LIB_DEP) $(IOTC_CRYPTO_LIB_DEP) $(IOTC_PROTOFILES_C) $(IOTC_OBJS) $(IOTC_BUILD_PRECONDITIONS) | $(IOTC_BIN_DIRS)
137140
$(info [$(AR)] $@ )
138141
$(MD) $(AR) $(IOTC_ARFLAGS) $(IOTC_OBJS) $(IOTC_EXTRA_ARFLAGS)
139142

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ Follow the steps below to perform the cross-compilation process.
9090

9191
- Extend the build system with a new cross-compilation preset in the file `make/mt-config/mt-presets.mk`.
9292
- Create a set of files that represent the Board Support Package (BSP) implementation you've written for your platform. Store these in the directory `src/bsp/platform/TARGET_PLATFORM`.
93-
- Build a TLS library for the target platform in the directory `src/bsp/tls/TARGET_TLS_SOLUTION`.
93+
- Build a TLS BSP implementation to invoke the TLS SDK for your platform. Store these in a new directory `src/bsp/tls/TARGET_TLS_SOLUTION`.
94+
- Build a Cryptography BSP implementation to handle key signatures of JWTs on your target platform in the directory `src/bsp/crypto/TARGET_CRYPTO_SOLUCTION`.
9495

9596
For more details on the cross-compilation process, see the porting guide in `doc/porting_guide.md`.
9697

RELEASE-NOTES.md

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
- Added Zephyr example. See `examples/zephyr_native_posix/README.md` for more information.
77

8+
- Added ATECC608 Secure Element reference implementation for generating JWT signatures with private keys. See `src/bsp/crypto/cryptoauthlib/iotc_bsp_crypto_cryptoauthlib.c` for more information.
9+
810
- Connection API Changes:
911
- JWT creation and formation was added to a new header file `include/iotc_jwt.h`.
1012
- `iotc_connect` and `iotc_connect_to` now take the standard MQTT connect credentials of username, password, and client_id. A JWT, formatted according to [Cloud IoT Core specifications](https://cloud.google.com/iot/docs/how-tos/credentials/jwts), should be passed as the MQTT password when connecting to Cloud IoT Core.

doc/doxygen/bsp/html/d1/def/iotc__bsp__io__net_8h.html

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/doxygen/bsp/html/d6/d01/iotc__bsp__crypto_8h.html

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/doxygen/bsp/html/d6/d01/iotc__bsp__crypto_8h_source.html

+10-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/doxygen/bsp/html/d9/d57/structiotc__bsp__tls__init__params__s.html

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/doxygen/bsp/html/dd/d79/iotc__bsp__tls_8h.html

+12-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)