Lines Matching refs:salt
181 unsigned char salt[SALT_LEN]; /* The salt used for this encryption */ member
260 typedef int (*kdf_func)(const char* passwd, const unsigned char* salt, unsigned char* ikey,
1142 static int pbkdf2(const char* passwd, const unsigned char* salt, unsigned char* ikey, in pbkdf2() argument
1147 return PKCS5_PBKDF2_HMAC_SHA1(passwd, strlen(passwd), salt, SALT_LEN, HASH_COUNT, in pbkdf2()
1151 static int scrypt(const char* passwd, const unsigned char* salt, unsigned char* ikey, void* params)… in scrypt() argument
1161 crypto_scrypt((const uint8_t*)passwd, strlen(passwd), salt, SALT_LEN, N, r, p, ikey, in scrypt()
1167 static int scrypt_keymaster(const char* passwd, const unsigned char* salt, unsigned char* ikey, in scrypt_keymaster() argument
1180 rc = crypto_scrypt((const uint8_t*)passwd, strlen(passwd), salt, SALT_LEN, N, r, p, ikey, in scrypt_keymaster()
1193 rc = crypto_scrypt(signature, signature_size, salt, SALT_LEN, N, r, p, ikey, in scrypt_keymaster()
1205 static int encrypt_master_key(const char* passwd, const unsigned char* salt, in encrypt_master_key() argument
1223 if (scrypt_keymaster(passwd, salt, ikey, crypt_ftr)) { in encrypt_master_key()
1230 if (scrypt(passwd, salt, ikey, crypt_ftr)) { in encrypt_master_key()
1275 rc = crypto_scrypt(ikey, INTERMEDIATE_KEY_LEN_BYTES, crypt_ftr->salt, sizeof(crypt_ftr->salt), in encrypt_master_key()
1288 static int decrypt_master_key_aux(const char* passwd, unsigned char* salt, in decrypt_master_key_aux() argument
1299 if (kdf(passwd, salt, ikey, kdf_params)) { in decrypt_master_key_aux()
1359 ret = decrypt_master_key_aux(passwd, crypt_ftr->salt, crypt_ftr->master_key, crypt_ftr->keysize, in decrypt_master_key()
1370 unsigned char* salt, struct crypt_mnt_ftr* crypt_ftr) { in create_encrypted_random_key() argument
1377 if (android::vold::ReadRandomBytes(SALT_LEN, reinterpret_cast<char*>(salt)) != 0) { in create_encrypted_random_key()
1382 return encrypt_master_key(passwd, salt, key_buf, master_key, crypt_ftr); in create_encrypted_random_key()
1768 rc = crypto_scrypt(intermediate_key, intermediate_key_size, crypt_ftr->salt, in test_mount_encrypted_fs()
1769 sizeof(crypt_ftr->salt), N, r, p, scrypted_intermediate_key, in test_mount_encrypted_fs()
1828 rc = encrypt_master_key(passwd, crypt_ftr->salt, saved_master_key, in test_mount_encrypted_fs()
2276 crypt_ftr.master_key, crypt_ftr.salt, &crypt_ftr)) { in cryptfs_enable_internal()
2286 encrypt_master_key(passwd, crypt_ftr.salt, fake_master_key, encrypted_fake_master_key, in cryptfs_enable_internal()
2482 crypt_ftr.salt, saved_master_key, crypt_ftr.master_key, &crypt_ftr); in cryptfs_changepw()