Home | History | Annotate | Download | only in vold

Lines Matching full:master_key

926     unsigned char* master_key = (unsigned char*) malloc(size / 2);
927 if (master_key == 0) {
938 free (master_key);
942 master_key[*out_keysize] = high_nibble * 16 + low_nibble;
946 return master_key;
952 static void convert_key_to_hex_ascii(unsigned char *master_key, unsigned int keysize,
960 nibble = (master_key[i] >> 4) & 0xf;
963 nibble = master_key[i] & 0xf;
972 static int load_crypto_mapping_table(struct crypt_mnt_ftr *crypt_ftr, unsigned char *master_key,
996 convert_key_to_hex_ascii(master_key, crypt_ftr->keysize, master_key_ascii);
1052 static int create_crypto_blk_dev(struct crypt_mnt_ftr *crypt_ftr, unsigned char *master_key,
1100 load_count = load_crypto_mapping_table(crypt_ftr, master_key, real_blk_name, name,
1163 char* master_key = (char*)convert_hex_ascii_to_key(passwd, &keysize);
1164 if (!master_key) return -1;
1165 PKCS5_PBKDF2_HMAC_SHA1(master_key, keysize, salt, SALT_LEN,
1168 memset(master_key, 0, keysize);
1169 free (master_key);
1186 unsigned char* master_key = convert_hex_ascii_to_key(passwd, &keysize);
1187 if (!master_key) return -1;
1188 crypto_scrypt(master_key, keysize, salt, SALT_LEN, N, r, p, ikey,
1191 memset(master_key, 0, keysize);
1192 free (master_key);
1211 unsigned char* master_key = convert_hex_ascii_to_key(passwd, &key_size);
1212 if (!master_key) {
1217 rc = crypto_scrypt(master_key, key_size, salt, SALT_LEN,
1219 memset(master_key, 0, key_size);
1220 free(master_key);
1403 ret = decrypt_master_key_aux(passwd, crypt_ftr->salt, crypt_ftr->master_key,
1413 static int create_encrypted_random_key(char *passwd, unsigned char *master_key, unsigned char *salt,
1427 return encrypt_master_key(passwd, salt, key_buf, master_key, crypt_ftr);
1830 crypt_ftr->master_key, crypt_ftr);
3090 master_key, crypt_ftr.salt, &crypt_ftr)) {
3291 crypt_ftr.master_key,