attestation: Implemented an asymmetric Decrypt operation.

Keys that are created with a KEY_USAGE_DECRYPT usage can be used to
decrypt using this operation. The encrypted data must use the
TPM_BOUND_DATA format and the TPM_ES_RSAESOAEP_SHA1_MGF1 mechanism.

BUG=brillo:737
TEST=unit, manual using 'attestation_client decrypt' and
'attestation_client encrypt'

Change-Id: Iae8fe01abf0c635d853974518c9b5e918f7b88c1
Reviewed-on: https://chromium-review.googlesource.com/269777
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Utkarsh Sanghi <usanghi@chromium.org>
Commit-Queue: Darren Krahn <dkrahn@chromium.org>
Tested-by: Darren Krahn <dkrahn@chromium.org>
24 files changed
tree: 93d00abd6fc2d05cb8b027abbf0288392521a8b2
  1. OWNERS
  2. attestation.gyp
  3. attestation_testrunner.cc
  4. client/
  5. common/
  6. server/