@Override // CHECKSTYLE:OFF protected P11Identity generateDSAKeypair0(final BigInteger p, final BigInteger q, final BigInteger g, final String label, P11NewKeyControl control) throws P11TokenException { // CHECKSTYLE:ON DSAPrivateKey privateKey = new DSAPrivateKey(); DSAPublicKey publicKey = new DSAPublicKey(); setKeyAttributes(label, PKCS11Constants.CKK_DSA, control, publicKey, privateKey); publicKey.getPrime().setByteArrayValue(p.toByteArray()); publicKey.getSubprime().setByteArrayValue(q.toByteArray()); publicKey.getBase().setByteArrayValue(g.toByteArray()); return generateKeyPair(PKCS11Constants.CKM_DSA_KEY_PAIR_GEN, privateKey, publicKey); }
@Override // CHECKSTYLE:SKIP protected P11Identity generateDSAKeypair0(BigInteger p, BigInteger q, BigInteger g, P11NewKeyControl control) throws P11TokenException { long mech = PKCS11Constants.CKM_DSA_KEY_PAIR_GEN; assertMechanismSupported(mech); DSAPrivateKey privateKey = new DSAPrivateKey(); DSAPublicKey publicKey = new DSAPublicKey(); setKeyAttributes(control, publicKey, privateKey); publicKey.getPrime().setByteArrayValue(p.toByteArray()); publicKey.getSubprime().setByteArrayValue(q.toByteArray()); publicKey.getBase().setByteArrayValue(g.toByteArray()); return generateKeyPair(mech, control.getId(), privateKey, publicKey); }
dsaP11Key.getSubprime().getByteArrayValue()); // q BigInteger base = new BigInteger(1, dsaP11Key.getBase().getByteArrayValue()); // g BigInteger value = new BigInteger(1, dsaP11Key.getValue().getByteArrayValue()); // y
dsaP11Key.getSubprime().getByteArrayValue()); // q BigInteger base = new BigInteger(1, dsaP11Key.getBase().getByteArrayValue()); // g BigInteger value = new BigInteger(1, dsaP11Key.getValue().getByteArrayValue()); // y