Commit b5ab19c6 authored by schneider's avatar schneider
Browse files

feat(crypto): Add SHA256 implementation

parent 5c8819d8
......@@ -4,6 +4,9 @@
[submodule "lib/micropython/micropython-lib"]
path = lib/micropython/micropython-lib
url = https://github.com/micropython/micropython-lib.git
[submodule "lib/tiny-AES-c/tiny-AES-c"]
path = lib/tiny-AES-c/tiny-AES-c
[submodule "lib/crypto/tiny-AES-c"]
path = lib/crypto/tiny-AES-c
url = https://github.com/kokke/tiny-AES-c
[submodule "lib/crypto/SHA256"]
path = lib/crypto/SHA256
url = https://github.com/ilvn/SHA256
......@@ -4,7 +4,7 @@ set -xe
cd "$(dirname "$0")"
test -d build/ && rm -r build/
# Get external libs (MicroPython, tiny-AES-c)
# Get external libs (MicroPython, tiny-AES-c, SHA256)
git submodule update --init ./lib
meson --cross-file card10-cross.ini build/ "$@"
......
......@@ -91,7 +91,7 @@ elf = executable(
l0der_sources,
ble_sources,
version_hdr,
dependencies: [libcard10, max32665_startup_core0, maxusb, libff13, ble, bhy1, libtinyAESc],
dependencies: [libcard10, max32665_startup_core0, maxusb, libff13, ble, bhy1, libcrypto],
link_with: [api_dispatcher_lib, freertos],
link_whole: [max32665_startup_core0_lib, board_card10_lib, newlib_heap_lib],
include_directories: [freertos_includes],
......
Subproject commit 1c9e3886f69f9ca83c1af49968d8e4389035ff44
......@@ -4,18 +4,17 @@ includes = include_directories(
sources = files(
'./tiny-AES-c/aes.c',
'./SHA256/mark2/sha256.c',
)
lib = static_library(
'tinyAESc',
'crypto',
sources,
include_directories: includes,
#dependencies: [periphdriver, mx25lba],
c_args: '-w',
)
libtinyAESc = declare_dependency(
libcrypto = declare_dependency(
include_directories: includes,
link_with: lib,
#dependencies: [periphdriver, mx25lba],
)
......@@ -10,7 +10,7 @@ subdir('./gfx/')
subdir('./FreeRTOS/')
subdir('./FreeRTOS-Plus/')
subdir('./micropython/')
subdir('./tiny-AES-c/')
subdir('./crypto/')
subdir('./card10/')
subdir('./mx25lba/')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment