Results 1 to 2 of 2
  1. #1
    yoram2011 is offline Member
    Join Date
    Aug 2011
    Posts
    3
    Rep Power
    0

    Default Elliptic Curve Encryption in Java 7... Is it implemented?

    According to this documentation JAVA 7 supports Elliptic Curve encryption.

    Standard Algorithm Name Documentation

    I've tried

    Java Code:
    Cipher cipher = Cipher.getInstance("ECIES");
    but I get

    Java Code:
    Exception in thread "main" java.security.NoSuchAlgorithmException: Cannot find any provider supporting ECIES
    	at javax.crypto.Cipher.getInstance(Cipher.java:523)
    	at com.company.poc.apps.test.urlcipher.impl.ECPurePKI.crypt(ECPurePKI.java:36)
    	at com.company.poc.apps.test.urlcipher.PkiPerformance.testEncryption(PkiPerformance.java:139)
    	at com.company.poc.apps.test.urlcipher.PkiPerformance.execute(PkiPerformance.java:297)
    	at com.company.poc.apps.test.urlcipher.PkiPerformance.main(PkiPerformance.java:265)
    I can't see it listed when I run that code either:

    Java Code:
    	private static void debugProviders()  throws Exception {
    		if (log.isDebugEnabled()) {
    			log.debug("**************** JCE PROVIDERS BEGIN ***************");
    			Set<String> set = new TreeSet<String>();
    
    			Provider[] providers = Security.getProviders();
    				
    			for (Provider p: providers) {
    				//log.debug("Provider class: " + provider);
    				
    				/*Class<?> providerClass = Class.forName(provider);
    				Object o = providerClass.newInstance();*/
    				
    				//Provider p =  (Provider)o;
    				
    				for (Entry<Object, Object> entry: p.entrySet()) {
    					String key = entry.getKey().toString();
    					String value = entry.getValue().toString();
    					
    					if ((key.startsWith("Cipher.")) && (value.indexOf('.') > 0)) {
    						set.add(key.toString().substring(7) + ": " + value.toString());
    					}
    				}				
    			}
    			
    			for (String s: set) {
    				log.debug(s);
    			}
    				
    			//log.debug(" ");
    			
    			log.debug("**************** JCE PROVIDERS end ***************");
    			
    		}
    	}
    I'm using the Unlimited Strength downloaded from Sun Website. I've generated a key pair using

    keytool -genkeypair -keyalg EC -keysize 160 -keystore test-ie.jks -storepass password -alias ec160 -dname "CN=Yoram Halberstam, OU=Test EC 160, O=COMPANY, L=London, ST=London, C=GB"
    Last edited by yoram2011; 08-25-2011 at 11:41 AM.

  2. #2
    yoram2011 is offline Member
    Join Date
    Aug 2011
    Posts
    3
    Rep Power
    0

    Default

    Apparently all Java provides is standard naming and not the algorithm (see here). Case closed!

Similar Threads

  1. ECC:Java based elliptic curve crystallography
    By bachally in forum New To Java
    Replies: 6
    Last Post: 01-27-2011, 01:22 PM
  2. How should an Animation class be implemented?
    By kiregad in forum New To Java
    Replies: 9
    Last Post: 06-18-2010, 08:39 AM
  3. Java Learning Curve
    By mwildam in forum New To Java
    Replies: 13
    Last Post: 10-17-2008, 12:09 PM
  4. A Map implemented with ArrayLists
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-16-2008, 11:29 PM
  5. Encryption in java
    By Ed in forum Advanced Java
    Replies: 1
    Last Post: 07-09-2007, 02:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •