throw new MissingPrivateKeyException(); if (privKey instanceof BCECPrivateKey) { ECDSASigner signer = new ECDSASigner(new HMacDSAKCalculator(new SHA256Digest())); ECPrivateKeyParameters privKeyParams = new ECPrivateKeyParameters(((BCECPrivateKey) privKey).getD(), CURVE); signer.init(true, privKeyParams);
public BigInteger nextK() { byte[] t = new byte[((n.bitLength() + 7) / 8)]; for (;;) { int tOff = 0; while (tOff < t.length) { hMac.update(V, 0, V.length); hMac.doFinal(V, 0); int len = Math.min(t.length - tOff, V.length); System.arraycopy(V, 0, t, tOff, len); tOff += len; } BigInteger k = bitsToInt(t); if (k.compareTo(ZERO) > 0 && k.compareTo(n) < 0) { return k; } hMac.update(V, 0, V.length); hMac.update((byte)0x00); hMac.doFinal(K, 0); hMac.init(new KeyParameter(K)); hMac.update(V, 0, V.length); hMac.doFinal(V, 0); } }
BigInteger mInt = bitsToInt(message);
protected DSA createDSAImpl(short hashAlgorithm) { return new ECDSASigner(new HMacDSAKCalculator(TlsUtils.createHash(hashAlgorithm))); }
protected DSA createDSAImpl(short hashAlgorithm) { return new DSASigner(new HMacDSAKCalculator(TlsUtils.createHash(hashAlgorithm))); }
protected DSA createDSAImpl(short hashAlgorithm) { return new DSASigner(new HMacDSAKCalculator(crypto.createDigest(hashAlgorithm))); }
protected DSA createDSAImpl(short hashAlgorithm) { return new ECDSASigner(new HMacDSAKCalculator(crypto.createDigest(hashAlgorithm))); }
protected DSA createDSAImpl(short hashAlgorithm) { return new ECDSASigner(new HMacDSAKCalculator(crypto.createDigest(hashAlgorithm))); }
protected DSA createDSAImpl(short hashAlgorithm) { return new DSASigner(new HMacDSAKCalculator(crypto.createDigest(hashAlgorithm))); }
public detDSA() { super(DigestFactory.createSHA1(), new org.spongycastle.crypto.signers.DSASigner(new HMacDSAKCalculator(DigestFactory.createSHA1()))); } }
public detDSA384() { super(DigestFactory.createSHA384(), new org.spongycastle.crypto.signers.DSASigner(new HMacDSAKCalculator(DigestFactory.createSHA384()))); } }
public detDSASha3_224() { super(DigestFactory.createSHA3_224(), new org.spongycastle.crypto.signers.DSASigner(new HMacDSAKCalculator(DigestFactory.createSHA3_224()))); } }
public detDSA224() { super(DigestFactory.createSHA224(), new org.spongycastle.crypto.signers.DSASigner(new HMacDSAKCalculator(DigestFactory.createSHA224()))); } }
public detDSA256() { super(DigestFactory.createSHA256(), new org.spongycastle.crypto.signers.DSASigner(new HMacDSAKCalculator(DigestFactory.createSHA256()))); } }
public detDSA512() { super(DigestFactory.createSHA512(), new org.spongycastle.crypto.signers.DSASigner(new HMacDSAKCalculator(DigestFactory.createSHA512()))); } }
public detDSASha3_512() { super(DigestFactory.createSHA3_512(), new org.spongycastle.crypto.signers.DSASigner(new HMacDSAKCalculator(DigestFactory.createSHA3_512()))); } }
public detDSASha3_256() { super(DigestFactory.createSHA3_256(), new org.spongycastle.crypto.signers.DSASigner(new HMacDSAKCalculator(DigestFactory.createSHA3_256()))); } }
public detDSASha3_384() { super(DigestFactory.createSHA3_384(), new org.spongycastle.crypto.signers.DSASigner(new HMacDSAKCalculator(DigestFactory.createSHA3_384()))); } }
public ecDetDSASha3_384() { super(DigestFactory.createSHA3_384(), new ECDSASigner(new HMacDSAKCalculator(DigestFactory.createSHA3_384())), new StdDSAEncoder()); } }
public ecDetDSA384() { super(DigestFactory.createSHA384(), new ECDSASigner(new HMacDSAKCalculator(DigestFactory.createSHA384())), new StdDSAEncoder()); } }