Home
last modified time | relevance | path

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

12

/system/keymaster/
Daes_operation.h68 keymaster_error_t Update(const AuthorizationSet& additional_params, const Buffer& input,
69 AuthorizationSet* output_params, Buffer* output,
71 keymaster_error_t Finish(const AuthorizationSet& additional_params, const Buffer& input,
72 const Buffer& signature, AuthorizationSet* output_params,
73 Buffer* output) override;
82 bool HandleAad(const AuthorizationSet& input_params, const Buffer& input,
87 bool InternalUpdate(const uint8_t* input, size_t input_length, Buffer* output,
89 bool UpdateForFinish(const AuthorizationSet& additional_params, const Buffer& input,
90 AuthorizationSet* output_params, Buffer* output, keymaster_error_t* error);
117 keymaster_error_t Finish(const AuthorizationSet& additional_params, const Buffer& input,
[all …]
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;
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 …]
Drsa_operation.h44 keymaster_error_t Update(const AuthorizationSet& additional_params, const Buffer& input,
45 AuthorizationSet* output_params, Buffer* output,
56 keymaster_error_t StoreData(const Buffer& input, size_t* input_consumed);
62 Buffer data_;
95 keymaster_error_t Update(const AuthorizationSet& additional_params, const Buffer& input,
96 AuthorizationSet* output_params, Buffer* output,
98 keymaster_error_t Finish(const AuthorizationSet& additional_params, const Buffer& input,
99 const Buffer& signature, AuthorizationSet* output_params,
100 Buffer* output) override;
103 keymaster_error_t SignUndigested(Buffer* output);
[all …]
Decdsa_operation.h40 keymaster_error_t StoreData(const Buffer& input, size_t* input_consumed);
47 Buffer data_;
56 keymaster_error_t Update(const AuthorizationSet& additional_params, const Buffer& input,
57 AuthorizationSet* output_params, Buffer* output,
59 keymaster_error_t Finish(const AuthorizationSet& additional_params, const Buffer& input,
60 const Buffer& signature, AuthorizationSet* output_params,
61 Buffer* output) override;
70 keymaster_error_t Update(const AuthorizationSet& additional_params, const Buffer& input,
71 AuthorizationSet* output_params, Buffer* output,
73 keymaster_error_t Finish(const AuthorizationSet& additional_params, const Buffer& input,
[all …]
Dauth_encrypted_key_blob.h25 class Buffer; variable
31 const Buffer& nonce, const Buffer& tag,
37 AuthorizationSet* sw_enforced, Buffer* nonce,
38 Buffer* tag);
Dserializable.cpp70 bool Buffer::reserve(size_t size) { in reserve()
86 bool Buffer::Reinitialize(size_t size) { in Reinitialize()
97 bool Buffer::Reinitialize(const void* data, size_t data_len) { in Reinitialize()
111 size_t Buffer::available_write() const { in available_write()
116 size_t Buffer::available_read() const { in available_read()
122 bool Buffer::write(const uint8_t* src, size_t write_length) { in write()
130 bool Buffer::read(uint8_t* dest, size_t read_length) { in read()
138 size_t Buffer::SerializedSize() const { in SerializedSize()
142 uint8_t* Buffer::Serialize(uint8_t* buf, const uint8_t* end) const { in Serialize()
146 bool Buffer::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize()
[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;
Decdsa_operation.cpp98 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()
191 const Buffer& input, in Update()
193 Buffer* /* output */, size_t* input_consumed) { in Update() argument
204 const Buffer& input, const Buffer& signature, in Finish()
206 Buffer* /* output */) { in Finish() argument
Docb_utils.h37 const KeymasterKeyBlob& plaintext, const Buffer& nonce,
38 KeymasterKeyBlob* ciphertext, Buffer* tag);
43 const KeymasterKeyBlob& ciphertext, const Buffer& nonce,
44 const Buffer& tag, KeymasterKeyBlob* plaintext);
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;
Drsa_operation.cpp145 const Buffer& input, AuthorizationSet* /* output_params */, in Update()
146 Buffer* /* output */, size_t* input_consumed) { in Update() argument
159 keymaster_error_t RsaOperation::StoreData(const Buffer& input, size_t* input_consumed) { in StoreData()
279 const Buffer& input, AuthorizationSet* output_params, in Update()
280 Buffer* output, size_t* input_consumed) { in Update()
293 const Buffer& input, const Buffer& /* signature */, in Finish() argument
294 AuthorizationSet* /* output_params */, Buffer* output) { in Finish()
307 static keymaster_error_t zero_pad_left(UniquePtr<uint8_t[]>* dest, size_t padded_len, Buffer& src) { in zero_pad_left()
322 keymaster_error_t RsaSignOperation::SignUndigested(Buffer* output) { in SignUndigested()
370 keymaster_error_t RsaSignOperation::SignDigested(Buffer* output) { in SignDigested()
[all …]
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;
Dhmac_operation.h34 virtual keymaster_error_t Update(const AuthorizationSet& additional_params, const Buffer& input,
35 AuthorizationSet* output_params, Buffer* output,
38 virtual keymaster_error_t Finish(const AuthorizationSet& additional_params, const Buffer& input,
39 const Buffer& signature, AuthorizationSet* output_params,
40 Buffer* output);
Doperation.h105 virtual keymaster_error_t Update(const AuthorizationSet& input_params, const Buffer& input,
106 AuthorizationSet* output_params, Buffer* output,
108 virtual keymaster_error_t Finish(const AuthorizationSet& input_params, const Buffer& input,
109 const Buffer& signature, AuthorizationSet* output_params,
110 Buffer* output) = 0;
116 keymaster_error_t UpdateForFinish(const AuthorizationSet& input_params, const Buffer& input);
Daes_operation.cpp194 const Buffer& input, in Update()
195 AuthorizationSet* /* output_params */, Buffer* output, in Update()
215 const Buffer& input, const Buffer& /* signature */, in Finish() argument
216 AuthorizationSet* output_params, Buffer* output) { in Finish()
377 bool AesEvpOperation::HandleAad(const AuthorizationSet& input_params, const Buffer& input, in HandleAad()
447 bool AesEvpOperation::InternalUpdate(const uint8_t* input, size_t input_length, Buffer* output, in InternalUpdate()
469 const Buffer& input, AuthorizationSet* output_params, in UpdateForFinish()
470 Buffer* output, keymaster_error_t* error) { in UpdateForFinish()
509 const Buffer& input, const Buffer& signature, in Finish()
510 AuthorizationSet* output_params, Buffer* output) { in Finish()
[all …]
Decies_kem_test.cpp54 Buffer peer_public_value; in TEST()
57 Buffer output_clear_key; in TEST()
58 Buffer output_encrypted_key; in TEST()
63 Buffer decrypted_clear_key; in TEST()
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()
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()
Dnist_curve_key_exchange_test.cpp52 Buffer alice_public_value; in TEST()
54 Buffer bob_public_value; in TEST()
57 Buffer alice_shared, bob_shared; in TEST()
87 Buffer computed_shared_secret; in TEST()
117 Buffer computed_shared_secret; in TEST()
199 Buffer computed_shared_secret; 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()
Dhmac_operation.cpp151 const Buffer& input, AuthorizationSet* /* output_params */, in Update()
152 Buffer* /* output */, size_t* input_consumed) { in Update() argument
164 const Buffer& input, const Buffer& signature, in Finish()
165 AuthorizationSet* /* output_params */, Buffer* output) { in Finish()
Dnist_curve_key_exchange.cpp88 bool NistCurveKeyExchange::CalculateSharedKey(const Buffer& peer_public_value, in CalculateSharedKey()
89 Buffer* out_result) const { in CalculateSharedKey()
97 Buffer* out_result) const { in CalculateSharedKey()
120 bool NistCurveKeyExchange::public_value(Buffer* public_value) const { in public_value()
/system/keymaster/include/keymaster/
Dserializable.h201 class Buffer : public Serializable {
203 Buffer() : buffer_(NULL), buffer_size_(0), read_position_(0), write_position_(0) {} in Buffer() function
204 Buffer(size_t size) : buffer_(NULL) { Reinitialize(size); } in Buffer() function
205 Buffer(const void* buf, size_t size) : buffer_(NULL) { Reinitialize(buf, size); } in Buffer() function
214 bool Reinitialize(const Buffer& buffer) { in Reinitialize()
252 void operator=(const Buffer& other);
253 Buffer(const Buffer&);

12