On Mon, Oct 01, 2001 at 11:25:56AM -0400, Jim Rees wrote:
> We have no plans to do anything more with libsectok or ssh. I do want to
> keep the OpenBSD version of ssh compatible with the portable version.
> I don't think it would be possible to use Cryptoflex with ssh, because
> Cryptoflex does not have an RSA decrypt function.
Huh?
Then how does the smarttools-rsa manage to use the cryptoflex?
In fact, it does. It's called "signing". Signing is
functionally equivalent to decrypting. They are both the "private
key" operation of the public/private algorithm. If you take a block
of "cleartext" and run it through the private key operation, you
generate a signature block that could have only been created by you
and can be "decrypted" or verified by someone with your public key.
If you take a block of cyphertext encrypted to the public key and
run it through the private key operation, you recover the plain text.
Here is a code fragment from the decrypt function in the
smarttools-rsa:
/* Decrypt the synchronous key */
dwSize = 0x80;
memset( Key, 0x00, sizeof(Key) );
rv = SCSRSASignData( hCard, CipherKey, Key, &dwSize );
You'll notice that they are using the "SignData" function to
reverse the encryption (decrypt) of the synchronous key here. If you
go to the csp-cryptoflex.c you see that this function simply ships the
data over to the card and performs the RSA signature operation on it
thus decrypting the encrypted key.
What exactly is it that you feel is missing?
The one really limitation that I DO know about in the cryptoflex
cards is that they are limited to 1024 bit RSA keys. This is at least
the case for the ones I have. Newer cards may support larger keys. It
could be a bit tricky though, because the key length field is only one
byte long and 0x80 indicates 1024. The next power of 2 up is a bummer.
> I don't think it would be too hard to port the ssh applet to a generic
> Javacard. I don't think it would require any changes to ssh, but ssh-keygen
> might have to change. The main problem is that Javacard doesn't have a file
> system, so the key would have to be stored as class data in the applet.
Ouch! That sucks.
> Joe Phillips has code that puts a libsectok front end on pc/sc.
> ***************************************************************
> Unix Smart Card Developers - M.U.S.C.L.E.
> (Movement for the Use of Smart Cards in a Linux Environment)
> http://www.linuxnet.com/
> To unsubscribe send an email to [EMAIL PROTECTED] with
> unsubscribe sclinux
> ***************************************************************
Mike
--
Michael H. Warfield | (770) 985-6132 | [EMAIL PROTECTED]
(The Mad Wizard) | (678) 463-0932 | http://www.wittsend.com/mhw/
NIC whois: MHW9 | An optimist believes we live in the best of all
PGP Key: 0xDF1DD471 | possible worlds. A pessimist is sure of it!
***************************************************************
Unix Smart Card Developers - M.U.S.C.L.E.
(Movement for the Use of Smart Cards in a Linux Environment)
http://www.linuxnet.com/
To unsubscribe send an email to [EMAIL PROTECTED] with
unsubscribe sclinux
***************************************************************