Commit Graph

8 Commits

Author SHA1 Message Date
Bill Richardson
0c3ba249ab Massive refactoring of external header files.
This reduces the number of exported header files to the minimum needed by
the existing userspace utilities and firmware implementations.

BUG=chromium:221544
BRANCH=none
TEST=manual, trybots
CQ-DEPEND=CL:47019,CL:47022,CL:47023

  sudo FEATURES=test emerge vboot_reference
  FEATURES=test emerge-$BOARD \
                vboot_reference \
                chromeos-cryptohome \
                chromeos-installer \
                chromeos-u-boot \
                peach-u-boot \
                depthcharge

Change-Id: I2946cc2dbaf5459a6c5eca92ca57d546498e6d85
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/47021
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2013-04-02 14:12:52 -07:00
Gabe Black
ac8805e7e9 Get rid of some crufty macros.
These were macros that were never used, or that were only set to one thing and
could be substituted up front.

I left in code guarded by the HAVE_ENDIAN_H and HAVE_LITTLE_ENDIAN macros even
though those are never defined because they guard a reportedly significantly
faster implementation of some functionality, at least according to a comment
in the source. It would be a good idea to enable that code path and see if it
really does make a big difference before removing it entirely.

BUG=None
TEST=Built for Link, Daisy, and the host with FEATURES=test. Built depthcharge
for Link and booted in normal mode.
BRANCH=None

Change-Id: I934a4dd0da169ac018ba07350d56924ab88b1acc
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/45687
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
2013-03-19 16:55:44 -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
vbendeb
3ecaf776d8 Make vboot_reference build in MSVC command line environment.
This is a mostly NOOP change which modifies the source code
to compile cleanly in the MSVC command line build
environment.

A new makefile is introduced (msc/nmakefile) along with a
README.txt in the same directory explaining how to build
the code in the DOS window. As of this submission the build
is running in a 32 bit environment, the intention is to use
the same makefile for 64 bit builds in the future.

Enabling high compilation warnings level allowed to
identify a couple of bugs in the code which are being fixed.

Not all sources are being compiled in the MSVC environment,
only those in firmware/ and most of those in test/
subdirectories. The benchmark calculations require porting
of the timer facilities and are being postponed.

TEST

Built in DOS and linux environments. Ran unit tests in
linux environment.

Review URL: http://codereview.chromium.org/2809037
2010-06-24 16:19:53 -07:00
Gaurav Shah
5411c7a9f0 combined patch for:
http://codereview.chromium.org/1574005
http://codereview.chromium.org/1604001

Review URL: http://codereview.chromium.org/1585007
2010-03-31 10:56:49 -07:00
David Garcia
21c3f7fef7 Revert "VBoot Reference: Refactor Part 2 - Crypto Libraries"
This reverts commit e018a80a37aaa45681f45f5852f04d20aedd8b2d.

Review URL: http://codereview.chromium.org/1593002
2010-03-31 09:04:15 -07:00
Gaurav Shah
d46c347018 VBoot Reference: Refactor Part 2 - Crypto Libraries
Removing multiple top level includes - now padding.h, rsa.h and sha.h are used internally and cryptolib.h must be used instead for all modules that wish to use crypto functions.

I am trying to separate refactors involving code movement from one file to another, and the movement of files themselves into separate CLs so that it's clear what changed.

Review URL: http://codereview.chromium.org/1574005
2010-03-30 23:08:10 -07:00
Gaurav Shah
322536d2f9 RSA signature verification and SHA-1/256/512 reference implementation for verified boot.
Also contains some preliminary tests for these primitives.

Review URL: http://codereview.chromium.org/553023
2010-01-28 15:01:23 -08:00