DEV Community

Discussion on: I learned enough Web Crypto to be dangerous

Collapse
 
raelik profile image
Blane Dabney

The reason that you only typically use the asymmetric pair to encrypt/decrypt a symmetric key is that asymmetric keys are very large, CPU intensive, and fairly slow. If you're only encrypting relatively small messages at a fairly slow rate, or large messages at a VERY slow rate, it's ok to just use the asymmetric keys. This is how PGP works, for example.

Collapse
 
harkinj profile image
harkinj

Thanks for the info