Commit Graph

3 Commits

Author SHA1 Message Date
Vincent Palatin
63a0c47f50 cryptolib: put constant arrays in rodata segment
The SHA256 constants and some algo definitions are currently in the
.data segment, this wastes precious RAM on the EC where read-only data
are stored in flash only.

BUG=chrome-os-partner:12271
TEST=sudo emerge vboot_reference &&
emerge-daisy vboot_reference vboot_reference-firmware chromeos-ec
and manually check the content of the .data segment in the EC binary.

Change-Id: I67b8c0f2843312651e8ac287cea2f8cb5f075453
Reviewed-on: https://gerrit.chromium.org/gerrit/29273
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
2012-08-06 12:06:47 -07:00
Kees Cook
201fe0bb55 cryptolib: rename SHA* function to avoid openssl collision
When linking tools that need OpenSSL functions on the target, the
resolution of SHA* functions was being redirected to the firmware
cryptolib instead of the OpenSSL implementations, which was causing
OpenSSL calls to crash. This renames the internal implementations
to avoid the collision.

BUG=None
TEST=make runtests passes, mount-encrypted runs on target again.

Change-Id: Ica4fb04faf203ae3b4118c540f18d40239753810
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/23305
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
2012-05-22 19:52:55 -07:00
Bill Richardson
3079538053 Separate SHA256 and SHA512 into separate files
This is just to pave the way for better use of vboot by the EC.

BUG=chrome-os-partner:7459
TEST=manual

  make
  make runtests

Change-Id: I2e68371039bfc1b492245db12facf0c5ad592824
Reviewed-on: https://gerrit.chromium.org/gerrit/22301
Tested-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Ready: Bill Richardson <wfrichar@chromium.org>
2012-05-09 18:47:53 -07:00