1
1
Jon Simons 465816f4a0 pki_crypto: pad RSA signature blobs
Pad RSA signature blobs to the expected RSA signature length
when processing via 'pki_signature_to_blob'.

Some clients, notably PuTTY, may send unpadded RSA signatures
during the public key exchange: before this change, one can
sometimes observe failure in signature validation when using
PuTTY's 'plink' client, along these lines:

   ssh_packet_process: ssh_packet_process: Dispatching handler for packet type 50
   ssh_packet_userauth_request: ssh_packet_userauth_request: Auth request for service ssh-connection, method publickey for user 'foo'
   ssh_pki_signature_verify_blob: ssh_pki_signature_verify_blob: Going to verify a ssh-rsa type signature
   pki_signature_verify: pki_signature_verify: RSA error: error:04091077:rsa routines:INT_RSA_VERIFY:wrong signature length
   ssh_packet_userauth_request: ssh_packet_userauth_request: Received an invalid  signature from peer

For cross-reference this issue once also existed between
PuTTY and OpenSSH:

  http://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/rsa-verify-failed.html

  http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/ssh-rsa.c?rev=1.19;content-type=text%2Fx-cvsweb-markup

With the fix I am unable to reproduce the above failure mode when
testing with 'plink'.

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-01-21 16:11:12 +01:00
..
2012-03-09 18:14:13 +01:00
2014-01-21 16:07:04 +01:00
2014-01-07 16:08:23 +01:00
2014-01-07 16:08:23 +01:00
2014-01-07 15:18:15 +01:00
2011-09-18 21:37:17 +02:00
2014-01-07 15:18:15 +01:00
2013-07-21 11:26:55 +02:00
2014-01-07 15:18:15 +01:00
2011-05-01 19:42:50 +02:00
2014-01-16 15:27:46 +01:00
2013-10-18 23:22:24 +02:00
2012-10-05 11:22:15 +02:00
2014-01-07 15:18:15 +01:00
2012-10-09 11:09:34 +02:00
2014-01-07 16:08:23 +01:00
2014-01-07 16:08:23 +01:00
2014-01-07 16:08:23 +01:00
2014-01-08 18:57:31 +01:00
2014-01-07 15:18:15 +01:00