-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Since the keys are stored on the device, and indexed by KeyHandle, it might be wise to implement the solution that the YubiKeys implement, which is essentially KeyWrapping. the device basically generates/wraps a hey with the HMAC function, so nothing besides the SecretKey is stored on the device.
This would guard against SD-Card corruption issue, while still ensuring a clonable device.
As a thought, OTP/EEPROM locations 36-43 are available for general purpose usage. This gives 256 bits to play with, good for a key?
Another idea, would be to gpg encrypt the secret key or the keystore , and use the pi-zero camera to provide a password via QR-Codes. The device only becomes unlocked once the correct password is entered. A QR code can be easily read with the camera, and could provide a good pass-phrase ala "Correct-Horse-Battery-Staple!" type, or something more/less innocuous while still being a bit more secure. This also would solve the "user presence verification" part which is currently obviously not imeplemented. The "unlocked" key could be stored in /tmp , ala ramdisk so it gets lost during power-down.
This doesn't solve all the attack vectors, but it's something I'm considering implementing, just to get some practice.
Let me know what you think, Thanks!