am 9da1cb51: am f3391a93: Merge changes I4ef53a09,I7c3c5bd5

* commit '9da1cb51c6d9ddca81213211aa5168685557a9cc':
  Remove get_output_size() method from keymaster HAL.
  Add tag to allow caller-specified nonce.
This commit is contained in:
Shawn Willden 2015-02-02 23:43:51 +00:00 committed by Android Git Automerger
commit 901349a66b
2 changed files with 24 additions and 35 deletions

View file

@ -555,18 +555,6 @@ struct keymaster_device {
size_t* out_params_count,
keymaster_operation_handle_t* operation_handle);
/**
* Get an estimate of the output that will be generated by calling update() with the specified
* number of input bytes, followed by finish(). The estimate may not be exact, but is
* guaranteed not to be smaller than sum of the output lengths from update() and finish(). The
* estimate takes into account input data already provided.
*
* \param[in] input_length The number of additional input bytes to be processed.
*
* \param[out] output_estimate The length of the output that will be produced.
*/
keymaster_error_t (*get_output_size)(size_t input_length, size_t* output_estimate);
/**
* Provides data to, and possibly receives output from, an ongoing cryptographic operation begun
* with begin().

View file

@ -110,7 +110,7 @@ typedef enum {
KM_TAG_MAC_LENGTH = KM_INT | 6, /* MAC length in bits. */
KM_TAG_PADDING = KM_ENUM | 7, /* keymaster_padding_t. */
KM_TAG_CHUNK_LENGTH = KM_INT | 8, /* AEAD mode minimum decryption chunk size, in bytes. */
KM_TAG_NONCE = KM_BYTES | 9, /* Nonce or Initialization Vector */
KM_TAG_CALLER_NONCE = KM_BOOL | 9, /* Allow caller to specify nonce or IV. */
/* Other hardware-enforced. */
KM_TAG_RESCOPING_ADD = KM_ENUM_REP | 101, /* Tags authorized for addition via rescoping. */
@ -175,6 +175,7 @@ typedef enum {
/* Tags used only to provide data to operations */
KM_TAG_ADDITIONAL_DATA = KM_BYTES | 1000, /* Used to provide additional data for AEAD modes. */
KM_TAG_NONCE = KM_BYTES | 1001, /* Nonce or Initialization Vector */
} keymaster_tag_t;
/**