Lines Matching refs:key

18  *   1.  Perhaps keep several copies of the encrypted key, in case something
142 /* key or salt can be NULL, in which case just skip writing that value. Useful to
143 * update the failed mount count but not change the key.
146 unsigned char *key, unsigned char *salt)
171 * encryption info footer and key, and plenty of bytes to spare for future
187 SLOGE("Unexpected value for crypto key location\n");
196 if (key) {
203 if ( (cnt = write(fd, key, crypt_ftr->keysize)) != crypt_ftr->keysize) {
204 SLOGE("Cannot write key for real block device %s\n", fname);
212 if (! key)
245 unsigned char *key, unsigned char *salt)
270 * encryption info footer and key, and plenty of bytes to spare for future
293 SLOGE("Unexpected value for crypto key location\n");
320 * Skip to it's stated end so we can read the key.
323 SLOGE("Cannot seek to start of key\n");
334 if ( (cnt = read(fd, key, crypt_ftr->keysize)) != crypt_ftr->keysize) {
335 SLOGE("Cannot read key for real block device %s\n", fname);
357 /* Convert a binary key of specified length into an ascii hex string equivalent,
384 char master_key_ascii[129]; /* Large enough to hold 512 bit key and null */
496 /* Turn the password into a key and IV that can decrypt the master key */
505 unsigned char ikey[32+32] = { 0 }; /* Big enough to hold a 256 bit key and 256 bit IV */
509 /* Turn the password into a key and IV that can decrypt the master key */
519 /* Encrypt the master key */
542 unsigned char ikey[32+32] = { 0 }; /* Big enough to hold a 256 bit key and 256 bit IV */
546 /* Turn the password into a key and IV that can decrypt the master key */
554 /* Decrypt the master key */
577 /* Get some random bits for a key */
761 SLOGE("master key file does not exist, aborting");
764 SLOGE("Error getting crypt footer and key\n");
782 /* Allocate enough space for a 256 bit key, but we may use less */
801 SLOGE("Error getting crypt footer and key\n");
853 /* Also save a the master key so we can reencrypted the key
854 * the key when we want to change the password on it.
877 * Setup a dm-crypt mapping, use the saved master key from
886 unsigned char key[32], salt[32];
893 get_crypt_ftr_and_key(saved_data_blkdev, &sd_crypt_ftr, key, salt);
935 /* Allocate enough space for a 256 bit key, but we may use less */
961 SLOGE("Error getting crypt footer and key\n");
1311 /* Make an encrypted master key */
1313 SLOGE("Cannot create encrypted master key\n");
1317 /* Write the key to the end of the partition */
1458 /* This is only allowed after we've successfully decrypted the master key */
1470 /* get key */
1472 SLOGE("Error getting crypt footer and key");
1478 /* save the key */