Home
last modified time | relevance | path

Searched refs:salt (Results 1 – 15 of 15) sorted by relevance

/system/core/gatekeeperd/
DSoftGateKeeper.h36 uint64_t salt; member
81 uint32_t password_length, salt_t salt) const { in ComputePasswordSignature() argument
83 crypto_scrypt(password, password_length, reinterpret_cast<uint8_t *>(&salt), in ComputePasswordSignature()
84 sizeof(salt), N, r, p, signature, signature_length); in ComputePasswordSignature()
134 fast_hash_t ComputeFastHash(const SizedBuffer &password, uint64_t salt) { in ComputeFastHash() argument
136 size_t digest_size = password.length + sizeof(salt); in ComputeFastHash()
138 memcpy(digest.get(), &salt, sizeof(salt)); in ComputeFastHash()
139 memcpy(digest.get() + sizeof(salt), password.buffer.get(), password.length); in ComputeFastHash()
143 fast_hash.salt = salt; in ComputeFastHash()
148 fast_hash_t computed = ComputeFastHash(password, fast_hash.salt); in VerifyFast()
[all …]
/system/extras/verity/
Dbuild_verity_tree.cpp21 const unsigned char *salt; member
53 const unsigned char *salt, size_t salt_len, in hash_block() argument
63 ret &= EVP_DigestUpdate(mdctx, salt, salt_len); in hash_block()
77 const unsigned char *salt, size_t salt_size, in hash_blocks() argument
83 hash_block(md, in + i, block_size, salt, salt_size, out, &s); in hash_blocks()
99 ctx->salt, ctx->salt_size, ctx->block_size); in hash_chunk()
127 unsigned char *salt = NULL; in main() local
152 salt = new unsigned char[salt_size](); in main()
153 if (salt == NULL) { in main()
156 memcpy(salt, optarg, salt_size); in main()
[all …]
Dbuild_verity_metadata.py40 def build_verity_table(block_device, data_blocks, root_hash, salt): argument
49 salt)
53 salt, block_device, signer_path, signing_key): argument
55 verity_table = build_verity_table(block_device, data_blocks, root_hash, salt)
71 salt = sys.argv[4] variable
76 salt, block_device, signer_path, signing_key)
DVerityVerifier.java44 private byte[] salt; field in VerityVerifier
251 salt = DatatypeConverter.parseHexBinary(fields[9]); in readHashTree()
312 digest.update(salt); in checkBlock()
/system/keymaster/
Dhkdf.cpp31 Rfc5869HmacSha256Kdf::Rfc5869HmacSha256Kdf(Buffer& secret, Buffer& salt, Buffer& info, in Rfc5869HmacSha256Kdf() argument
33 Rfc5869HmacSha256Kdf(secret.peek_read(), secret.available_read(), salt.peek_read(), in Rfc5869HmacSha256Kdf()
34 salt.available_read(), info.peek_read(), info.available_read(), in Rfc5869HmacSha256Kdf()
39 const uint8_t* salt, size_t salt_len, in Rfc5869HmacSha256Kdf() argument
46 if (salt) { in Rfc5869HmacSha256Kdf()
47 result = prk_hmac.Init(salt, salt_len); in Rfc5869HmacSha256Kdf()
Dhkdf_test.cpp71 const string salt = hex2str(test.salt_hex); in TEST() local
78 reinterpret_cast<const uint8_t*>(salt.data()), salt.size(), in TEST()
Dhkdf.h41 Rfc5869HmacSha256Kdf(Buffer& secret, Buffer& salt, Buffer& info, size_t key_bytes_to_generate,
44 Rfc5869HmacSha256Kdf(const uint8_t* secret, size_t secret_len, const uint8_t* salt,
/system/gatekeeper/
Dgatekeeper.cpp88 salt_t salt; in Enroll() local
89 GetRandom(&salt, sizeof(salt)); in Enroll()
93 salt, user_id, flags, HANDLE_VERSION, request.provided_password.buffer.get(), in Enroll()
167 bool GateKeeper::CreatePasswordHandle(SizedBuffer *password_handle_buffer, salt_t salt, in CreatePasswordHandle() argument
176 password_handle->salt = salt; in CreatePasswordHandle()
195 password_key, password_key_length, to_sign, sizeof(to_sign), salt); in CreatePasswordHandle()
203 if (!CreatePasswordHandle(&provided_handle, expected_handle->salt, expected_handle->user_id, in DoVerify()
/system/vold/
DExt4Crypt.cpp62 const char* salt = "salt"; variable
89 && props.Set<std::string>(tag::salt, in put_crypt_ftr_and_key()
90 std::string((const char*) crypt_ftr.salt, in put_crypt_ftr_and_key()
127 std::string salt = props.Get<std::string>(tag::salt); in get_crypt_ftr_and_key() local
128 if (salt.size() != SALT_LEN) { in get_crypt_ftr_and_key()
132 memcpy(crypt_ftr.salt, &salt[0], SALT_LEN); in get_crypt_ftr_and_key()
Dcryptfs.h105 unsigned char salt[SALT_LEN]; /* The salt used for this encryption */ member
214 typedef int (*kdf_func)(const char *passwd, const unsigned char *salt,
Dcryptfs.c1250 static int pbkdf2(const char *passwd, const unsigned char *salt, argument
1257 salt, SALT_LEN,
1263 static int scrypt(const char *passwd, const unsigned char *salt, argument
1277 salt, SALT_LEN, N, r, p, ikey,
1283 static int scrypt_keymaster(const char *passwd, const unsigned char *salt, argument
1298 salt, SALT_LEN, N, r, p, ikey,
1312 rc = crypto_scrypt(signature, signature_size, salt, SALT_LEN,
1324 static int encrypt_master_key(const char *passwd, const unsigned char *salt, argument
1344 if (scrypt_keymaster(passwd, salt, ikey, crypt_ftr)) {
1351 if (scrypt(passwd, salt, ikey, crypt_ftr)) {
[all …]
/system/gatekeeper/include/gatekeeper/
Dgatekeeper.h91 uint32_t password_length, salt_t salt) const = 0;
185 bool CreatePasswordHandle(SizedBuffer *password_handle, salt_t salt,
Dpassword_handle.h40 salt_t salt; member
/system/security/keystore/
Dkeystore.cpp846 uint8_t* salt; in readMasterKey() local
848 salt = (uint8_t*) &rawBlob + length - SALT_SIZE; in readMasterKey()
850 salt = NULL; in readMasterKey()
853 generateKeyFromPassword(passwordKey, MASTER_KEY_SIZE_BYTES, pw, salt); in readMasterKey()
864 if (salt == NULL) { in readMasterKey()
930 uint8_t* salt) { in generateKeyFromPassword() argument
932 if (salt != NULL) { in generateKeyFromPassword()
936 salt = (uint8_t*) "keystore"; in generateKeyFromPassword()
941 PKCS5_PBKDF2_HMAC_SHA1(reinterpret_cast<const char*>(pw.string()), pw.length(), salt, in generateKeyFromPassword()
/system/bt/stack/smp/
Dsmp_keys.c1701 BT_OCTET16 salt = { in smp_calculate_f5_key() local
1711 p_prnt = salt; in smp_calculate_f5_key()
1721 ARRAY_TO_STREAM(p, salt, BT_OCTET16_LEN); in smp_calculate_f5_key()