diff options
author | nagendra modadugu <ngm@google.com> | 2017-01-25 22:33:43 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-01-28 21:37:58 -0800 |
commit | 927e01da02ab68c304d95508df5ba0b50f8bb960 (patch) | |
tree | 01856edf85d32d671c98bd78a36bdd62f66b66ed /board/plankton/usb_pd_policy.c | |
parent | cf8c12e1391964043eae1a3337361e30b8c39a59 (diff) | |
download | chrome-ec-927e01da02ab68c304d95508df5ba0b50f8bb960.tar.gz |
g: rework DCRYPTO_app_cipher (AES-CTR) for speed
The previous implementation of DCRYPTO_app_cipher
consumed roughly 16ms to cipher a 16kB buffer
(i.e. performance that is far worse than the
hardware is capable of).
This change speeds up the implementation by about
85%, to the tune of roughly 2.2ms for a 16kB buffer.
The gains originate from various sources: loop
unrolling, data-pipelining, eliminating local
variables (to reduce register pressure), eliminating
support for unaligned input/output data, compiling
hot code with -O (rather the default -Os), and
using the hidden key-ladder, which need only be
setup once per reset.
This change also switches from AES-128 to AES-256.
BRANCH=none
BUG=chrome-os-partner:62260
TEST=make buildall succeeds;
cipher command succeeds;
TCG tests pass
Change-Id: I133741be6d9f1353d6ae732d0e863b4b18cc8c9e
Signed-off-by: nagendra modadugu <ngm@google.com>
Reviewed-on: https://chromium-review.googlesource.com/433359
Commit-Ready: Nagendra Modadugu <ngm@google.com>
Tested-by: Nagendra Modadugu <ngm@google.com>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'board/plankton/usb_pd_policy.c')
0 files changed, 0 insertions, 0 deletions