Skip to content

Commit

Permalink
ssh2john: add EC AES-256-CBC conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
Nothing4You authored and solardiz committed Dec 29, 2024
1 parent 207445a commit 5c184a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion run/ssh2john.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def read_private_key(filename):
if keysize == 24 and encryption_type == "AES-192-CBC" and (ktype == 0 or ktype == 1): # RSA, DSA keys using AES-192
hashline = "%s%s:$sshng$%s$%s$%s$%s$%s" % (f.name, filename_idx, 4, len(saltstr) // 2,
saltstr, len(data) // 2, data)
elif keysize == 32 and encryption_type == "AES-256-CBC" and (ktype == 0 or ktype == 1): # RSA, DSA keys using AES-256
elif keysize == 32 and encryption_type == "AES-256-CBC" and (ktype == 0 or ktype == 1 or ktype == 3): # RSA, DSA, EC keys using AES-256
hashline = "%s%s:$sshng$%s$%s$%s$%s$%s" % (f.name, filename_idx, 5, len(saltstr) // 2,
saltstr, len(data) // 2, data)
elif keysize == 24:
Expand Down

0 comments on commit 5c184a4

Please sign in to comment.