Files
OpenCellular/chip
Vadim Bendebury 35e3287c53 g: add a convenience wrapper for application data ciphering
This change introduces DCRYPTO_app_cipher(), an encrypt/decrypt
function that accepts an IV and corresponding data. Typical
restrictions on IV reuse apply. The key is derived from the hardware
based on the type of the RW image signature (dev vs prod).

A console command is added to exercise the cipher function.

Since stack requirements of the dcrypto code exceed the console task
allowance, the actual command is executed on the HOOKs task context.

BRANCH=none
BUG=chrome-os-partner:55331
TEST=make buildall -j passes. Running the cipher command from the
     console succeeds:

  > cipher
  original data           ad67d44cb4feffff6b3b334635eb9612
  rv 0x01, out data       861dc395a2fc745ca886a703cb02a897, time 16636 us
  rv 0x01, orig. data     ad67d44cb4feffff6b3b334635eb9612, time 17004 us
  sha1 before and after match!
  >

Change-Id: I7686d8c8489c1b8a984859c3be4f82c338573c6f
Signed-off-by: nagendra modadugu <ngm@google.com>
Signed-off-by: Marius Schilder <mschilder@chromium.org>
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/428171
Reviewed-by: Nagendra Modadugu <ngm@google.com>
2017-01-22 15:54:43 -08:00
..
2017-01-11 14:46:29 -08:00
2017-01-10 21:35:30 -08:00
2016-11-18 20:07:08 -08:00