What types to pass to SshPrivateKey.Save()?

+1 vote
asked May 11, 2010 by Bill W (230 points)
edited Aug 10, 2010

The help page for the Save method says that it can accept a type or a string, and that a string of "putty" yields a putty-format key, but there is no explanation of what type leads to which encryption algorithm. Is it just the types in System.Security.Cryptography (so, DES, RC2, and TripleDES)?

commented May 11, 2010 by Bill W (230 points)
After some experimentation it seems my guess was correct, but it'd be nice to see this information in the docs nonetheless.

1 Answer

0 votes
answered May 12, 2010 by Lukas Pokorny (94,670 points)
edited May 28, 2010
 
Best answer

The intention of the help page was to explain that the OID strings (like "1.2.840.113549.3.7") are acceptable as encryptionAlgorithm argument, but it looks like this was not clear enough.

Additionally, algorithm name ("TripleDES", "RC2", ...) or type (typeof(System.Security.Cryptography.TripleDES), ...) is accepted as well.

We will update the help page (and the documentation file) to clearly state this, thanks for letting us know!

Update: The documentation has been updated in the current release of Rebex SFTP and SSH Shell.

...