| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the following compiler error when CORE_CORTEX_M is not set.
common/aes-gcm.c:101:21: error: unused variable 'kSizeTWithoutLower4Bits' [-Werror,-Wunused-const-variable]
static const size_t kSizeTWithoutLower4Bits = (size_t) -16;
This occurs when compiling the host-based unit and fuzzer tests.
The trace for this goes as follows:
Setting CORE_CORTEX_M sets GHASH_ASM, which later on sets GHASH.
Certain sections of code that use this static const are
disabled if GHASH is not set.
Thus, no uses of this static const.
This issue arose when attempting to add the fpsensor task to
host_command_fuzz, but is actually present(and unreported)
in the fpsensor unit test.
The presence of this unreported issue in the host-fpsensor build target
was discovered by manually invoking cpp for aes-gcm.c and checking that
the static const existed, but was not references.
BRANCH=none
BUG=none
TEST=make buildall -j
Change-Id: I2ef5d73e11ced421d888221ef3c672e42bba53a3
Signed-off-by: Craig Hesling <hesling@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1661121
Reviewed-by: Nicolas Norvez <norvez@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the undefined reference to gcm_init_v8 and gcm_ghash_v8
when compiling with low optimization levels.
make BOARD=nocturne_fp V=1 CFLAGS_DEBUG_CHIP="-ggdb -Og"
This builds on the adaption work in crrev.com/c/1238976.
It mirrors what was done to fix gcm_gmult_neon/gcm_ghash_neon
and pulls ideas from the following upstream boringssl files:
https://boringssl.googlesource.com/boringssl/+/refs/heads/master/crypto/fipsmodule/modes/internal.h#317
https://boringssl.googlesource.com/boringssl/+/refs/heads/master/crypto/fipsmodule/modes/gcm.c#330
BRANCH=none
BUG=chromium:972148
TEST=make buildall
TEST=make run-aes -j
Change-Id: Id85eb808d546f30c6d4f02263a985d91d7387d5f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1650124
Tested-by: Craig Hesling <hesling@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Craig Hesling <hesling@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update header, C code, trim unnecessary bits.
Also add a test with vectors taken from BoringSSL tests.
BRANCH=none
BUG=b:111160949
TEST=make run-aes -j
TEST=make BOARD=nocturne_fp test-aes -j
flash_fp_mcu aes.bin
runtest => pass
(C implementation speed: 909555 us for 1000 iterations)
(ASM implementation speed: 596690 us for 1000 iterations)
Change-Id: Ief54a8441d26ba44de4c3ac81e203cab7472269f
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1141446
Commit-Ready: Nicolas Norvez <norvez@chromium.org>
Reviewed-by: Nicolas Norvez <norvez@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Copied over from upstream BoringSSL at commit
859679518d3433cdd0dd6cf534bd7bdb2a32dd60 .
cp boringssl/crypto/fipsmodule/modes/gcm.c \
third_party/boringssl/common/gcm.c
cp crypto/fipsmodule/modes/internal.h \
third_party/boringssl/include/aes-gcm.h
=> Remove non-GCM definitions
perl boringssl/crypto/fipsmodule/modes/asm/ghash-armv4.pl \
> third_party/boringssl/core/cortex-m/ghash.S
BRANCH=none
BUG=b:111160949
TEST=none
Change-Id: I34702ff315c8c44e6f4868243058700aaf026099
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1141445
Reviewed-by: Adam Langley <agl@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update header, C code, and tweak the assembly for ARMv7-M.
Rename aes_now_* functions to AES_* to avoid the need for a
separate wrapper.
Also add a test with FIPS-197 test vectors, and speed test.
BRANCH=none
BUG=b:111160949
TEST=make run-aes -j
TEST=make BOARD=nocturne_fp test-aes -j
flash_fp_mcu aes.bin
runtest => pass
(C implementation speed: 11977 us for 1000 iterations)
(ASM implementation speed: 5815 us for 1000 iterations)
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Change-Id: I2048aae73decccb893bc1724b2617b0b902dd992
Reviewed-on: https://chromium-review.googlesource.com/1120340
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Adam Langley <agl@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
Copied over from upstream BoringSSL at commit
859679518d3433cdd0dd6cf534bd7bdb2a32dd60 .
cp boringssl/LICENSE third_party/boringssl/LICENSE
cp boringssl/src/crypto/fipsmodule/aes/aes.c \
third_party/boringssl/common/aes.c
cp boringssl/include/openssl/aes.h \
third_party/boringssl/include/aes.h
perl boringssl/crypto/fipsmodule/aes/asm/aes-armv4.pl \
> third_party/boringssl/core/cortex-m/aes.S
BRANCH=none
BUG=b:111160949
TEST=none
Change-Id: Ia1fbb57b23e039ca5dec3d56984c83c19b7d6cd6
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1120339
Reviewed-by: Adam Langley <agl@chromium.org>
|