FiloSottile / typage

A TypeScript implementation of the age file encryption format, based on libsodium.
BSD 3-Clause "New" or "Revised" License
64 stars 9 forks source link

Add ability to use `CryptoKey` objects as identities #19

Open wiktor-k opened 2 months ago

wiktor-k commented 2 months ago

Subtle Crypto allows handling non-extractable private keys via the CryptoKey objects. This, coupled with the recent addition of X25519 to WebCrypto and a growing number of browsers supporting it would mean that it'd be possible to store X25519 identity keys in a non-extractable form in the browser.

I think it'd be a good addition to typage to support passing raw CryptoKey objects as identities.

(Another angle would be long-term migration to WebCrypto when the browser support is better. I've done a similar thing for ssh signatures).