keystore - Genarate ECPublicKey in java -
hi new java ecc encryption.so got ecc public key data array java card.the size 49 byte length.so need genarate eccpublic key.so have created public key.but gives java.security.spec.invalidkeyspecexception: encoded key spec not recognised error.this code can me how generate eccpublickey using data array.thanks byte[] pub = new byte[] { /*(public data) 49 length byte array */ }; system.out.println("length :" + pub.length); x509encodedkeyspec ks = new x509encodedkeyspec(pub); keyfactory kf; try { kf = keyfactory.getinstance("ecdh"); } catch (nosuchalgorithmexception e) { e.printstacktrace(); return; } ecpublickey remotepublickey; try { remotepublickey = (ecpublickey) kf.generatepublic(ks); } catch (invalidkeyspecexception e) { e.print...