summaryrefslogtreecommitdiff
path: root/common/sha256.c
Commit message (Collapse)AuthorAgeFilesLines
* common/sha256: Move to third_partyNicolas Boichat2020-03-251-297/+1
| | | | | | | | | | | | | | The code originally comes from vboot_reference, and is now found on github: https://github.com/ogay/sha2 . BRANCH=none BUG=chromium:884905 TEST=make buildall -j, which also include basic tests. Change-Id: I8beac95430b2126f625a3981a9ebe038ab588212 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1599763 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* common/sha256: agressive SHA-256 unrolling as an optionNicolas Boichat2017-09-111-0/+26
| | | | | | | | | | | | | | | | Reduces "hash done" time from ~1.30 to ~1.15s on soraka. BRANCH=none BUG=chromium:702378 BUG=b:64196191 TEST=Boot soraka, looks at hash done time. TEST=make run-sha256 run-sha256_unrolled passes. Change-Id: Ia29ee27404d6e9aa615ff59755b59d3f26648e71 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/652327 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* sha256: add support for hmac_sha256, and add test for sha256Nicolas Boichat2017-06-141-0/+57
| | | | | | | | | | | | | | BRANCH=none BUG=b:38486828 TEST=make run-sha256 TEST=make buildall -j Change-Id: I4c5b5d81ae5650ebfbdc989a0d860eeb0a60f68b Reviewed-on: https://chromium-review.googlesource.com/530207 Commit-Ready: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* common: Drop unused data structureStefan Reinauer2016-05-051-8/+0
| | | | | | | | | | | | | SHA256_digestinfo[] is never used but declared static and const. Signed-off-by: Stefan Reinauer <reinauer@chromium.org> BRANCH=none BUG=none TEST=compile tested Change-Id: I0bcf419bf63fac3e6eadd9efad10fc05b7be9158 Reviewed-on: https://chromium-review.googlesource.com/342484 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* cleanup: Remove checkpatch warningsRandall Spangler2013-12-191-1/+1
| | | | | | | | | | | | | | | | This make minor syntactic changes and renames some camel-cased symbols to keep checkpatch from complaining. The goal is to reduce the temptation to use 'repo upload --no-verify'. This is a big furball of find/replace, but no functional changes. BUG=chromium:322144 BRANCH=none TEST=build all boards; pass unit tests Change-Id: I0269b7dd95836ef9a6e33f88c003ab0f24f842a0 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/180495
* Clean up vboot hash supportRandall Spangler2012-10-251-0/+222
This copies the parts of sha256.c that we need from vboot_reference, and removes the explicit dependency on vboot_reference. That dependency was a good idea when we were doing full verified boot in the EC, but is now overkill and makes it harder for others to reuse the EC code. This also lets us call EC functions directly instead of needing vboot_stub.cc; that reduces code size by ~100 bytes. BUG=chrome-os-partner:15579 BRANCH=none TEST=vboot_hash ro, then compare with result of sha256sum build/link/ec.RO.flat Change-Id: I0f236174291df3e7f3c75e960fe9ab32af305a61 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/36589 Reviewed-by: Bill Richardson <wfrichar@chromium.org>