hierynomus / sshj

ssh, scp and sftp for java
Apache License 2.0
2.46k stars 594 forks source link

Add AES-GCM Support for OpenSSH Private Keys #899

Closed exceptionfactory closed 8 months ago

exceptionfactory commented 8 months ago

This pull request adds support for decrypting OpenSSH Version 1 Private Keys encrypted with the following ciphers:

These ciphers require reading an additional authentication tag field from the encoded binary, which the cipher uses for verification.

Additional changes include adding support for the following alternative block cipher algorithm and key size combinations, aligning with OpenSSH ssh-keygen supported ciphers.

codecov-commenter commented 8 months ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@a3cce0d). Click here to learn what that means. The diff coverage is 88.70%.

@@            Coverage Diff            @@
##             master     #899   +/-   ##
=========================================
  Coverage          ?   68.42%           
  Complexity        ?     1401           
=========================================
  Files             ?      207           
  Lines             ?     7475           
  Branches          ?      630           
=========================================
  Hits              ?     5115           
  Misses            ?     2024           
  Partials          ?      336           
Files Coverage Δ
...sshj/userauth/keyprovider/OpenSSHKeyV1KeyFile.java 86.38% <88.70%> (ø)