Home
last modified time | relevance | path

Searched refs:block_mode (Results 1 – 6 of 6) sorted by relevance

/system/keymaster/
Daes_operation.cpp38 inline bool allows_padding(keymaster_block_mode_t block_mode) { in allows_padding() argument
39 switch (block_mode) { in allows_padding()
94 keymaster_block_mode_t block_mode; in CreateOperation() local
95 if (!begin_params.GetTagValue(TAG_BLOCK_MODE, &block_mode)) { in CreateOperation()
99 } else if (!supported(block_mode)) { in CreateOperation()
100 LOG_E("Block mode %d not supported", block_mode); in CreateOperation()
103 } else if (!key.authorizations().Contains(TAG_BLOCK_MODE, block_mode)) { in CreateOperation()
104 LOG_E("Block mode %d was specified, but not authorized by key", block_mode); in CreateOperation()
110 if (block_mode == KM_MODE_GCM) { in CreateOperation()
121 if (!allows_padding(block_mode) && padding != KM_PAD_NONE) { in CreateOperation()
[all …]
Daes_operation.h61 AesEvpOperation(keymaster_purpose_t purpose, keymaster_block_mode_t block_mode,
110 AesEvpEncryptOperation(keymaster_block_mode_t block_mode, keymaster_padding_t padding, in AesEvpEncryptOperation() argument
112 : AesEvpOperation(KM_PURPOSE_ENCRYPT, block_mode, padding, caller_iv, tag_length, key, in AesEvpEncryptOperation()
129 AesEvpDecryptOperation(keymaster_block_mode_t block_mode, keymaster_padding_t padding, in AesEvpDecryptOperation() argument
131 : AesEvpOperation(KM_PURPOSE_DECRYPT, block_mode, padding, in AesEvpDecryptOperation()
Doperation.cpp34 bool OperationFactory::supported(keymaster_block_mode_t block_mode) const { in supported()
38 if (block_mode == supported_block_modes[i]) in supported()
Dandroid_keymaster_test_utils.h248 std::string EncryptMessage(const std::string& message, keymaster_block_mode_t block_mode,
254 keymaster_block_mode_t block_mode, keymaster_padding_t padding,
264 std::string DecryptMessage(const std::string& ciphertext, keymaster_block_mode_t block_mode,
268 std::string DecryptMessage(const std::string& ciphertext, keymaster_block_mode_t block_mode,
274 keymaster_block_mode_t block_mode, keymaster_padding_t padding,
Dandroid_keymaster_test_utils.cpp493 string Keymaster2Test::EncryptMessage(const string& message, keymaster_block_mode_t block_mode, in EncryptMessage() argument
496 return EncryptMessage(update_params, message, block_mode, padding, generated_nonce); in EncryptMessage()
519 keymaster_block_mode_t block_mode, in EncryptMessage() argument
524 begin_params.push_back(TAG_BLOCK_MODE, block_mode); in EncryptMessage()
563 string Keymaster2Test::DecryptMessage(const string& ciphertext, keymaster_block_mode_t block_mode, in DecryptMessage() argument
568 begin_params.push_back(TAG_BLOCK_MODE, block_mode); in DecryptMessage()
584 string Keymaster2Test::DecryptMessage(const string& ciphertext, keymaster_block_mode_t block_mode, in DecryptMessage() argument
589 begin_params.push_back(TAG_BLOCK_MODE, block_mode); in DecryptMessage()
/system/security/keystore/
Dkeystore_client_impl.cpp490 keymaster_block_mode_t block_mode = KM_MODE_ECB; in verifyEncryptionKeyAttributes() local
491 if ((!hardware_enforced_characteristics.GetTagValue(keymaster::TAG_BLOCK_MODE, &block_mode) && in verifyEncryptionKeyAttributes()
492 !software_enforced_characteristics.GetTagValue(keymaster::TAG_BLOCK_MODE, &block_mode)) || in verifyEncryptionKeyAttributes()
493 block_mode != KM_MODE_CBC) { in verifyEncryptionKeyAttributes()