-
Notifications
You must be signed in to change notification settings - Fork 35
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
Can't load ed25519 keys to pageant, with KeeAgent 0.13.1 and 0.13.2 #363
Comments
Can you create an new key that reproduces the problem and attach it to this issue? |
test-ed25519-key.txt |
I got the same problem. |
@dlech, Can I help you to investigate this issue by adding other information? Or could you give me some pointers to start checking? |
I tried the test key provided, but it loads just fine on Windows in agent mode with the file attached to KeePass database entry. Are you using a different setup? |
I encountered the same issue after an upgrade to the 13.1/13.2 versions. My keys were correctly loaded before the upgrade of the plugin. The only way I found to add the key is to load it from a file through the menu Tools>KeyAgent. |
I'm sorry that I didn't respond a long time.
It seems like other people don't affect my issue, so I'm looking for another way to debug this issue. |
Should be fixed in the latest builds (e.g. https://github.com/dlech/KeeAgent/suites/8813693594/artifacts/401080876) unless this issue is different from #370. |
I got the message blob from the older (0.12.1) and the latest (0.13.2) by the Visual Studio debugger.
it seems truncated, but I don't know why. |
I dug to SshAgentLib/AgentClient.cs. But I'm very confused that it works on your side. |
In golang implementation, the ed25519 private key should be 0x40 bytes and it is constructed by concatenating the private part and the public part. |
I tried to send the full private key, I confirmed I could load my test key to pageant. case PublicKeyAlgorithm.SshEd25519:
var ed25519PublicKeyParameters =
key.GetPublicKeyParameters() as Ed25519PublicKeyParameters;
var ed25519PrivateKeyParameters =
key.GetPrivateKeyParameters() as Ed25519PrivateKeyParameters;
builder.AddBlob(ed25519PublicKeyParameters.GetEncoded());
- builder.AddBlob(ed25519PrivateKeyParameters.GetEncoded());
+ var b = new byte[0x40];
+ Array.Copy(ed25519PrivateKeyParameters.GetEncoded(), b, 0x20);
+ Array.Copy(ed25519PublicKeyParameters.GetEncoded(), 0, b, 0x20, 0x20);
+ builder.AddBlob(b);
break; |
You did not mention that you are running in Client Mode and I forgot to ask and assumed Agent Mode, so that is probably the difference. Nice work on finding the problem. |
@dlech Thank you for fixing it! |
I don't know how to debug this issue, but I can't load my ed25519 keys (I tried with two different keys) after upgrading to 0.13.1/0.13.2.
I rollbacked it to 0.12.1, and I confirmed it works as expected.
Any idea to debug this? I got the following message box for that, but no details are found.
additional info: I'm using PuTTY pre-0.78 build, but I'm not sure if it's related or not.
The text was updated successfully, but these errors were encountered: