Mailing List Archive

[Bug 577] bug (wrong flag) in sc_private_decrypt (scard-opensc.c)
http://bugzilla.mindrot.org/show_bug.cgi?id=577

Summary: bug (wrong flag) in sc_private_decrypt (scard-opensc.c)
Product: Portable OpenSSH
Version: -current
Platform: All
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Smartcard
AssignedTo: openssh-bugs@mindrot.org
ReportedBy: larsch@trustcenter.de


There's a small bug in scard-opensc.c. The OpenSC function sc_pkcs15_decipher
is called with the wrong flag. Currently sc_private_decrypt set the flag to
0 and hence OpenSC uses RSA raw to decipher the cryptogram => the Smartcard
(or OpenSC) does not remove the PKCS#1 padding => v1 authentication fails
because the returned data has the wrong length. To fix this problem simply
replace:
r = sc_pkcs15_decipher(p15card, key_obj, 0, from, flen, to, flen);
with
r = sc_pkcs15_decipher(p15card, key_obj, SC_ALGORITHM_RSA_PAD_PKCS1, from, flen,
to, flen);

Nils



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 577] bug (wrong flag) in sc_private_decrypt (scard-opensc.c) [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=577





------- Additional Comments From larsch@trustcenter.de 2003-05-27 22:51 -------
Created an attachment (id=312)
--> (http://bugzilla.mindrot.org/attachment.cgi?id=312&action=view)
patch to fix the issue with the wrong sc_pkcs15_decrypt flag




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 577] bug (wrong flag) in sc_private_decrypt (scard-opensc.c) [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=577

djm@mindrot.org changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Summary|bug (wrong flag) in |bug (wrong flag) in
|sc_private_decrypt (scard- |sc_private_decrypt (scard-
|opensc.c) |opensc.c)



------- Additional Comments From djm@mindrot.org 2003-06-04 21:53 -------
Fix applied, thanks.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 577] bug (wrong flag) in sc_private_decrypt (scard-opensc.c) [ In reply to ]
http://bugzilla.mindrot.org/show_bug.cgi?id=577

larsch@trustcenter.de changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |VERIFIED





------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.