Example usage for org.bouncycastle.crypto.prng VMPCRandomGenerator VMPCRandomGenerator

List of usage examples for org.bouncycastle.crypto.prng VMPCRandomGenerator VMPCRandomGenerator

Introduction

In this page you can find the example usage for org.bouncycastle.crypto.prng VMPCRandomGenerator VMPCRandomGenerator.

Prototype

public VMPCRandomGenerator() 

Source Link

Usage

From source file:common.crypto.bouncycastle.CRandomNumGenBC.java

License:Open Source License

public CRandomNumGenBC() {
    m_adaptedObject = new VMPCRandomGenerator();
}

From source file:libeac.tests.CPACECoreTest.java

License:Open Source License

public void testCalcX() throws Exception {
    m_pace.calcKPassword(m_szPw);/*w  w  w .  ja v  a  2 s.  c o m*/
    m_pace.decryptNonce(DatatypeConverter.parseHexBinary("4dd3ea7e1d014d9f6c66940d4125496b"));
    IECPoint X = m_pace.calcX();

    byte[] byaRnd = m_pace.getRand();
    VMPCRandomGenerator rndGen = new VMPCRandomGenerator();
    rndGen.nextBytes(byaRnd);
    X9ECParameters params = TeleTrusTNamedCurves.getByName("brainpoolp256r1");
    ECCurve.Fp curve = (ECCurve.Fp) params.getCurve();
    ECPoint base = params.getG();
    ECPoint.Fp Xbc = (ECPoint.Fp) base.multiply(new BigInteger(1, byaRnd));

    assertTrue(Arrays.equals(Xbc.getEncoded(), X.getEncoded()));

}

From source file:net.schmizz.sshj.transport.random.BouncyCastleRandom.java

License:Apache License

public BouncyCastleRandom() {
    random = new VMPCRandomGenerator();
    byte[] seed = new SecureRandom().generateSeed(8);
    random.addSeedMaterial(seed);
}

From source file:org.apache.sshd.common.random.BouncyCastleRandom.java

License:Apache License

public BouncyCastleRandom() {
    this.random = new VMPCRandomGenerator();
    byte[] seed = new SecureRandom().generateSeed(8);
    this.random.addSeedMaterial(seed);
}

From source file:org.apache.sshd.common.util.security.bouncycastle.BouncyCastleRandom.java

License:Apache License

public BouncyCastleRandom() {
    ValidateUtils.checkTrue(SecurityUtils.isBouncyCastleRegistered(), "BouncyCastle not registered");
    this.random = new VMPCRandomGenerator();
    byte[] seed = new SecureRandom().generateSeed(8);
    this.random.addSeedMaterial(seed);
}