holy moly we're almost there

This commit is contained in:
Anish Lakhwara
2022-09-19 08:13:50 +10:00
commit 3693732aac
203 changed files with 17247 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
key_length=512
iterations="$(head -n 2 /boot/crypted-storage/default)"
salt="$(head -n 1 /boot/crypted-storage/default)"
chal="$(echo -n $salt | openssl dgst -binary -sha512 | rbtohex)"
resp="$(ykchalresp -2 -x $chal 2>/dev/null)"
user_key="$(read -s)"
luks_key="$(echo -n $user_key | pbkdf2-sha512 $(($key_length / 8)) $iterations $resp | rbtohex)"
echo -n $luks_key | hextorb | sudo cryptsetup luksOpen /dev/sda2 crypted --key-file=-