Examples of BCMcElieceCCA2PublicKey


Examples of org.bouncycastle.pqc.jcajce.provider.mceliece.BCMcElieceCCA2PublicKey

        int t = 50;
        initKPG(m, t);
        int n = 1 << m;

        KeyPair pair = kpg.genKeyPair();
        BCMcElieceCCA2PublicKey pubKey = (BCMcElieceCCA2PublicKey)pair.getPublic();
        BCMcElieceCCA2PrivateKey privKey = (BCMcElieceCCA2PrivateKey)pair
            .getPrivate();

        GF2Vector plaintext = new GF2Vector(pubKey.getK(), sr);
        GF2Vector errors = new GF2Vector(n, t, sr);

        GF2Vector ciphertext = McElieceCCA2Primitives.encryptionPrimitive(
            pubKey, plaintext, errors);
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.