Lines Matching refs:ikey
259 typedef int (*kdf_func)(const char* passwd, const unsigned char* salt, unsigned char* ikey,
1238 static int pbkdf2(const char* passwd, const unsigned char* salt, unsigned char* ikey, in pbkdf2() argument
1244 INTERMEDIATE_BUF_SIZE, ikey) != 1; in pbkdf2()
1247 static int scrypt(const char* passwd, const unsigned char* salt, unsigned char* ikey, void* params)… in scrypt() argument
1257 crypto_scrypt((const uint8_t*)passwd, strlen(passwd), salt, SALT_LEN, N, r, p, ikey, in scrypt()
1263 static int scrypt_keymaster(const char* passwd, const unsigned char* salt, unsigned char* ikey, in scrypt_keymaster() argument
1276 rc = crypto_scrypt((const uint8_t*)passwd, strlen(passwd), salt, SALT_LEN, N, r, p, ikey, in scrypt_keymaster()
1284 if (keymaster_sign_object(ftr, ikey, INTERMEDIATE_BUF_SIZE, &signature, &signature_size)) { in scrypt_keymaster()
1289 rc = crypto_scrypt(signature, signature_size, salt, SALT_LEN, N, r, p, ikey, in scrypt_keymaster()
1304 unsigned char ikey[INTERMEDIATE_BUF_SIZE] = {0}; in encrypt_master_key() local
1319 if (scrypt_keymaster(passwd, salt, ikey, crypt_ftr)) { in encrypt_master_key()
1326 if (scrypt(passwd, salt, ikey, crypt_ftr)) { in encrypt_master_key()
1339 if (!EVP_EncryptInit_ex(&e_ctx, EVP_aes_128_cbc(), NULL, ikey, in encrypt_master_key()
1340 ikey + INTERMEDIATE_KEY_LEN_BYTES)) { in encrypt_master_key()
1371 rc = crypto_scrypt(ikey, INTERMEDIATE_KEY_LEN_BYTES, crypt_ftr->salt, sizeof(crypt_ftr->salt), in encrypt_master_key()
1389 unsigned char ikey[INTERMEDIATE_BUF_SIZE] = {0}; in decrypt_master_key_aux() local
1395 if (kdf(passwd, salt, ikey, kdf_params)) { in decrypt_master_key_aux()
1402 if (!EVP_DecryptInit_ex(&d_ctx, EVP_aes_128_cbc(), NULL, ikey, in decrypt_master_key_aux()
1403 ikey + INTERMEDIATE_KEY_LEN_BYTES)) { in decrypt_master_key_aux()
1424 memcpy(*intermediate_key, ikey, INTERMEDIATE_KEY_LEN_BYTES); in decrypt_master_key_aux()