neilck / aka-extension

Nostr Signing Extension for Chrome supporting multiple key pairs.
https://chrome.google.com/webstore/detail/aka-profiles/ncmflpbbagcnakkolfpcpogheckolnad
23 stars 3 forks source link

Suggestion: include reading a qrcode with ncryptsec NIP49 format #4

Open antonioconselheiro opened 5 months ago

antonioconselheiro commented 5 months ago

I would like to suggest to include into your extension support to read an encrypted qrcode. NIP49 (https://github.com/nostr-protocol/nips/blob/master/49.md) provides a way to encrypt our nsec, any tool that geneates a qrcode with NIP49 will be compatible.

This will help me to avoid typing my nsec or copy and paste it, this make sense?

neilck commented 4 months ago

Can you clarify what "extension support to read a encrypted qrcode" means?

antonioconselheiro commented 4 months ago

Sure:

  1. nsec field has a qrcode button (or in another place): image

  2. when click, camera open to scan a qrcode;

  3. the qrcode content must be a nsec or a ncryptsec (encrypted nsec, NIP49, https://github.com/nostr-protocol/nips/blob/master/49.md);

  4. If it's ncryptsec (encrypted nsec) you will need a pin to decrypt it, so, open a prompt with a textfield asking for the pin;

  5. decrypt ncryptsec with the pin and get the nsec hex, fill the field with the value.

The nsec field can support receive a ncryptsec with no qrcode scanner too.

antonioconselheiro commented 2 days ago

Other extensions are supporting load/scan qrcode with credentials, If you need help to implement it I'm available: https://github.com/fiatjaf/nos2x/pull/67