Searched refs:ciphertext (Results 1 - 25 of 30) sorted by relevance

12

/system/webservd/webservd/
H A Dfake_encryptor.cc22 // ciphertext. Obviously, this should be used only for testing.
26 std::string* ciphertext) override {
27 *ciphertext = brillo::data_encoding::Base64Encode(plaintext);
31 bool DecryptWithAuthentication(const std::string& ciphertext,
33 return brillo::data_encoding::Base64Decode(ciphertext, plaintext);
H A Dencryptor.h29 // |ciphertext|. Returns true on success.
31 std::string* ciphertext) = 0;
33 // Decrypts and authenticates the given |ciphertext| and emits the
35 virtual bool DecryptWithAuthentication(const std::string& ciphertext,
H A Dfake_encryptor.h25 // ciphertext. Obviously, this should be used only for testing.
29 std::string* ciphertext) override;
31 bool DecryptWithAuthentication(const std::string& ciphertext,
H A Dkeystore_encryptor.cc40 std::string* ciphertext) {
42 ciphertext);
45 bool KeystoreEncryptor::DecryptWithAuthentication(const std::string& ciphertext, argument
47 return keystore_->decryptWithAuthentication(kWebserverKeyName, ciphertext,
39 EncryptWithAuthentication(const std::string& plaintext, std::string* ciphertext) argument
H A Dkeystore_encryptor.h36 std::string* ciphertext) override;
37 bool DecryptWithAuthentication(const std::string& ciphertext,
/system/connectivity/shill/
H A Dcrypto_rot47.cc31 bool CryptoROT47::Encrypt(const string& plaintext, string* ciphertext) { argument
37 *ciphertext = plaintext;
38 for (auto& ch : *ciphertext) {
48 bool CryptoROT47::Decrypt(const string& ciphertext, string* plaintext) { argument
50 return Encrypt(ciphertext, plaintext);
H A Dcrypto_interface.h32 // Encrypts |plaintext| into |ciphertext|. Returns true on success.
34 std::string* ciphertext) = 0;
36 // Decrypts |ciphertext| into |plaintext|. Returns true on success.
37 virtual bool Decrypt(const std::string& ciphertext,
H A Dcrypto_provider.cc49 string ciphertext; local
50 if (crypto->Encrypt(plaintext, &ciphertext)) {
52 return prefix + ciphertext;
59 string CryptoProvider::Decrypt(const string& ciphertext) { argument
62 if (base::StartsWith(ciphertext, prefix, base::CompareCase::SENSITIVE)) {
63 string to_decrypt = ciphertext;
74 return ciphertext;
H A Dcrypto_rot47.h37 virtual bool Encrypt(const std::string& plaintext, std::string* ciphertext);
38 virtual bool Decrypt(const std::string& ciphertext, std::string* plaintext);
H A Dcrypto_des_cbc.h50 virtual bool Encrypt(const std::string& plaintext, std::string* ciphertext);
51 virtual bool Decrypt(const std::string& ciphertext, std::string* plaintext);
H A Dcrypto_des_cbc.cc42 bool CryptoDESCBC::Encrypt(const string& plaintext, string* ciphertext) { argument
48 bool CryptoDESCBC::Decrypt(const string& ciphertext, string* plaintext) { argument
52 string b64_ciphertext = ciphertext;
53 if (base::StartsWith(ciphertext, kVersion2Prefix,
61 LOG(ERROR) << "Unable to base64-decode DEC-CBC ciphertext.";
68 LOG(ERROR) << "Invalid DES-CBC ciphertext size: " << data.size();
H A Dcrypto_provider.h41 // Returns |ciphertext| decrypted by the highest priority available crypto
43 // |ciphertext| as is.
44 std::string Decrypt(const std::string& ciphertext);
H A Dcrypto_des_cbc_unittest.cc97 string ciphertext; local
98 EXPECT_FALSE(crypto_.Encrypt(kPlainText, &ciphertext));
/system/weaved/buffet/
H A Dfake_encryptor.cc26 std::string* ciphertext) override {
27 *ciphertext = brillo::data_encoding::Base64Encode(plaintext);
31 bool DecryptWithAuthentication(const std::string& ciphertext,
33 return brillo::data_encoding::Base64Decode(ciphertext, plaintext);
H A Dkeystore_encryptor.cc40 std::string* ciphertext) {
42 ciphertext);
45 bool KeystoreEncryptor::DecryptWithAuthentication(const std::string& ciphertext, argument
47 return keystore_->decryptWithAuthentication(kBuffetKeyName, ciphertext,
39 EncryptWithAuthentication(const std::string& plaintext, std::string* ciphertext) argument
H A Dencryptor.h32 // |ciphertext|. Returns true on success.
34 std::string* ciphertext) = 0;
36 // Decrypts and authenticates the given |ciphertext| and emits the
38 virtual bool DecryptWithAuthentication(const std::string& ciphertext,
H A Dkeystore_encryptor.h36 std::string* ciphertext) override;
37 bool DecryptWithAuthentication(const std::string& ciphertext,
H A Dbuffet_config_unittest.cc94 std::string* ciphertext) override {
95 *ciphertext = brillo::data_encoding::Base64Encode(plaintext);
98 bool DecryptWithAuthentication(const std::string& ciphertext,
101 brillo::data_encoding::Base64Decode(ciphertext, plaintext);
/system/keymaster/
H A Docb_utils.h38 KeymasterKeyBlob* ciphertext, Buffer* tag);
43 const KeymasterKeyBlob& ciphertext, const Buffer& nonce,
H A Docb_utils.cpp122 KeymasterKeyBlob* ciphertext, Buffer* tag) {
123 assert(ciphertext && tag);
137 if (!ciphertext->Reset(plaintext.key_material_size))
142 0 /* additional data length */, ciphertext->writable_data(),
157 const KeymasterKeyBlob& ciphertext, const Buffer& nonce,
173 if (!plaintext->Reset(ciphertext.key_material_size))
176 int ae_err = ae_decrypt(ctx.get(), nonce.peek_read(), ciphertext.key_material,
177 ciphertext.key_material_size, NULL /* additional data */,
190 assert(ae_err == static_cast<int>(ciphertext.key_material_size));
118 OcbEncryptKey(const AuthorizationSet& hw_enforced, const AuthorizationSet& sw_enforced, const AuthorizationSet& hidden, const KeymasterKeyBlob& master_key, const KeymasterKeyBlob& plaintext, const Buffer& nonce, KeymasterKeyBlob* ciphertext, Buffer* tag) argument
154 OcbDecryptKey(const AuthorizationSet& hw_enforced, const AuthorizationSet& sw_enforced, const AuthorizationSet& hidden, const KeymasterKeyBlob& master_key, const KeymasterKeyBlob& ciphertext, const Buffer& nonce, const Buffer& tag, KeymasterKeyBlob* plaintext) argument
H A Dandroid_keymaster_test.cpp1916 string ciphertext = EncryptMessage(message, KM_MODE_ECB, KM_PAD_PKCS7); local
1917 string plaintext = DecryptMessage(ciphertext, KM_MODE_ECB, KM_PAD_PKCS7);
1970 string ciphertext = EncryptMessage(message, KM_PAD_NONE); local
1971 EXPECT_EQ(256U / 8, ciphertext.size());
1974 string plaintext = DecryptMessage(ciphertext, KM_PAD_NONE);
2092 string ciphertext = EncryptMessage(string(message), KM_DIGEST_SHA_2_256, KM_PAD_RSA_OAEP); local
2093 EXPECT_EQ(key_size / 8, ciphertext.size());
2095 string plaintext = DecryptMessage(ciphertext, KM_DIGEST_SHA_2_256, KM_PAD_RSA_OAEP);
2109 string ciphertext = EncryptMessage(string(message), KM_DIGEST_SHA_2_224, KM_PAD_RSA_OAEP); local
2110 EXPECT_EQ(key_size / 8, ciphertext
2169 string ciphertext = EncryptMessage(string(message), KM_DIGEST_SHA_2_256, KM_PAD_RSA_OAEP); local
2213 string ciphertext = EncryptMessage(string(message), KM_DIGEST_SHA_2_256, KM_PAD_RSA_OAEP); local
2254 string ciphertext = EncryptMessage(message, KM_PAD_RSA_PKCS1_1_5_ENCRYPT); local
2292 string ciphertext = EncryptMessage(message, digest, padding); local
2325 string ciphertext = EncryptMessage(string(message), KM_PAD_RSA_PKCS1_1_5_ENCRYPT); local
2427 string ciphertext; local
2445 string ciphertext = EncryptMessage(message, KM_MODE_ECB, KM_PAD_PKCS7); local
2479 string ciphertext = EncryptMessage(message, KM_MODE_ECB, KM_PAD_PKCS7); local
2537 string ciphertext; local
2568 const char* ciphertext; member in struct:keymaster::test::AesCtrSp80038aTestVector
2607 const string ciphertext = hex2str(test.ciphertext); local
2755 string ciphertext; local
2792 string ciphertext = EncryptMessage(message, KM_MODE_CBC, KM_PAD_PKCS7, &iv); local
2820 string ciphertext; local
2886 string ciphertext; local
2912 uint8_t ciphertext[] = { local
2985 string ciphertext; local
3026 string ciphertext; local
3098 string ciphertext; local
3152 string ciphertext; local
3196 string ciphertext; local
3238 string ciphertext; local
3678 string ciphertext = EncryptMessage(message, KM_MODE_ECB, KM_PAD_NONE); local
3724 string ciphertext = EncryptMessage(message, KM_PAD_NONE); local
[all...]
H A Dandroid_keymaster_test_utils.cpp475 string ciphertext = local
484 return ciphertext;
506 string ciphertext = local
515 return ciphertext;
525 string ciphertext = local
534 return ciphertext;
545 string Keymaster2Test::DecryptMessage(const string& ciphertext, keymaster_padding_t padding) { argument
550 return ProcessMessage(KM_PURPOSE_DECRYPT, ciphertext, begin_params, update_params);
553 string Keymaster2Test::DecryptMessage(const string& ciphertext, keymaster_digest_t digest, argument
560 return ProcessMessage(KM_PURPOSE_DECRYPT, ciphertext, begin_param
563 DecryptMessage(const string& ciphertext, keymaster_block_mode_t block_mode, keymaster_padding_t padding) argument
573 DecryptMessage(const string& ciphertext, keymaster_digest_t digest, keymaster_padding_t padding, const string& nonce) argument
584 DecryptMessage(const string& ciphertext, keymaster_block_mode_t block_mode, keymaster_padding_t padding, const string& nonce) argument
595 DecryptMessage(const AuthorizationSet& update_params, const string& ciphertext, keymaster_digest_t digest, keymaster_padding_t padding, const string& nonce) argument
651 string ciphertext = local
[all...]
H A Dandroid_keymaster_test_utils.h261 std::string DecryptMessage(const std::string& ciphertext, keymaster_padding_t padding);
262 std::string DecryptMessage(const std::string& ciphertext, keymaster_digest_t digest,
264 std::string DecryptMessage(const std::string& ciphertext, keymaster_block_mode_t block_mode,
266 std::string DecryptMessage(const std::string& ciphertext, keymaster_digest_t digest,
268 std::string DecryptMessage(const std::string& ciphertext, keymaster_block_mode_t block_mode,
270 std::string DecryptMessage(const AuthorizationSet& update_params, const std::string& ciphertext,
273 std::string DecryptMessage(const AuthorizationSet& update_params, const std::string& ciphertext,
/system/vold/
H A DKeyStorage.cpp141 const std::string& message, std::string* ciphertext) {
160 *ciphertext = nonce + body + mac;
166 const std::string& ciphertext, std::string* message) {
167 auto nonce = ciphertext.substr(0, GCM_NONCE_BYTES);
168 auto bodyAndMac = ciphertext.substr(GCM_NONCE_BYTES);
139 encryptWithKeymasterKey(Keymaster& keymaster, const std::string& key, const KeyAuthentication& auth, const std::string& appId, const std::string& message, std::string* ciphertext) argument
164 decryptWithKeymasterKey(Keymaster& keymaster, const std::string& key, const KeyAuthentication& auth, const std::string& appId, const std::string& ciphertext, std::string* message) argument
/system/tpm/trunks/
H A Dtrunks_client_test.cc479 std::string ciphertext; local
483 &ciphertext);
497 TPM_ALG_NULL, ciphertext,
644 std::string ciphertext; local
646 "plaintext", nullptr, &ciphertext);
666 ciphertext, policy_session->GetDelegate(),
766 std::string ciphertext; local
768 "plaintext", nullptr, &ciphertext);
787 ciphertext, policy_session->GetDelegate(),
962 std::string ciphertext; local
[all...]

Completed in 234 milliseconds

12