Examples of GOST3410ParameterSpec


Examples of org.bouncycastle.jce.spec.GOST3410ParameterSpec

    JDKGOST3410PublicKey(
        GOST3410PublicKeySpec    spec)
    {
        this.y = spec.getY();
        this.gost3410Spec = new GOST3410ParameterSpec(new GOST3410PublicKeyParameterSetSpec(spec.getP(), spec.getQ(), spec.getA()));
    }
View Full Code Here

Examples of org.bouncycastle.jce.spec.GOST3410ParameterSpec

        throws Exception
    {
        Signature             s = Signature.getInstance("GOST3410", "BC");
        KeyPairGenerator      g = KeyPairGenerator.getInstance("GOST3410", "BC");
        byte[]                data = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 };
        GOST3410ParameterSpec gost3410P = new GOST3410ParameterSpec(CryptoProObjectIdentifiers.gostR3410_94_CryptoPro_A.getId());

        g.initialize(gost3410P, new SecureRandom());

        KeyPair p = g.generateKeyPair();
View Full Code Here

Examples of org.bouncycastle.jce.spec.GOST3410ParameterSpec

//                if (!arrayEquals(encodeParams, encodeParams_2))
//                {
//                    fail("encode/decode parameters failed");
//                }

        GOST3410ParameterSpec gost3410P = new GOST3410ParameterSpec(CryptoProObjectIdentifiers.gostR3410_94_CryptoPro_B.getId());

        KeyPairGenerator    g = KeyPairGenerator.getInstance("GOST3410", "BC");
        g.initialize(gost3410P, new SecureRandom());
        KeyPair p = g.generateKeyPair();
View Full Code Here

Examples of org.bouncycastle.jce.spec.GOST3410ParameterSpec

        //
        PrivateKey          privKey;
        PublicKey           pubKey;

        KeyPairGenerator    g = KeyPairGenerator.getInstance("GOST3410", "BC");
        GOST3410ParameterSpec gost3410P = new GOST3410ParameterSpec("GostR3410-94-CryptoPro-A");

        g.initialize(gost3410P, new SecureRandom());

        KeyPair p = g.generateKeyPair();
View Full Code Here

Examples of org.bouncycastle.jce.spec.GOST3410ParameterSpec

    JDKGOST3410PrivateKey(
        GOST3410PrivateKeySpec    spec)
    {
        this.x = spec.getX();
        this.gost3410Spec = new GOST3410ParameterSpec(new GOST3410PublicKeyParameterSetSpec(spec.getP(), spec.getQ(), spec.getA()));
    }
View Full Code Here

Examples of org.bouncycastle.jce.spec.GOST3410ParameterSpec

            AlgorithmParameters params;
           
            try
            {
                params = AlgorithmParameters.getInstance("GOST3410", "BC");
                params.init(new GOST3410ParameterSpec(new GOST3410PublicKeyParameterSetSpec(p.getP(), p.getQ(), p.getA())));
            }
            catch (Exception e)
            {
                throw new RuntimeException(e.getMessage());
            }
View Full Code Here

Examples of org.bouncycastle.jce.spec.GOST3410ParameterSpec

            try
            {
                GOST3410PublicKeyAlgParameters gost3410P = new GOST3410PublicKeyAlgParameters((ASN1Sequence)dIn.readObject());
                GOST3410ParamSetParameters p = GOST3410NamedParameters.getByOID(gost3410P.getPublicKeyParamSet());
               
                currentSpec = new GOST3410ParameterSpec(gost3410P.getPublicKeyParamSet().getId(), gost3410P.getDigestParamSet().getId(), gost3410P.getEncryptionParamSet().getId());
            }
            catch (ClassCastException e)
            {
                throw new IOException("Not a valid GOST3410 Parameter encoding.");
            }
View Full Code Here

Examples of org.bouncycastle.jce.spec.GOST3410ParameterSpec

        //
        PrivateKey          privKey;
        PublicKey           pubKey;

        KeyPairGenerator    g = KeyPairGenerator.getInstance("GOST3410", "BC");
        GOST3410ParameterSpec gost3410P = new GOST3410ParameterSpec("GostR3410-94-CryptoPro-A");

        g.initialize(gost3410P, new SecureRandom());

        KeyPair p = g.generateKeyPair();
View Full Code Here

Examples of org.bouncycastle.jce.spec.GOST3410ParameterSpec

            try
            {
                Signature             s = Signature.getInstance("GOST3410", "BC");
                KeyPairGenerator      g = KeyPairGenerator.getInstance("GOST3410", "BC");
                byte[]                data = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 };
                GOST3410ParameterSpec gost3410P = new GOST3410ParameterSpec(CryptoProObjectIdentifiers.gostR3410_94_CryptoPro_A.getId());
               
                g.initialize(gost3410P, new SecureRandom());

                KeyPair p = g.generateKeyPair();
View Full Code Here

Examples of org.bouncycastle.jce.spec.GOST3410ParameterSpec

//                if (!arrayEquals(encodeParams, encodeParams_2))
//                {
//                    return new SimpleTestResult(false, this.getName() + ": encode/decode parameters failed");
//                }

                GOST3410ParameterSpec gost3410P = new GOST3410ParameterSpec(CryptoProObjectIdentifiers.gostR3410_94_CryptoPro_B.getId());

                KeyPairGenerator    g = KeyPairGenerator.getInstance("GOST3410", "BC");
                g.initialize(gost3410P, new SecureRandom());
                KeyPair p = g.generateKeyPair();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.