/** * This function calls the functions for the random generation of the coefficients * and the matrices needed for the private key and the method for computing the public key. */ private void keygen() { generateL1(); generateL2(); generateF(); computePublicKey(); }
public AsymmetricCipherKeyPair generateKeyPair() { return genKeyPair(); } }
public void init(KeyGenerationParameters param) { this.initialize(param); }
/** * This function generates a Rainbow key pair. * * @return the generated key pair */ public AsymmetricCipherKeyPair genKeyPair() { RainbowPrivateKeyParameters privKey; RainbowPublicKeyParameters pubKey; if (!initialized) { initializeDefault(); } /* choose all coefficients at random */ keygen(); /* now marshall them to PrivateKey */ privKey = new RainbowPrivateKeyParameters(A1inv, b1, A2inv, b2, vi, layers); /* marshall to PublicKey */ pubKey = new RainbowPublicKeyParameters(vi[vi.length - 1] - vi[0], pub_quadratic, pub_singular, pub_scalar); return new AsymmetricCipherKeyPair(pubKey, privKey); }
public KeyPair generateKeyPair() { if (!initialised) { param = new RainbowKeyGenerationParameters(random, new RainbowParameters(new RainbowParameterSpec().getVi())); engine.init(param); initialised = true; } AsymmetricCipherKeyPair pair = engine.generateKeyPair(); RainbowPublicKeyParameters pub = (RainbowPublicKeyParameters)pair.getPublic(); RainbowPrivateKeyParameters priv = (RainbowPrivateKeyParameters)pair.getPrivate(); return new KeyPair(new BCRainbowPublicKey(pub), new BCRainbowPrivateKey(priv)); } }
this.pub_scalar = tmp_c_scal; compactPublicKey(coeff_quadratic_3dim);
/** * This function generates a Rainbow key pair. * * @return the generated key pair */ public AsymmetricCipherKeyPair genKeyPair() { RainbowPrivateKeyParameters privKey; RainbowPublicKeyParameters pubKey; if (!initialized) { initializeDefault(); } /* choose all coefficients at random */ keygen(); /* now marshall them to PrivateKey */ privKey = new RainbowPrivateKeyParameters(A1inv, b1, A2inv, b2, vi, layers); /* marshall to PublicKey */ pubKey = new RainbowPublicKeyParameters(vi[vi.length - 1] - vi[0], pub_quadratic, pub_singular, pub_scalar); return new AsymmetricCipherKeyPair(pubKey, privKey); }
this.pub_scalar = tmp_c_scal; compactPublicKey(coeff_quadratic_3dim);
/** * This function calls the functions for the random generation of the coefficients * and the matrices needed for the private key and the method for computing the public key. */ private void keygen() { generateL1(); generateL2(); generateF(); computePublicKey(); }
public void init(KeyGenerationParameters param) { this.initialize(param); }
public AsymmetricCipherKeyPair generateKeyPair() { return genKeyPair(); } }
private void initializeDefault() { RainbowKeyGenerationParameters rbKGParams = new RainbowKeyGenerationParameters(new SecureRandom(), new RainbowParameters()); initialize(rbKGParams); }
private void initializeDefault() { RainbowKeyGenerationParameters rbKGParams = new RainbowKeyGenerationParameters(CryptoServicesRegistrar.getSecureRandom(), new RainbowParameters()); initialize(rbKGParams); }