[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [iaik-ssl] decrypt with public key???

Dear Peter,

Thanks for your answer.

I never can (nor want to) get used to thinking of creating signatures as encrypting 
with the private key, and verifying as decrypting with the public key. This way
of thinking may be applicable to RSA, because RSA happens to have the special
property of symmetry between public and private key, but it is not necessarily 
applicable to other signature schemes such as DSA or ElGamal or Elliptic Curve 
Signature schemes, for which the words en/decryption make no sense. 

So in my view in Public Key Cryptography encrypting is always done with a public key, 
and decrypting with a private key. My guess is that that is how the JCE Cipher class is
meant to be, though I admit that this is not explicitly mentioned in the documentation.
Also in my view, if you want to do signing/verifying, the words encryption and decryption
should be avoided, as it is confusing. I realise that many other people have a
different view, but I never will get used to it.

My provider implements the Cipher object according to these views. I now realise
that the real problem is in the PKCS1Padding, which is different for signatures
than for en/decrypting. So as far as I understand it now, iSaSiLk expects from 
a provider's RSA Cipher object that it should be able to do a decrypt with a
public key using the Signature-type PKCS1Padding. Right? I missed this
in the documentation.

Frankly, I indeed prefer all this to be done with a Signature object. Why did you 
choose to do it with a Cipher? I did not yet test iSaSiLk with cipher suites using 
DSA. I guess you do that with a Signature object?

Also the algorithm type "RSA/ECB/PKCS1Padding/Verify" seems to be non-standard.


Benne de Weger

=== Office: ==================================
       Concord-Eracom Nederland BV
       Hullenbergweg 355 
       1101 CP Amsterdam Zuid-Oost, The Netherlands
       e-mail: deweger@concord-eracom.nl  
       web:    www.concord-eracom.com
       phone:  (020) 3116540 (+31 20 3116540)
       fax:    (020) 3116541 (+31 20 3116541)
When it comes to information security, we talk business:
PCVault - Workstation and Notebook Hard Disk Encryption
SECLAN - Corporate Network Disk Encryption
SMAILE - Secure Mail Extension for MS Exchange + Outlook 97/98
CSA 7000 - Encryption Adapter (now with JAVA  - JCA/JCE Provider)
ESM 2000 - Eracom Security Module (with VISA/Mastercard Support)
Several CA - E-Commerce Products are in the pre-production stage
Consulting Services

From: 	Peter Lipp[SMTP:Peter.Lipp@iaik.at]
Sent: 	donderdag 24 februari 2000 9:13
To: 	Benne de Weger; iaik-ssl@iaik.at
Subject: 	AW: [iaik-ssl] decrypt with public key???

<<File: smime.p7s>>
> I do not see the logic here: why decrypt mode? How should I
> initialize an RSA  cipher in decrypt mode with a public key?
> What exactly is iSaSiLk  expecting
> here from the provider's implementation of Cipher?
I am not sure I understand what you dont understand :-)
If I want to verify a signature, I need to decrypt using the public key. Do
you suggest one should use a Signature-Object here?

Dr. Peter Lipp
Inffeldgasse 16a, A-8010 Graz, Austria
Tel: +43 316 873 5513
Fax: +43 316 873 5520
Web: www.iaik.at

Mailinglist-archive at http://jcewww.iaik.at/mailarchive/iaik-ssl/sslthreads.html

To unsubscribe send an email to listserv@iaik.at with the folowing content: UNSUBSCRIBE iaik-ssl