matheus ribeiro schrieb:
Hello Karsten, thanks again for the answer.

    The errors below sound strange. I have to examine this ... What I know
    is, that if you have used an algorithm, e.g. RSA with no padding, once
    for a key, this key can only be used with this algorithm. You use the
    applet version 0.9.11?


Thats right, applet version is 0.9.11 from svn.


    Object means object or key?


Object means object. May be plain coincidence, but it happens all the time. After formatting the card, if I try to sign, this happen.

I have used also the applet version 0.9.11 and the muscleTools. I have tested it with a CFlex under Linux. I have generated a RSA CRT key with 1024 bits and tried to sign. The card throws an 6F00 error. (I believe RSA with MD5 hash is not implemented by this applet version.) So this is normal with this applet version.

Then I tried the encrypt with RSA and no padding with success. After this the alggorithm is fixed to RSA with no padding and I get an 9c03 error if I try tro used RSA with PKCS#1 padding. You should have the same behaviour. So if you want to sign something you must hash it, pad it on your own and encrypt the hash with RSA no padding.

For the strange invalid signature I have no explanation.

> ERR: EstablishConnection Failed !
> Is your card already formated?

I also get this results with the same libmusclecard and MCardPlugin version like you. I guess, this is not an error of muscleTool. This is a problem of libmusclecard or MCardPlugin.

Karsten


==================================
==================================
muscleTool [MuscleCard Applet] > crypt 0

Would you like to:
0. Abort this selection.
1. Sign
2. Decrypt

Choose (0-2): 1

Please enter text to sign in hexadecimal ASCII (at most 1023 characters)
Example: 30313233 for 0123

'a' aborts this query.
Enter text : 3031

Select the algorithm:
0. Abort this selection.
1. RSA with MD5 hash and PKCS#1 padding

Choose (0-1): 1
ERR: Crypt Failed ! (0x6F00 Unknown SW: 6F00)

=================================
=================================

But then, I create an object bla:
================================
================================
muscleTool [MuscleCard Applet] > create bla 2048
doCreate(bla, 2048)

Enter the ACL for reading the object
Example: 0xFFFF for all users
'a' aborts this query.
Enter ACL mask : 0x0

Enter the ACL for writing the object
Example: 0x0002 for user PIN #1
'a' aborts this query.
Enter ACL mask : 0

Enter the ACL for deleting the object
Example: 0x0002 for user PIN #1
'a' aborts this query.
Enter ACL mask : 0
CreateObject Successful
================================
================================

After object creation, I try again the same crypt command:
================================
================================
muscleTool [MuscleCard Applet] > crypt 0

Would you like to:
0. Abort this selection.
1. Sign
2. Decrypt

Choose (0-2): 1

Please enter text to sign in hexadecimal ASCII (at most 1023 characters)
Example: 30313233 for 0123

'a' aborts this query.
Enter text : 3031

Select the algorithm:
0. Abort this selection.
1. RSA with MD5 hash and PKCS#1 padding

Choose (0-1): 1
Result    : 0A2B
Crypt Successful.
================================
================================

So is it necessary to have an object created for sign to work? Also, this is what happens after sign, card becomes useless untill I reinstall the applet (i removed and reinserted the card):

================================
================================
[EMAIL PROTECTED]:~$ muscleTool
MuscleCard shell - type "help" for help.
muscleTool > tokens
   1.    MuscleCard Applet

ListTokens Success.
muscleTool > connect 1
ERR: EstablishConnection Failed !
Is your card already formated?
================================
================================

BTW, I could not compile your new version. When I try to reconfigure this happens:
=================================
===============
[EMAIL PROTECTED]:~/src/karsten/libmusclecard$ ./reconf
if [ -e Makefile ]
then
        make distclean
fi

# use with --force when autoconf/automake/libtool change
autoreconf --verbose --install $@
autoreconf: Entering directory `.'
autoreconf: configure.in <http://configure.in>: not using Gettext
autoreconf: running: aclocal
autoreconf: configure.in <http://configure.in>: tracing
autoreconf: running: libtoolize --copy
autoreconf: running: /usr/bin/autoconf
configure.in:40 <http://configure.in:40>: error: possibly undefined macro: AC_MSG_ERROR
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.in:62 <http://configure.in:62>: error: possibly undefined macro: AC_DEFINE
autoreconf: /usr/bin/autoconf failed with exit status: 1
==================================
=================================


Thanks a lot!
Matheus


------------------------------------------------------------------------

_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle

_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to