OpenPGP Card Applet

If I’m understanding flipperzero-firmware/firmware/targets/f7/furi_hal/furi_hal_crypto.c correctly, the flipper zero does indeed use the M0+'s security features to seal encryption keys for applications such as the existing u2f one ( flipperzero-firmware/applications/u2f/u2f_data.c ). (If this is true, there does seem to be some misinformation out there: https://twitter.com/securelyfitz/status/1293246688698617858 )

If so, the flipper would make an excellent platform for an OpenPGP Card applet and there are several license-compatible implementations out there meant to run on similar processors. Is there already work in this direction with which I should coordinate? Am I correct in that the M0+ core is used to seal crypto keys? (otherwise, this certainly wouldn’t be worth any effort)

Yes, we use the crypto-enclave in the STM32WB55 for U2F and other cryptographic actions, but the person in the Twitter thread is mostly still correct. Even though the keys are themselves safe, the content encrypted using them can still be decrypted by anyone who has physical access to the Flipper device.

I don’t think there’s any work being done on making a PGP card applet on flipper, so you’re free to do it yourself :slight_smile:

tiberious726: I’d love to be a tester for this this once you make some progress on it!

Good point! Especially once plugins are supported, there doesn’t seem to good way to keep the keyfiles safe, other than having the M0+ core blow away its user-keys on every update, which wouldn’t be very practical. If there’s a fireware update/plug-in write counter that might at least indicate to users reason to be suspicious that their keyfiles have been compromised.

@skw I’ll be sure to post it if I get something together, thanks for the offer!

1 Like