Skip to content
Snippets Groups Projects
Commit b5ab19c6 authored by schneider's avatar schneider
Browse files

feat(crypto): Add SHA256 implementation

parent 5c8819d8
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
[submodule "lib/micropython/micropython-lib"] [submodule "lib/micropython/micropython-lib"]
path = lib/micropython/micropython-lib path = lib/micropython/micropython-lib
url = https://github.com/micropython/micropython-lib.git url = https://github.com/micropython/micropython-lib.git
[submodule "lib/tiny-AES-c/tiny-AES-c"] [submodule "lib/crypto/tiny-AES-c"]
path = lib/tiny-AES-c/tiny-AES-c path = lib/crypto/tiny-AES-c
url = https://github.com/kokke/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 ...@@ -4,7 +4,7 @@ set -xe
cd "$(dirname "$0")" cd "$(dirname "$0")"
test -d build/ && rm -r build/ 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 git submodule update --init ./lib
meson --cross-file card10-cross.ini build/ "$@" meson --cross-file card10-cross.ini build/ "$@"
......
...@@ -91,7 +91,7 @@ elf = executable( ...@@ -91,7 +91,7 @@ elf = executable(
l0der_sources, l0der_sources,
ble_sources, ble_sources,
version_hdr, 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_with: [api_dispatcher_lib, freertos],
link_whole: [max32665_startup_core0_lib, board_card10_lib, newlib_heap_lib], link_whole: [max32665_startup_core0_lib, board_card10_lib, newlib_heap_lib],
include_directories: [freertos_includes], include_directories: [freertos_includes],
......
Subproject commit 1c9e3886f69f9ca83c1af49968d8e4389035ff44
...@@ -4,18 +4,17 @@ includes = include_directories( ...@@ -4,18 +4,17 @@ includes = include_directories(
sources = files( sources = files(
'./tiny-AES-c/aes.c', './tiny-AES-c/aes.c',
'./SHA256/mark2/sha256.c',
) )
lib = static_library( lib = static_library(
'tinyAESc', 'crypto',
sources, sources,
include_directories: includes, include_directories: includes,
#dependencies: [periphdriver, mx25lba],
c_args: '-w', c_args: '-w',
) )
libtinyAESc = declare_dependency( libcrypto = declare_dependency(
include_directories: includes, include_directories: includes,
link_with: lib, link_with: lib,
#dependencies: [periphdriver, mx25lba],
) )
File moved
...@@ -10,7 +10,7 @@ subdir('./gfx/') ...@@ -10,7 +10,7 @@ subdir('./gfx/')
subdir('./FreeRTOS/') subdir('./FreeRTOS/')
subdir('./FreeRTOS-Plus/') subdir('./FreeRTOS-Plus/')
subdir('./micropython/') subdir('./micropython/')
subdir('./tiny-AES-c/') subdir('./crypto/')
subdir('./card10/') subdir('./card10/')
subdir('./mx25lba/') subdir('./mx25lba/')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment