Hi, i try to check inside the dopace function where there s a use of a key of type com.android.org.conscrypt.OpenSSLECPublicKey to try to explicitly use org.bouncycastle.jce.interfaces.ECPublicKey but i didn t find so if someone can help me on this. thanks
yes you have right...it was not private key, but PACEResult i succeed to make PACE and i take the PACEResult and i launch ps.doEACTA(cvc.getCAReference(),t , pvt, null , CAResult, paceresult); but in this function private static byte[] deriveIdentifier(PACEResult paceResult) throws NoSuchAlgorithmException { String agreementAlg = paceResult.getAgreementAlg(); PublicKey pcdPublicKey = paceResult.getPICCPublicKey(); if ("DH".equals(agreementAlg)) { / TODO: this is probably wrong, what should be hashed?...
Hi, i came back on subjet of spongycastle and android... / Generate private key. / //Security.addProvider(new BouncyCastleProvider()); Security.addProvider(new org.spongycastle.jce.provider.BouncyCastleProvider()); // Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); // Security.addProvider( new org.spongycastle.jce.provider.BouncyCastleProvider()); PKCS8EncodedKeySpec ks = new PKCS8EncodedKeySpec(bytes); KeyFactory kf = KeyFactory.getInstance("ECDSA", "SC"); PrivateKey...
i find solution like this File certFile = new File("certs/CV.cvcert"); FileInputStream fileIn = new FileInputStream(certFile); CVCertificateFactorySpi factory = new CVCertificateFactorySpi(); org.jmrtd.cert.CardVerifiableCertificate certificate = (org.jmrtd.cert.CardVerifiableCertificate) factory.engineGenerateCertificate(fileIn); File certFile2 = new File("certs/DV.cvcert"); FileInputStream fileIn2 = new FileInputStream(certFile2); CVCertificateFactorySpi factory2 = new CVCertificateFactorySpi();...