srikanthguduru / connectbot

Automatically exported from code.google.com/p/connectbot
Apache License 2.0
0 stars 0 forks source link

EC key generation fails #647

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Navigate to pubkeys dialog
2. Click the "Generate" button
3. Fill in name
4. Select EC key type
5. Click generate
6. Do randomness swipes

What is the expected output?

Successful key generation. Or on failure - a messagebox stating so.

What do you see instead?

Silent failure. The generation dialog goes away with no indication of failure. 
Logcat shows the following:

D/ConnectBot.GeneratePubkeyActivity( 8446): entropy gathered; attemping to 
generate key...
E/ConnectBot.GeneratePubkeyActivity( 8446): Could not generate key pair
W/System.err( 8446): java.security.NoSuchAlgorithmException: KeyPairGenerator 
EC implementation not found
W/System.err( 8446):    at 
org.apache.harmony.security.fortress.Engine.notFound(Engine.java:113)
W/System.err( 8446):    at 
org.apache.harmony.security.fortress.Engine.getInstance(Engine.java:102)
W/System.err( 8446):    at 
java.security.KeyPairGenerator.getInstance(KeyPairGenerator.java:87)
W/System.err( 8446):    at 
org.connectbot.GeneratePubkeyActivity$5.run(GeneratePubkeyActivity.java:273)
W/System.err( 8446):    at java.lang.Thread.run(Thread.java:1027)

What version of the product are you using (you can see this by using Menu -> 
About in the Host List)?

1.7.1-109-g716cdaa 2013.04.16

Please provide any additional information below.

I'm using gingerbread on an HTC EVO.

I've found that EC key generation to be finicky in Java. You may have to try 
using the ECDSA key generator type... or as a fallback, pull in the ECDSA 
pieces from bouncy-castle.

Original issue reported on code.google.com by harni...@gmail.com on 14 May 2013 at 1:57