outline-apps icon indicating copy to clipboard operation
outline-apps copied to clipboard

Add support for EC sertificates in addition to RSA

Open 13xforever opened this issue 7 years ago • 7 comments

Currently installation script generates 2048 bit RSA certificate. You can hack it a bit to generate EC-based certificate instead (e.g. secp384r1), but the shadowbox container will fail to initialize properly (no errors in log, just no answers).

Please consider to use ec by default if host supports it, as it is equally secure, but has lower resource footprint.

13xforever avatar Jul 04 '18 16:07 13xforever

The RSA key is only generated once on server creation, and is only used by the server manager (not the client). Have you encountered a performance problem related to this RSA key?

bemasc avatar Jul 06 '18 15:07 bemasc

It's just a good practice, and I am migrating all my certificates to EC-based crypto. Trust in RSA is slowly eroding in general as well. This is not super critical, but I'd like to see this implemented at least as a backup plan.

13xforever avatar Jul 06 '18 15:07 13xforever

@13xforever We like EC keys, too. We use node-forge to generate the keypair but until recently it didn't support them - I see this might have changed: https://github.com/digitalbazaar/forge#ed25519

FYI, @YegorIevlev recently sent us a PR to increase the keysize to 4096 bits: https://github.com/Jigsaw-Code/outline-server/pull/162

trevj avatar Jul 27 '18 19:07 trevj

NIST curves have severe issues, including a possible backdoor (lack of rigidity): https://safecurves.cr.yp.to/

We should wait for Curve25519 certificates.

Do you think I need to try making Curve25519 SSH key generation code (generating Curve25519 keys and wrapping them in SSH key format)?

ghost avatar Jul 28 '18 00:07 ghost

@YegorIevlev I think we'd be open to a PR changing the keys to ED25519, as described here: https://github.com/digitalbazaar/forge#ed25519

trevj avatar Aug 01 '18 14:08 trevj

@trevj We don't need the entire node-forge for that. The minimum required code to generate a keypair is much smaller.

ghost avatar Aug 01 '18 18:08 ghost

@YegorIevlev If we don't need it, great - we love to receive pull requests :-)

trevj avatar Aug 02 '18 16:08 trevj