Home | History | Annotate | Download | only in vold

Lines Matching full:master_key

932     unsigned char* master_key = (unsigned char*) malloc(size / 2);
933 if (master_key == 0) {
944 free (master_key);
948 master_key[*out_keysize] = high_nibble * 16 + low_nibble;
952 return master_key;
958 static void convert_key_to_hex_ascii(unsigned char *master_key, unsigned int keysize,
966 nibble = (master_key[i] >> 4) & 0xf;
969 nibble = master_key[i] & 0xf;
978 static int load_crypto_mapping_table(struct crypt_mnt_ftr *crypt_ftr, unsigned char *master_key,
1011 convert_key_to_hex_ascii(master_key, crypt_ftr->keysize, master_key_ascii);
1071 static int create_crypto_blk_dev(struct crypt_mnt_ftr *crypt_ftr, unsigned char *master_key,
1119 load_count = load_crypto_mapping_table(crypt_ftr, master_key, real_blk_name, name,
1182 char* master_key = (char*)convert_hex_ascii_to_key(passwd, &keysize);
1183 if (!master_key) return -1;
1184 PKCS5_PBKDF2_HMAC_SHA1(master_key, keysize, salt, SALT_LEN,
1187 memset(master_key, 0, keysize);
1188 free (master_key);
1205 unsigned char* master_key = convert_hex_ascii_to_key(passwd, &keysize);
1206 if (!master_key) return -1;
1207 crypto_scrypt(master_key, keysize, salt, SALT_LEN, N, r, p, ikey,
1210 memset(master_key, 0, keysize);
1211 free (master_key);
1230 unsigned char* master_key = convert_hex_ascii_to_key(passwd, &key_size);
1231 if (!master_key) {
1236 rc = crypto_scrypt(master_key, key_size, salt, SALT_LEN,
1238 memset(master_key, 0, key_size);
1239 free(master_key);
1422 ret = decrypt_master_key_aux(passwd, crypt_ftr->salt, crypt_ftr->master_key,
1432 static int create_encrypted_random_key(char *passwd, unsigned char *master_key, unsigned char *salt,
1446 return encrypt_master_key(passwd, salt, key_buf, master_key, crypt_ftr);
1857 crypt_ftr->master_key, crypt_ftr);
3130 if (create_encrypted_random_key(passwd, crypt_ftr.master_key, crypt_ftr.salt, &crypt_ftr)) {
3346 crypt_ftr.master_key,