Using WebCrypto to wrap and store a key with AES-CBC encryption.
Key:
This is the 128 bits we want to save as an encryption/decryption key.
Password Derived Wrapping/Unwrapping Key:
The password and the password salt are used to derive this key
using the hash method you choose.
Press the button to derive the wrapping/unwrapping key.
Hash method:
Wrap the key:
Press this button to wrap the original key using the wrapping key
and the key wrapping salt.
Unwrap The Key:
To unwrap the key we need to do the following:
Get the password from the user.
Use the password along with the password salt to derive the unwrapping key.
Use the unwrapping key along with the unwrapping salt (vector) to unwrap the key.
Press the button to unwrap the key.
The recovered key should be the same as the original key (hilighted in green) from above.
A green background indicates that the two keys are the same.