Vadim Bendebury 2196df6070 cr50: add extension command handler for AES testing
The format of the payload the handler expects is as follows:

  field       |    size  |              note
  ================================================================
  mode        |    1     | 0 - decrypt, 1 - encrypt
  cipher_mode |    1     | ECB = 0, CTR = 1, CBC = 2, GCM = 3
  key_len     |    1     | key size in bytes (16, 24 or 32)
  key         | key len  | key to use
  iv_len      |    1     | either 0 or 16
  iv          | 0 or 16  | as defined by iv_len
  text_len    |    2     | size of the text to process, big endian
  text        | text_len | text to encrypt/decrypt

Current limitations are such that actual size of the payload should
not exceed 2036 bytes and only ECB and CTR cipher modes are supported.

If necessary, input data is padded to the closest size divisible by
16.

The response generated by the handler consists of the result of the
encrypt/decrypt operation, it is always an integer amount of 16 byte
blocks.

The test code is compiled in if CRYPTO_TEST_SETUP is defined, which it
presently is.

BRANCH=none
BUG=chrome-os-partner:47524
TEST=Using the python utility on the host, exercised several NIST test
    vectors for ECB and CTR, with key sizes of 128, 192 and 256 bytes
    for both AES types. Both cipher text and decryption result match
    the vector values.

Change-Id: I148f286d614f0212192a95b5518cddd32935f43d
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/312720
Reviewed-by: Nagendra Modadugu <ngm@google.com>
2015-11-18 20:39:57 -08:00
2015-05-07 00:00:47 +00:00
2012-05-11 09:11:52 -07:00
2014-04-02 19:58:53 +00:00
2014-05-15 05:20:14 +00:00

For an overview of the Embedded Controller firmware, refer to

http://www.chromium.org/chromium-os/2014-firmware-summit
Description
No description provided
Readme 1.4 GiB
Languages
C 64.7%
Lasso 20.7%
ASL 3.6%
JavaScript 3.2%
C# 2.9%
Other 4.6%