Re: ECDSA - i can help with code
Thanks for your feedbacks!
I'm sending you an email with a development version of WinSCP to the address you have used to register on this forum.
Any update on this? A fast glance at recent releases doesn't show anything.
There's still no PuTTY release with ECDSA support.
Any update on this? A fast glance at recent releases doesn't show anything.
Will check it. But in general I prefer waiting for a stable release.
I'll look into it.
not include ECDSA into recent PuTTY 0.64 release. I'm sure there's a reason for that.
I can't find SSH2-ECDSA support in your current version or in your project roadmap.
Is there any Status to SSH2-ECDSA support?
Thanks for sharing your code. Could you contact PuTTY team and offer them help integrating this to PuTTY codebase?
https://www.chiark.greenend.org.uk/~sgtatham/putty/feedback.html
We will takeover the implementation then. Thanks.
Already written them: putty@projects.tartarus.org
They expect to see a patch for the putty, but I do not want to learn ssh protocol.
#include "ec.h"
...
size_t rsize;
uint8_t rnd[70], priv_key[70], pub_key_x[70], pub_key_y[70], sign_r[70], sign_s[70];
ec_curve_t curve;
/* SHA-1("abc") = "a9993e364706816aba3e25717850c26c9cd0d89d" */ uint8_t hash_abc[20] = {0xa9, 0x99, 0x3e, 0x36, 0x47, 0x06, 0x81, 0x6a, 0xba, 0x3e, 0x25, 0x71, 0x78, 0x50, 0xc2, 0x6c, 0x9c, 0xd0, 0xd8, 0x9d};
/* Get curve params by name. */
if (0 != ec_curve_from_str(ec_curve_str_get_by_name((uint8_t*)"secp192r1", 9), &curve))
return (-1);
/* Generating keys. */
memset(rnd, 173, sizeof(rnd));/* XXX rand!!! */
if (0 != ec_key_gen(rnd, sizeof(rnd), &curve, priv_key, pub_key_x, pub_key_y, &rsize))
return (-1); /* Error! */
/* Sign */
memset(rnd, 73, sizeof(rnd));/* XXX rand!!! */
if (0 != ec_sign((uint8_t*)hash_abc, 20, priv_key, rsize, rnd, sizeof(rnd), &curve, sign_r, sign_s, &rsize))
return (-1); /* Error! */
/* Verify */
if (0 != ec_verify(&curve, pub_key_x, pub_key_y, rsize, (uint8_t*)hash_abc, 20, sign_r, sign_s, rsize))
return (-1); /* Error! */