Skip to content

Data storage

Owais Shaikh edited this page Sep 18, 2023 · 13 revisions

Structure

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.

2FA Codes

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.

Wallet passes

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.

Clone this wiki locally