logo       

Re: opensc and infocamere card: msg#00255

encryption.opensc.devel

Subject: Re: opensc and infocamere card

Il giorno mar, 29-03-2005 alle 16:35 +0200, Stef Hoeben ha scritto:
[...]
> >Decryption (RSA)
> > testing key 0 (Authentication Key)
> > RSA-X-509: resulting cleartext doesn't match input
> > Original: 61 62 63 64 65 66 67 68 69 00
> > Decrypted: 23 6f 38 e9 e2 a8 61 db 4d 4e 8e 79 66 65 88 89 7f 29 5a
> >07 86 58 62 4f cf 45 e3 1b c0 d6 5e 51 0e 96 71 ee 0c 07 2a 48 6a de 26
> >2c b3 fe 15 15 76 56 5c 36 4e 9a 0b 7c bd 1d 19 d2 27 2e 5b 02 28 46 30
> >c6 ba 07 bd ce 77 6f d4 a1 b9 2f 7e a4 e6 4f d3 d9 5e 28 94 56 c7 db a5
> >e1 a5 2f 97 2b de 7a 7a 4d 57 df ba cc 37 f5 7e 04 9c 38 60 4c df d0 58
> >1a 56 95 b6 fe e6 33 6d 4a c0 fb 1f 45
> >pkcs15-sec.c:142:sc_pkcs15_decipher: Invalid PKCS#1 padding: Wrong
> >padding
> >error: PKCS11 function C_Decrypt failed: rv = CKR_GENERAL_ERROR (0x5)
> >
> >
> Perhaps the key and cert don't match with each other. You can find out with
> "pkcs15-tool -c -k" (matching keys and certs have the same ID),
> and by "downloading" and viewing the cert.
>
> If not, then there's something wrong with the signature that was generated.

Sorry to bother you again,
how can I check if the signature has something wrong? The card was
provided by Infocamere (an italian Certification Authority) and tested
with other software.

I tried what you suggest and the ID are correct, aren't they?

X.509 Certificate [User Authentication Certificate]
Flags : 2
Authority: no
Path : 000011111B02
ID : 01

X.509 Certificate [User Non-repudiation Certificate]
Flags : 2
Authority: no
Path : 3F00000011111A02
ID : 02

Private RSA Key [Authentication Key]
Com. Flags : 1
Usage : [0xF], encrypt, decrypt, sign, signRecover
Access Flags: [0x1D], sensitive, alwaysSensitive, neverExtract,
local
ModLength : 1024
Key ref : 1
Native : yes
Path : 3F0000001111
Auth ID : 01
ID : 01

Private RSA Key [Non repudiation Key]
Com. Flags : 1
Usage : [0x200], nonRepudiation
Access Flags: [0x1D], sensitive, alwaysSensitive, neverExtract,
local
ModLength : 1024
Key ref : 1
Native : yes
Path : 3F0000001111
Auth ID : 02
ID : 02

Thanks,
Giuseppe


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise