zendframework / zend-crypt

Cryptographic component from Zend Framework
BSD 3-Clause "New" or "Revised" License
90 stars 38 forks source link

Add the hybrid cryptosystem support #32

Closed ezimuel closed 8 years ago

ezimuel commented 8 years ago

This PR adds the hybrid cryptosystem support (OpenPGP like). It allows also multiple encryptions using a keyrings of public/private keys. This can be useful in multi users scenarios to encrypt data only for specific users.

ezimuel commented 8 years ago

@paragonie-scott do you have time for a quick review? Thanks!

paragonie-scott commented 8 years ago

This looks good. It's essentially what EasyRSA tries to provide.

Since this is a new feature, I'd definitely advise forcing the use of OAEP.

ezimuel commented 8 years ago

@paragonie-scott thanks for your feedback! You right, I always forget OAEP :)

weierophinney commented 8 years ago

Overall, relatively straight-forward, and the code was mostly easy to follow. Nice feature, @ezimuel !

ezimuel commented 8 years ago

@paragonie-scott Btw, we already use OAEP as default padding for encryption using RSA, since zend-crypt 2.4.9 as reported in ZF2015-10.

ezimuel commented 8 years ago

@weierophinney I included all the proposed changes. It's ready to be merged, thanks!

weierophinney commented 8 years ago

Thanks for the great feature, @ezimuel!