ropensci / cyphr

:shipit: Humane encryption
https://docs.ropensci.org/cyphr
Other
93 stars 10 forks source link

Add support for RSA keys #3

Closed richfitz closed 8 years ago

richfitz commented 8 years ago

Using Jeroen's openssl package, the general config interface can stay the same.

cc: @gaborcsardi -- would that be enough for use case? Happy to chat about this Monday.

gaborcsardi commented 8 years ago

I think so.

Also, hadley/secure might have what I need, actually. These projects seem very similar, and if you prefer keeping encryptr sodium-only, I can just use secure. It might make sense to keep this one sodium-only, for simplicity.

richfitz commented 8 years ago

Yeah, Jeroen and I have been talking about where overlap exists. The focuses are a bit different I think (this one is targeted at researchers dealing with lots of encrypted data and has transparent interfaces for loading it whereas hadley/secure seems more for handling a few bits of secure tokens and interacting with other systems that use them). According to Jeroen, sodium is much faster than rsa but I've not actually done the comparison.

jeroen commented 8 years ago

It's also that RSA can only encrypt messages up to it's own key size, for example 256 bytes for a 2048 bit key. After that you manually need to combine it with some other method such as AES to encrypt larger blobs, which is a bit annoying. Sodium has native methods for authenticated encryption on arbitrary sized data, so it's both easier and more flexible.

gaborcsardi commented 8 years ago

@jeroenooms The way secure works, this is not an issue as I understand. It uses a symmetric AES master key to encrypt the data.