-
Couldn't load subscription status.
- Fork 46
ECDSA support #44
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
ECDSA support #44
Conversation
passcode > passphrase
Validate ECDSA and Ed25519 pub keys (elliptic curve)
Fix ENOENT in README, resolves #25
Inline PublicKeyError class
``` /home/pocke/ghq/github.com/bensie/sshkey/test/sshkey_test.rb:264: warning: assigned but unused variable - public_key1 /home/pocke/ghq/github.com/bensie/sshkey/test/sshkey_test.rb:265: warning: assigned but unused variable - public_key2 /home/pocke/ghq/github.com/bensie/sshkey/test/sshkey_test.rb:266: warning: assigned but unused variable - public_key3 /home/pocke/ghq/github.com/bensie/sshkey/lib/sshkey.rb:124: warning: assigned but unused variable - source_format ```
``` /home/pocke/ghq/github.com/bensie/sshkey/test/sshkey_test.rb:388: warning: mismatched indentations at 'end' with 'def' at 379 ```
``` /home/pocke/ghq/github.com/bensie/sshkey/lib/sshkey.rb:234: warning: constant OpenSSL::Cipher::Cipher is deprecated /home/pocke/ghq/github.com/bensie/sshkey/lib/sshkey.rb:38: warning: constant OpenSSL::Cipher::Cipher is deprecated ```
Bump up Ruby version in Travis CI
Supress warnings
as per
https://tools.ietf.org/html/rfc4255
https://tools.ietf.org/html/rfc6594
this is similar to
ssh-keygen -r localhost -f /etc/ssh/ssh_host_rsa_key
* lib/sshkey: accept valid ed25519 keys with leading zero byte * Add test case for 31 byte ed25519 key
* SSH public keys not validated/parsed if contain comments * SSH public keys not validated/parsed if contain comments
* add failing test case for #35 * Determine ECDSA bit lengths fixes #35 Co-authored-by: James Miller <[email protected]> Co-authored-by: Rob Chekaluk <[email protected]>
|
After merging (recently-updated) master branch into ec, the test suite is down to 2 failures. |
… to_octet_string in a C extension
|
@rchekaluk You've been busy! Let's not go too far here with the C extension. I'd like to steer clear of anything that resembles rolling our own crypto and keep this in pure Ruby. Old Ruby version support isn't worth a massive increase in complexity. Thanks for your work so far! |
|
Introduction to commit a105960 JRuby support for ECDSA is currently incomplete:
Consequently, various test cases raise NotImplementedError when run under JRuby. |
|
@rchekaluk If Ruby 2.5 is the beginning of built-in support for ECDSA, let's just have that be where the line is drawn for ECDSA support. 2.4.x and older are no longer supported anyway. This adds an immense amount of complexity for Ruby versions that are already EOL. |
|
Understood @bensie. I figured I'd put it out there for review and learn something in the process. Unless objections, I can raise the minimum Ruby, and re-apply only the aspects that are needed for JRuby to succeed. |
|
@rchekaluk Be sure to let me know when this is ready! |
|
Ready. I have incorporated this branch into my dev environment and it is working fine. Note: the PR merely merges into branch |
|
Ready @bensie |
|
@bensie Any prospects for a merge? |
This is a next step towards fuller ECDSA support, leveraging the initial work done in branch ec. It's not complete, but I thought I'd send this PR in advance in case you may have any initial feedback.
I manually refreshed branch ec from master prior to adding new functionality.
Three tests are currently failing, which may be due to its lack of correct support for ssh_public_key_bits (since it is a branch off master).