Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key size and possibly using ECC? #10

Open
ItalyPaleAle opened this issue Oct 13, 2021 · 3 comments
Open

Key size and possibly using ECC? #10

ItalyPaleAle opened this issue Oct 13, 2021 · 3 comments

Comments

@ItalyPaleAle
Copy link
Contributor

As I was going through the code, I had a few questions around the private keys that sshizzle uses.

  1. The Terraform script generates a CA key that is 2048 bits in size and is not configurable (I believe this is the snippet). For the CA key, would it make sense to make that 4096-bit by default, or at least make it configurable? The key is generated only once, and the additional cost of signing with a 4096-bit key instead of a 2048-bit one should be negligible.
    Of course, anyone can simply use their own TF script, but defaults hold a lot of power :)
  2. On the other hand, it makes sense that sshizzle-agent uses a 2048-bit RSA key, given that (if I understand correctly) a new key is generated every time the agent is started (presumably every time the client is rebooted, at least?). It's short-lived, and longer RSA keys take much longer to generate.
    However, how about making sshizzle-agent configurable so users can choose what kind of key to use, possibly supporting ECC (like Ed25519) too? ECC keys are generated "instantly" and allow for much smaller signatures. SSH does support ECC keys (including Ed25519), and even if Azure Key Vault continues to use RSA for the CA (as support for ECC in AKV is more limited), it should be possible to use ECC for client certs regardless.
@jgrangethales
Copy link
Contributor

Excellent idea, sane default configuration is definitely best. Are you able to do this?

@ItalyPaleAle
Copy link
Contributor Author

Point 1 is fairly straightforward, I can make a PR later today.

Point 2 requires a bit more work, but if you're interested in that I can look into it too.

@ItalyPaleAle
Copy link
Contributor Author

I made a PR for point 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants