Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Guest

Key-size validation issue

WinSCP version: 5.13.3
Windows version: Windows 10 Enterprise, 10.0.16299 Build 16299

I am trying to generate ECDSA keypairs using the SSH Key Generator (/usr/bin/) tool. Using the -b option to generate a 512 bits key like this (PowerShell syntax):
. "C:/Program Files/Git/usr/bin/ssh-[KEYGENERATOR].exe" -t 'ecdsa' -f 'C:\temp\ecdsa-key' -b 512

The following error shows:
Invalid ECDSA key length: valid lengths are 256, 384 or 521 bits

Notice the 521, where I expected a 512.
However, when I change my call to use the 521, a keypair is generated successfully.
. "C:/Program Files/Git/usr/bin/ssh-[KEYGENERATOR].exe" -t 'ecdsa' -f 'C:\temp\ecdsa-key' -b 521

I haven't been able to validate if the keypair works (and is actually 512 bits), but I'd expect it to, as I can't imagine a keypair can actually be generated with 521 bits.