Hi Ulrich,

You wrote:

> 1. Create a RSAPrivateKeySpec object with the following (the exponents
can be retrieved by any
> object implementing the RSAPublicKey interface):
RSAPrivateKeySpec(BigInteger modulus, BigInteger 
> privateExponent) 2. Create a KeyFactory: KeyFactory.getInstance("RSA")
3. Generate the PrivateKey 
> object by calling: generatePrivate(KeySpec keySpec), where keySpec ist
the key specification you 
> got in step 1.

How is this supposed to work? The public key contains an exponent, but
this is the public not the
private exponent. You may be able to use this to create a private key
with this exponent, but the
usage of such key is questionable.

What should the use case of a signature with a public key be?

My 2ct.

Thomas - speaking for myself and not for my employer.
 
Software AG - Sitz/Registered office: Uhlandstra?e 12, 64297 Darmstadt, 
Germany, - Registergericht/Commercial register: Darmstadt HRB 1562 - Vorstand/ 
Management Board: Karl-Heinz Streibich (Vorsitzender/Chairman), David 
Broadbent, Mark Edwards, Dr. Peter Kurpick, Alfred Pfaff, Arnd Zinnhardt; - 
Aufsichtsratsvorsitzender/ Chairman of the Supervisory Board: Frank F. Beelitz 
- http://www.softwareag.com

Reply via email to