Home
last modified time | relevance | path

Searched refs:Buffer (Results 1 – 25 of 52) sorted by relevance

123

/system/keymaster/include/keymaster/km_openssl/
Dkem.h40 virtual bool Encrypt(const Buffer& peer_public_value, Buffer* output_clear_key,
41 Buffer* output_encrypted_key) = 0;
43 Buffer* output_clear_key, Buffer* output_encrypted_key) = 0;
47 virtual bool Decrypt(EC_KEY* private_key, const Buffer& encrypted_key, Buffer* output_key) = 0;
49 size_t encrypted_key_len, Buffer* output_key) = 0;
Decies_kem.h42 bool Encrypt(const Buffer& peer_public_value, Buffer* output_clear_key,
43 Buffer* output_encrypted_key) override;
45 Buffer* output_clear_key, Buffer* output_encrypted_key) override;
47 bool Decrypt(EC_KEY* private_key, const Buffer& encrypted_key, Buffer* output_key) override;
49 Buffer* output_key) override;
Drsa_operation.h45 keymaster_error_t Update(const AuthorizationSet& additional_params, const Buffer& input,
46 AuthorizationSet* output_params, Buffer* output,
57 keymaster_error_t StoreData(const Buffer& input, size_t* input_consumed);
63 Buffer data_;
99 keymaster_error_t Update(const AuthorizationSet& additional_params, const Buffer& input,
100 AuthorizationSet* output_params, Buffer* output,
102 keymaster_error_t Finish(const AuthorizationSet& additional_params, const Buffer& input,
103 const Buffer& signature, AuthorizationSet* output_params,
104 Buffer* output) override;
107 keymaster_error_t SignUndigested(Buffer* output);
[all …]
Decdsa_operation.h43 keymaster_error_t StoreData(const Buffer& input, size_t* input_consumed);
50 Buffer data_;
60 keymaster_error_t Update(const AuthorizationSet& additional_params, const Buffer& input,
61 AuthorizationSet* output_params, Buffer* output,
63 keymaster_error_t Finish(const AuthorizationSet& additional_params, const Buffer& input,
64 const Buffer& signature, AuthorizationSet* output_params,
65 Buffer* output) override;
75 keymaster_error_t Update(const AuthorizationSet& additional_params, const Buffer& input,
76 AuthorizationSet* output_params, Buffer* output,
78 keymaster_error_t Finish(const AuthorizationSet& additional_params, const Buffer& input,
[all …]
Dkey_exchange.h39 virtual bool CalculateSharedKey(const Buffer& peer_public_value, Buffer* shared_key) const = 0;
41 Buffer* shared_key) const = 0;
47 virtual bool public_value(Buffer* public_value) const = 0;
Dhmac.h35 bool Init(const Buffer& key);
40 bool Sign(const Buffer& data, uint8_t* digest, size_t digest_len) const;
49 bool Verify(const Buffer& data, const Buffer& digest) const;
Dnist_curve_key_exchange.h54 Buffer* shared_key) const override;
55 bool CalculateSharedKey(const Buffer& peer_public_value, Buffer* shared_key) const override;
56 bool public_value(Buffer* public_value) const override;
/system/chre/util/tests/
Dbuffer_test.cc22 using chre::Buffer;
30 TEST(Buffer, EmptyByDefault) { in TEST() argument
31 Buffer<float> buffer; in TEST()
36 TEST(Buffer, Wrap) { in TEST() argument
40 Buffer<float> buffer; in TEST()
46 TEST(Buffer, CopyArray) { in TEST() argument
50 Buffer<float> buffer; in TEST()
59 TEST(Buffer, CopyArrayEmpty) { in TEST() argument
60 Buffer<float> buffer; in TEST()
66 TEST(Buffer, CopyArrayEmptyAfterWrap) { in TEST() argument
[all …]
/system/keymaster/km_openssl/
Dblock_cipher_operation.h78 keymaster_error_t Update(const AuthorizationSet& additional_params, const Buffer& input,
79 AuthorizationSet* output_params, Buffer* output,
81 keymaster_error_t Finish(const AuthorizationSet& additional_params, const Buffer& input,
82 const Buffer& signature, AuthorizationSet* output_params,
83 Buffer* output) override;
92 bool HandleAad(const AuthorizationSet& input_params, const Buffer& input,
97 bool InternalUpdate(const uint8_t* input, size_t input_length, Buffer* output,
99 bool UpdateForFinish(const AuthorizationSet& additional_params, const Buffer& input,
100 AuthorizationSet* output_params, Buffer* output, keymaster_error_t* error);
128 keymaster_error_t Finish(const AuthorizationSet& additional_params, const Buffer& input,
[all …]
Decies_kem.cpp75 bool EciesKem::Encrypt(const Buffer& peer_public_value, Buffer* output_clear_key, in Encrypt()
76 Buffer* output_encrypted_key) { in Encrypt()
83 Buffer* output_clear_key, Buffer* output_encrypted_key) { in Encrypt()
90 Buffer shared_secret; in Encrypt()
101 Buffer z; in Encrypt()
109 Buffer actual_secret(z.available_read() + shared_secret.available_read()); in Encrypt()
129 bool EciesKem::Decrypt(EC_KEY* private_key, const Buffer& encrypted_key, Buffer* output_key) { in Decrypt()
136 Buffer* output_key) { in Decrypt()
144 Buffer shared_secret; in Decrypt()
150 Buffer public_value; in Decrypt()
[all …]
Dhmac_operation.h33 virtual keymaster_error_t Update(const AuthorizationSet& additional_params, const Buffer& input,
34 AuthorizationSet* output_params, Buffer* output,
37 virtual keymaster_error_t Finish(const AuthorizationSet& additional_params, const Buffer& input,
38 const Buffer& signature, AuthorizationSet* output_params,
39 Buffer* output);
Decdsa_operation.cpp94 keymaster_error_t EcdsaOperation::StoreData(const Buffer& input, size_t* input_consumed) { in StoreData()
126 const Buffer& input, in Update()
128 Buffer* /* output */, size_t* input_consumed) { in Update() argument
139 const Buffer& input, const Buffer& /* signature */, in Finish() argument
141 Buffer* output) { in Finish()
195 const Buffer& input, in Update()
197 Buffer* /* output */, size_t* input_consumed) { in Update() argument
208 const Buffer& input, const Buffer& signature, in Finish()
210 Buffer* /* output */) { in Finish() argument
Drsa_operation.cpp147 const Buffer& input, AuthorizationSet* /* output_params */, in Update()
148 Buffer* /* output */, size_t* input_consumed) { in Update() argument
161 keymaster_error_t RsaOperation::StoreData(const Buffer& input, size_t* input_consumed) { in StoreData()
283 const Buffer& input, AuthorizationSet* output_params, in Update()
284 Buffer* output, size_t* input_consumed) { in Update()
297 const Buffer& input, const Buffer& /* signature */, in Finish() argument
298 AuthorizationSet* /* output_params */, Buffer* output) { in Finish()
311 static keymaster_error_t zero_pad_left(UniquePtr<uint8_t[]>* dest, size_t padded_len, Buffer& src) { in zero_pad_left()
326 keymaster_error_t RsaSignOperation::SignUndigested(Buffer* output) { in SignUndigested()
374 keymaster_error_t RsaSignOperation::SignDigested(Buffer* output) { in SignDigested()
[all …]
Dblock_cipher_operation.cpp169 const Buffer& input, in Update()
171 Buffer* output, size_t* input_consumed) { in Update()
186 const Buffer& input, in Finish() argument
187 const Buffer& /* signature */, in Finish()
188 AuthorizationSet* output_params, Buffer* output) { in Finish()
287 bool BlockCipherEvpOperation::HandleAad(const AuthorizationSet& input_params, const Buffer& input, in HandleAad()
360 Buffer* output, keymaster_error_t* error) { in InternalUpdate()
380 const Buffer& input, AuthorizationSet* output_params, in UpdateForFinish()
381 Buffer* output, keymaster_error_t* error) { in UpdateForFinish()
417 const Buffer& input, in Finish()
[all …]
Dhmac.cpp34 bool HmacSha256::Init(const Buffer& key) { in Init()
50 bool HmacSha256::Sign(const Buffer& data, uint8_t* out_digest, size_t digest_len) const { in Sign()
72 bool HmacSha256::Verify(const Buffer& data, const Buffer& digest) const { in Verify()
/system/keymaster/include/keymaster/key_blob_utils/
Dauth_encrypted_key_blob.h25 class Buffer; variable
32 const Buffer& nonce, const Buffer& tag,
38 AuthorizationSet* sw_enforced, Buffer* nonce,
39 Buffer* tag);
Docb_utils.h38 const KeymasterKeyBlob& plaintext, const Buffer& nonce,
39 KeymasterKeyBlob* ciphertext, Buffer* tag);
44 const KeymasterKeyBlob& ciphertext, const Buffer& nonce,
45 const Buffer& tag, KeymasterKeyBlob* plaintext);
/system/keymaster/legacy_support/
Dkeymaster_passthrough_operation.h56 keymaster_error_t Update(const AuthorizationSet& input_params, const Buffer& input, in Update()
57 AuthorizationSet* output_params, Buffer* output, in Update()
73 keymaster_error_t Finish(const AuthorizationSet& input_params, const Buffer& input,
74 const Buffer& signature, AuthorizationSet* output_params,
75 Buffer* output) override;
85 const AuthorizationSet& input_params, const Buffer& input, const Buffer& signature,
86 AuthorizationSet* output_params, Buffer* output);
89 const AuthorizationSet& input_params, const Buffer& input, const Buffer& signature,
90 AuthorizationSet* output_params, Buffer* output);
Dkeymaster_passthrough_operation.cpp27 const Buffer& input, in Finish()
28 const Buffer& signature, AuthorizationSet* output_params, in Finish()
29 Buffer* output) { in Finish()
95 …ghOperation<keymaster2_device_t>::Finish(const AuthorizationSet& input_params, const Buffer& input, in Finish()
96 const Buffer& signature, AuthorizationSet* output_params, in Finish()
97 Buffer* output) { in Finish()
/system/keymaster/android_keymaster/
Dserializable.cpp78 bool Buffer::reserve(size_t size) { in reserve()
94 bool Buffer::Reinitialize(size_t size) { in Reinitialize()
105 bool Buffer::Reinitialize(const void* data, size_t data_len) { in Reinitialize()
119 size_t Buffer::available_write() const { in available_write()
124 size_t Buffer::available_read() const { in available_read()
130 bool Buffer::write(const uint8_t* src, size_t write_length) { in write()
138 bool Buffer::read(uint8_t* dest, size_t read_length) { in read()
146 size_t Buffer::SerializedSize() const { in SerializedSize()
150 uint8_t* Buffer::Serialize(uint8_t* buf, const uint8_t* end) const { in Serialize()
154 bool Buffer::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize()
[all …]
/system/keymaster/tests/
Decies_kem_test.cpp55 Buffer peer_public_value; in TEST()
58 Buffer output_clear_key; in TEST()
59 Buffer output_encrypted_key; in TEST()
64 Buffer decrypted_clear_key; in TEST()
Dhmac_test.cpp67 Buffer key_buffer(key.data(), key.size()); in TEST()
72 Buffer digest_buffer(reinterpret_cast<uint8_t*>(digest_copy), sizeof(digest_copy)); in TEST()
74 Buffer data_buffer(test.data, strlen(test.data)); in TEST()
/system/keymaster/include/keymaster/
Doperation.h112 virtual keymaster_error_t Update(const AuthorizationSet& input_params, const Buffer& input,
113 AuthorizationSet* output_params, Buffer* output,
115 virtual keymaster_error_t Finish(const AuthorizationSet& input_params, const Buffer& input,
116 const Buffer& signature, AuthorizationSet* output_params,
117 Buffer* output) = 0;
123 keymaster_error_t UpdateForFinish(const AuthorizationSet& input_params, const Buffer& input);
Dserializable.h205 class Buffer : public Serializable {
207 Buffer() : buffer_(nullptr), buffer_size_(0), read_position_(0), write_position_(0) {} in Buffer() function
208 explicit Buffer(size_t size) : buffer_(nullptr) { Reinitialize(size); } in Buffer() function
209 Buffer(const void* buf, size_t size) : buffer_(nullptr) { Reinitialize(buf, size); } in Buffer() function
218 bool Reinitialize(const Buffer& buffer) { in Reinitialize()
256 void operator=(const Buffer& other);
257 Buffer(const Buffer&);
/system/keymaster/key_blob_utils/
Dauth_encrypted_key_blob.cpp33 const Buffer& nonce, const Buffer& tag, in SerializeAuthEncryptedBlob()
60 AuthorizationSet* sw_enforced, Buffer* nonce, in DeserializeUnversionedBlob()
61 Buffer* tag) { in DeserializeUnversionedBlob()
85 AuthorizationSet* sw_enforced, Buffer* nonce, in DeserializeAuthEncryptedBlob()
86 Buffer* tag) { in DeserializeAuthEncryptedBlob()

123