summaryrefslogtreecommitdiff
path: root/test/aes.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove uses of %lEvan Green2019-10-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | This change removes uses of %l from the EC side of the EC codebase. This is done because the semantics of %l within printf have changed, and there are concerns that new calls to printf will be cherry-picked into old firmware branches without the printf changes. So, in preparation for disallowing %l in master, remove occurrences of %l. This change was done by manually fixing up anything found under the EC directory with the following regex: %[0-9*.-]*l[^l] Remember that anything on the host machine is fine as-is, since the host printf never changed. BUG=chromium:984041 TEST=make -j buildall BRANCH=None Change-Id: I2a97433ddab5bfb8a6031ca4ff1d3905289444e2 Signed-off-by: Evan Green <evgreen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1834603 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* aes-gcm: set tag size to 16 bytes in perf testNicolas Norvez2018-09-211-1/+1
| | | | | | | | | | | | | | Use a 16-byte tag instead of 12 bytes. BRANCH=nocturne BUG=b:111160949 TEST=make BOARD=nocturne_fp test-aes -j TEST=make run-aes Change-Id: I9d1d28ec2049590b407eb9ea64d412c29d46b20b Signed-off-by: Nicolas Norvez <norvez@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1239237 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* aes-gcm: Adapt AES-GCM to build for ECNicolas Boichat2018-09-211-5/+378
| | | | | | | | | | | | | | | | | | | | | 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>
* aes: Adapt AES code to build for ECNicolas Boichat2018-09-201-0/+144
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>