Lines Matching refs:ikey
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
1148 INTERMEDIATE_BUF_SIZE, ikey) != 1; 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()
1188 if (keymaster_sign_object(ftr, ikey, INTERMEDIATE_BUF_SIZE, &signature, &signature_size)) { in scrypt_keymaster()
1193 rc = crypto_scrypt(signature, signature_size, salt, SALT_LEN, N, r, p, ikey, in scrypt_keymaster()
1208 unsigned char ikey[INTERMEDIATE_BUF_SIZE] = {0}; in encrypt_master_key() local
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()
1243 if (!EVP_EncryptInit_ex(&e_ctx, EVP_aes_128_cbc(), NULL, ikey, in encrypt_master_key()
1244 ikey + INTERMEDIATE_KEY_LEN_BYTES)) { in encrypt_master_key()
1275 rc = crypto_scrypt(ikey, INTERMEDIATE_KEY_LEN_BYTES, crypt_ftr->salt, sizeof(crypt_ftr->salt), in encrypt_master_key()
1293 unsigned char ikey[INTERMEDIATE_BUF_SIZE] = {0}; in decrypt_master_key_aux() local
1299 if (kdf(passwd, salt, ikey, kdf_params)) { in decrypt_master_key_aux()
1306 if (!EVP_DecryptInit_ex(&d_ctx, EVP_aes_128_cbc(), NULL, ikey, in decrypt_master_key_aux()
1307 ikey + INTERMEDIATE_KEY_LEN_BYTES)) { in decrypt_master_key_aux()
1328 memcpy(*intermediate_key, ikey, INTERMEDIATE_KEY_LEN_BYTES); in decrypt_master_key_aux()