-
-
Notifications
You must be signed in to change notification settings - Fork 10
Data storage
Data is stored in a file format file called "wfs", short for WristkeyFS, modelled after the KeyspaceFS file structure. It consists of a JSON object that contains multiple items, such as an array called "otpauth" for 2FA codes, "wkpass" for Wallet passes etc.
{
"otpauth": [
"otpauth://totp/Google%20Inc%2E:0x4f%40tuta.io?secret=ASDFGHJKL&issuer=Google&counter=0&algorithm=SHA1&digits=6&period=30"
],
"wkpass": [
"wkpass://qrcode/Informa%20PLC:Owais%20Shaikh?data=ASDFGHJKL&Description=BlackHat%20Arsenal%20USA&Time=1234567890&Seat=2A&From=BOM&To=LAX&Foo=Bar"
]
}
This JSON is escaped, base64'd and encrypted.
Wristkey's 2FA codes simply store data in an otpauth://
URL, as displayed in the QR codes you scan. This reduces complexity and makes exports and management easier. To learn more about this protocol visit the official Google Authenticator spec docs.
For wallet passes, Wristkey uses a protocol I made up called "wkpass", which is a replica of otpauth://
URLs. It looks like this...
wkpass://<CodeType>/<Organizer>:<AttendeeName>?data=<DataToRender>&<SomeKey>=<SomeValue>...
The keys and values could contain airport gate numbers, theater seat numbers and so on. Please note that Wristkey doesn't show data entries in the pass previews and only shows the first few entries.
I wrote this app in college so that I could log into GitLab and back up my projects from the on-campus computer labs (and to flex my UI skills a bit). Please don't judge too harshly. 😇