harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Dmitriev (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-3789) [classlib][security]Diffie-Hellman KeyPairGenerator hangs on generating public/private keys
Date Mon, 07 May 2007 10:41:16 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-3789?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sergey Dmitriev closed HARMONY-3789.
------------------------------------

    Resolution: Won't Fix

I close this JIRA as not a bug since (quote from corresponding Bouncy Castle JIRA's
justification, http://www.bouncycastle.org/jira/browse/BJA-19)
"The SUN Diffie-hellman key pair generator uses precomputed parameters
 for the generation of the diffie-hellman key. The BC key-pair
 generator generates parameters using the standard algorithm if none
 are provided. Doing this is quite expensive, but we felt it was
 better than hiding the fact that parameters are required."

And I attach some dev@harmony correspondence with respect to this. Just for the record.

| On 5/6/07, Sergey Dmitriev wrote:
| > Actually I've filed an issue on Bouncy Casle JIRA,
| > http://www.bouncycastle.org/jira/browse/BJA-19. It is closed as not a
| > bug.
| >
| 
| Interesting ... to browse Bouncy Casle JIRA an account is required.
| 
| Anyway could you add a link(to BJA-19) to HARMONY-3789 and close it?
| 
| Thanks,
| Stepan.
| 
| > Thanks, Sergey
| >
| >
| > On 5/5/07, Sergey Dmitriev <sergey.v.dmitriev@gmail.com> wrote:
| > > Yes, the case you mentioned hangs on my side as well.
| > >
| > > Well I've replaced Harmony's math.jar with JRockit's math classes -
| > > the same picture, it just hangs. It is not about math.  I've taken a
| > > walk to BC sources and found that it does not actually hangs up - it
| > > just works very long. The problem is in safe primes generation for DH
| > > in org.bouncycastle.crypto.generators.DHParametersHelper.generateSafePrimes().
| > >
| > > The default values I found there are: strength = 1024 bit, certainty = 20.
| > >
| > > Probably some crypto specialists can comment this issue out.
| > >
| > > BTW the given testcase comes "back to life" in 12-15 minutes on
| > > my box.
| > >
| > >
| > > Thank
| > > Sergey
| > >
| > >
| > > On 5/4/07, Stepan Mishura <stepan.mishura@gmail.com> wrote:
| > > > On 5/3/07, Sergey Dmitriev <sergey.v.dmitriev@gmail.com> wrote:
| > > > > Guys
| > > > >
| > > > > could some of you take a look at java.security.KeyPairGenerator?
| > > > > It hangs while generating public/private key pair.
| > > > >
| > > >
| > > > The test hands for me on BEA JRockit. I did the following:
| > > > 1) modify a test from JIRA - add provider name param to method:
| > > > KeyPairGenerator.getInstance("DH", "BC");
| > > > 2) copy <classlib>/depends/jars/bcprov-jdk15-136/bcprov.jar to
| > > > jre/lib/ext directory
| > > > 3) add line to java.security file:
| > > > security.provider.7=org.bouncycastle.jce.provider.BouncyCastleProvider
| > > >
| > > > Could you reproduce it?
| > > >
| > > > -Stepan.
| > > >
| > > > > I filed JIRA with respect to this:
| > > > > https://issues.apache.org/jira/browse/HARMONY-3789.
| > > > >
| > > > >
| > > > > Thanks
| > > > > Sergey
| 
| 
| -- 
| Stepan Mishura
| Intel Enterprise Solutions Software Division


> [classlib][security]Diffie-Hellman KeyPairGenerator hangs on generating public/private
keys
> -------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3789
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3789
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: linux-ia32, win-ia32
>            Reporter: Sergey Dmitriev
>
> Diffie-Hellman KeyPairGenerator hangs on generating public/private
> pair of keys (at least it takes more than 5 minutes of 100% CPU load,
> I pressed Ctrl-C). On JRockit it takes about couple of seconds on same
> machine.
> ] boy@moon ~
> ] time java -showversion keypair
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-linux-ia32, R25.0.0-75, GC: System
optimized over throughput (initial strategy singleparpar))
>  
> kpg    : java.security.KeyPairGenerator$Delegate@80d0bd8
> keypair: java.security.KeyPair@80d2c33
>  
> real    0m2.845s
> user    0m1.854s
> sys     0m0.178s
> ] boy@moon ~
> ] time ~/jre2/bin/java -showversion keypair
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or
its licensors, as applicable.
> java version "1.5.0" 
> pre-alpha : not complete or compatible
> svn = r532358, (Apr 25 2007), Linux/ia32/gcc 3.3.3, release build
> http://incubator.apache.org/harmony
> kpg    : org.bouncycastle.jce.provider.JDKKeyPairGenerator$DH@128
> ^C
>  
> real    5m17.690s
> user    5m16.204s
> sys     0m0.485s
> ] boy@moon ~
> ] cat keypair.java 
> import java.security.*;
>  
> public class keypair {
>     public static void main(String args[]) throws Exception {
>         KeyPairGenerator kpg = KeyPairGenerator.getInstance("DH");
>         System.out.println("kpg    : " + kpg);
>         System.out.println("keypair: " + kpg.genKeyPair());
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message