/system/keymaster/include/keymaster/km_openssl/ |
D | kem.h | 40 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;
|
D | ecies_kem.h | 42 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;
|
D | rsa_operation.h | 45 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 …]
|
D | ecdsa_operation.h | 43 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 …]
|
D | key_exchange.h | 39 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;
|
D | ecdh_operation.h | 40 keymaster_error_t Update(const AuthorizationSet& additional_params, const Buffer& input, 41 AuthorizationSet* output_params, Buffer* output, 43 keymaster_error_t Finish(const AuthorizationSet& additional_params, const Buffer& input, 44 const Buffer& signature, AuthorizationSet* output_params, 45 Buffer* output) override;
|
D | nist_curve_key_exchange.h | 53 Buffer* shared_key) const override; 54 bool CalculateSharedKey(const Buffer& peer_public_value, Buffer* shared_key) const override; 55 bool public_value(Buffer* public_value) const override;
|
D | hmac.h | 35 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;
|
/system/chre/util/tests/ |
D | buffer_test.cc | 22 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/ |
D | block_cipher_operation.h | 78 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 …]
|
D | ecies_kem.cpp | 75 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 …]
|
D | hmac_operation.h | 33 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);
|
D | ecdsa_operation.cpp | 93 keymaster_error_t EcdsaOperation::StoreData(const Buffer& input, size_t* input_consumed) { in StoreData() 123 const Buffer& input, in Update() 125 Buffer* /* output */, size_t* input_consumed) { in Update() argument 135 const Buffer& input, const Buffer& /* signature */, in Finish() argument 137 Buffer* output) { in Finish() 184 const Buffer& input, in Update() 186 Buffer* /* output */, size_t* input_consumed) { in Update() argument 196 const Buffer& input, const Buffer& signature, in Finish() 198 Buffer* /* output */) { in Finish() argument
|
D | rsa_operation.cpp | 179 const Buffer& input, AuthorizationSet* /* output_params */, in Update() 180 Buffer* /* output */, size_t* input_consumed) { in Update() argument 193 keymaster_error_t RsaOperation::StoreData(const Buffer& input, size_t* input_consumed) { in StoreData() 290 const Buffer& input, AuthorizationSet* output_params, in Update() 291 Buffer* output, size_t* input_consumed) { in Update() 304 const Buffer& input, const Buffer& /* signature */, in Finish() argument 305 AuthorizationSet* /* output_params */, Buffer* output) { in Finish() 317 static keymaster_error_t zero_pad_left(UniquePtr<uint8_t[]>* dest, size_t padded_len, Buffer& src) { in zero_pad_left() 330 keymaster_error_t RsaSignOperation::SignUndigested(Buffer* output) { in SignUndigested() 373 keymaster_error_t RsaSignOperation::SignDigested(Buffer* output) { in SignDigested() [all …]
|
D | block_cipher_operation.cpp | 169 const Buffer& input, in Update() 171 Buffer* output, size_t* input_consumed) { in Update() 187 const Buffer& input, in Finish() argument 188 const Buffer& /* signature */, in Finish() 189 AuthorizationSet* output_params, Buffer* output) { in Finish() 290 bool BlockCipherEvpOperation::HandleAad(const AuthorizationSet& input_params, const Buffer& input, in HandleAad() 363 Buffer* output, keymaster_error_t* error) { in InternalUpdate() 383 const Buffer& input, AuthorizationSet* output_params, in UpdateForFinish() 384 Buffer* output, keymaster_error_t* error) { in UpdateForFinish() 420 const Buffer& input, in Finish() [all …]
|
D | ecdh_operation.cpp | 39 const Buffer& /*input*/, in Update() argument 40 AuthorizationSet* /*output_params*/, Buffer* /*output*/, in Update() argument 46 const Buffer& input, const Buffer& /*signature*/, in Finish() argument 47 AuthorizationSet* /*output_params*/, Buffer* output) { in Finish()
|
D | hmac.cpp | 34 bool HmacSha256::Init(const Buffer& key) { in Init() 49 bool HmacSha256::Sign(const Buffer& data, uint8_t* out_digest, size_t digest_len) const { in Sign() 69 bool HmacSha256::Verify(const Buffer& data, const Buffer& digest) const { in Verify()
|
/system/keymaster/tests/fuzzers/ |
D | buffer_fuzz.cpp | 27 std::vector<std::function<void(keymaster::Buffer*, FuzzedDataProvider*)>> operations = { 29 [](keymaster::Buffer* buf, FuzzedDataProvider*) -> void { in __anon10ed34010102() 35 [](keymaster::Buffer* buf, FuzzedDataProvider*) -> void { buf->Clear(); }, in __anon10ed34010202() 36 [](keymaster::Buffer* buf, FuzzedDataProvider* fdp) -> void { in __anon10ed34010302() 39 [](keymaster::Buffer* buf, FuzzedDataProvider* fdp) -> void { in __anon10ed34010402() 42 [](keymaster::Buffer* buf, FuzzedDataProvider* fdp) -> void { in __anon10ed34010502() 45 [](keymaster::Buffer* buf, FuzzedDataProvider* fdp) -> void { in __anon10ed34010602() 48 [](keymaster::Buffer* buf, FuzzedDataProvider* fdp) -> void { in __anon10ed34010702() 53 [](keymaster::Buffer* buf, FuzzedDataProvider* fdp) -> void { in __anon10ed34010802() 60 [](keymaster::Buffer* buf, FuzzedDataProvider* fdp) -> void { in __anon10ed34010902() [all …]
|
/system/keymaster/legacy_support/ |
D | keymaster_passthrough_operation.h | 56 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);
|
D | keymaster_passthrough_operation.cpp | 26 const AuthorizationSet& input_params, const Buffer& input, const Buffer& signature, in Finish() 27 AuthorizationSet* output_params, Buffer* output) { in Finish() 95 const AuthorizationSet& input_params, const Buffer& input, const Buffer& signature, in Finish() 96 AuthorizationSet* output_params, Buffer* output) { in Finish()
|
/system/keymaster/android_keymaster/ |
D | serializable.cpp | 75 bool Buffer::reserve(size_t size) { in reserve() 90 bool Buffer::Reinitialize(size_t size) { in Reinitialize() 100 bool Buffer::Reinitialize(const void* data, size_t data_len) { in Reinitialize() 113 size_t Buffer::available_write() const { in available_write() 118 size_t Buffer::available_read() const { in available_read() 124 bool Buffer::write(const uint8_t* src, size_t write_length) { in write() 131 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 …]
|
/system/keymaster/include/keymaster/ |
D | operation.h | 118 Buffer* buffer = new (std::nothrow) in create_confirmation_verifier_buffer() 119 Buffer(kConfirmationTokenMessageTag, kConfirmationTokenMessageTagSize); in create_confirmation_verifier_buffer() 130 Buffer* get_confirmation_verifier_buffer() { return confirmation_verifier_buffer_.get(); } in get_confirmation_verifier_buffer() 134 virtual keymaster_error_t Update(const AuthorizationSet& input_params, const Buffer& input, 135 AuthorizationSet* output_params, Buffer* output, 137 virtual keymaster_error_t Finish(const AuthorizationSet& input_params, const Buffer& input, 138 const Buffer& signature, AuthorizationSet* output_params, 139 Buffer* output) = 0; 145 keymaster_error_t UpdateForFinish(const AuthorizationSet& input_params, const Buffer& input); 153 UniquePtr<Buffer> confirmation_verifier_buffer_;
|
D | serializable.h | 198 class Buffer : public Serializable { 200 Buffer() : buffer_(nullptr), buffer_size_(0), read_position_(0), write_position_(0) {} in Buffer() function 201 explicit Buffer(size_t size) : buffer_(nullptr) { Reinitialize(size); } in Buffer() function 202 Buffer(const void* buf, size_t size) : buffer_(nullptr) { Reinitialize(buf, size); } in Buffer() function 203 Buffer(Buffer&& b) { *this = move(b); } in Buffer() function 204 Buffer(const Buffer&) = delete; 206 ~Buffer() { Clear(); } in ~Buffer() 208 Buffer& operator=(Buffer&& other) { 220 void operator=(const Buffer& other) = delete; 229 bool Reinitialize(const Buffer& buffer) { in Reinitialize()
|
/system/keymaster/include/keymaster/key_blob_utils/ |
D | ocb_utils.h | 37 const KeymasterKeyBlob& plaintext, const Buffer& nonce, 38 KeymasterKeyBlob* ciphertext, Buffer* tag); 43 const KeymasterKeyBlob& ciphertext, const Buffer& nonce, 44 const Buffer& tag, KeymasterKeyBlob* plaintext);
|
/system/keymaster/tests/ |
D | ecies_kem_test.cpp | 53 Buffer peer_public_value; in TEST() 56 Buffer output_clear_key; in TEST() 57 Buffer output_encrypted_key; in TEST() 62 Buffer decrypted_clear_key; in TEST()
|