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

RSA Hostkey, RSA Certificate, and DH Group Exchange Moduli Tests #30

Closed
wants to merge 9 commits into from

Conversation

jtesta
Copy link

@jtesta jtesta commented Sep 28, 2017

This PR adds RSA key size checking (for both stand-alone host keys AND those in certificates), as well as Diffie-Hellman group exchange modulus tests (solves issues #19 and #24). Moduli found to be less than 2,048-bits are flagged.

Example results:

# key exchange algorithms
(kex) diffie-hellman-group-exchange-sha256 (1024-bit) -- [fail] using small 1024-bit modulus
[...]

# host-key algorithms
(key) ssh-rsa (3072-bit)                    -- [info] available since OpenSSH 2.5.0, Dropbear SSH 0.28
(key) rsa-sha2-512 (3072-bit)               -- [info] available since OpenSSH 7.2
(key) rsa-sha2-256 (3072-bit)               -- [info] available since OpenSSH 7.2
(key) ssh-rsa-cert-v01@openssh.com (3072-bit cert/1024-bit CA) -- [fail] using small 1024-bit modulus

Additional certificate tests can be added in the future, such as principle matching checks, and validation of time ranges. If there's interest in the obsolete "ssh-rsa-cert-v00@openssh.com" host key type, that can be added as well (this PR only handles the newer "ssh-rsa-cert-v01@openssh.com" type).

Unfortunately, I've run out of time, and can't get to fixing the mypy errors introduced. That probably isn't too hard, though, for someone familiar with mypy.

@jtesta
Copy link
Author

jtesta commented Sep 28, 2017

I'd love to fix the failing test, but I'm not sure how to run them locally. Any hints?

@jtesta
Copy link
Author

jtesta commented Oct 4, 2017

@arthepsy ping

@arthepsy
Copy link
Owner

arthepsy commented Oct 9, 2017

@jtesta sorry for not getting back sooner. Will reply in few hours.

@jtesta
Copy link
Author

jtesta commented Oct 21, 2017

@arthepsy re-ping

@jtesta
Copy link
Author

jtesta commented Oct 30, 2018

@arthepsy So, uhh... hi. Its been over a year, and this hasn't been merged.

Are you still interested in maintaining this project? If not, I'd be happy to take over as maintainer!

@immanuelfodor
Copy link

And another year has passed 😕

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

Successfully merging this pull request may close these issues.

None yet

3 participants