> I've got a /little/ problem with signatures and the MuscleCard Applet
> 0.9.8.
> When i try to sign some md5 hashes this doesnt work with every hash. I
> can't locate the a pattern in the md5 what actually make it unusable.
> But the "signme" example isnt working for me on different cards (see
> below for more info about used software and hardware)
>
> $ echo -n "signme" | md5sum
> d65a65a5e0ce29e5f28ef3069d974761      // doesnt work for me
>
> $ echo -n "1234" | md5sum
> 81dc9bdb52d04dc20036dbd8313ed055     // Works on every card for me
I've had a similar problem with RSA-encryption via openssl.

Please check your public key (the N of e^d mod N), especially the first byte 
compared with the bytes 81 and d6 above.
If my theory is correct, your first public key byte should be between these 
two.

The problem is (in this case) that RSA performs a modulo operation; this will 
truncate all values above the value N.
I got around by padding my value with other bytes; (and varying these bytes, 
because I first encrypted with another public key and then with my private 
key - and the intermediate product was too high)

So try instead of
        muscle [MuscleCard Applet] > crypt 2 d65a65a5e0ce29e5f28ef3069d974761
something like
        muscle [MuscleCard Applet] > crypt 2 00d65a65a5e0ce29e5f28ef3069d974761

Or, if possible for you, generate another private/public key pair.


(BTW, is your N possibly 
A9C5A534C221E577125CBB5C8A6A1769024835D1FFA5205B72FFFED7201449E30B0C\
74EA7252D529207BF01BEA692B9ED80E90FB732EFC7D806FA1565CDA2B7C83540830\
2A0A82CB57AFFFC897D69AC73DCAAFDB6AACD6076BE21173007265C1D9F81EFF21CA\
798BE67CAFB34A697E883FC90BA984764E64A4D3BC3D554DEA29 ?? :-)


Regards,

Phil

_______________________________________________
Muscle mailing list
[EMAIL PROTECTED]
http://lists.musclecard.com/mailman/listinfo/muscle

Reply via email to