public void initialize( KeyGenerationParameters param) { this.rainbowParams = (RainbowKeyGenerationParameters)param; // set source of randomness this.sr = rainbowParams.getRandom(); // unmarshalling: this.vi = this.rainbowParams.getParameters().getVi(); this.numOfLayers = this.rainbowParams.getParameters().getNumOfLayers(); this.initialized = true; }
/** * Constructor with parameters * * @param vi The elements of the array containing the number of Vinegar * variables per layer are set to the values of the input array. */ public RainbowParameters(int[] vi) { this.vi = vi; checkParams(); }
/** * 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 BCRainbowPublicKey( RainbowPublicKeyParameters params) { this(params.getDocLength(), params.getCoeffQuadratic(), params.getCoeffSingular(), params.getCoeffScalar()); }
private void initializeDefault() { RainbowKeyGenerationParameters rbKGParams = new RainbowKeyGenerationParameters(new SecureRandom(), new RainbowParameters()); initialize(rbKGParams); }
public void initialize( KeyGenerationParameters param) { this.rainbowParams = (RainbowKeyGenerationParameters)param; // set source of randomness this.sr = new SecureRandom(); // unmarshalling: this.vi = this.rainbowParams.getParameters().getVi(); this.numOfLayers = this.rainbowParams.getParameters().getNumOfLayers(); this.initialized = true; }
public void initialize( AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException { if (!(params instanceof RainbowParameterSpec)) { throw new InvalidAlgorithmParameterException("parameter object not a RainbowParameterSpec"); } RainbowParameterSpec rainbowParams = (RainbowParameterSpec)params; param = new RainbowKeyGenerationParameters(random, new RainbowParameters(rainbowParams.getVi())); engine.init(param); initialised = true; }
public AsymmetricCipherKeyPair generateKeyPair() { return genKeyPair(); } }
public void init(KeyGenerationParameters param) { this.initialize(param); }
/** * This function generates the private map F, which consists of u-1 layers. * Each layer consists of oi polynomials where oi = vi[i+1]-vi[i]. * <p> * The methods for the generation of the coefficients of these polynomials * are called here. * </p> */ private void generateF() { this.layers = new Layer[this.numOfLayers]; for (int i = 0; i < this.numOfLayers; i++) { layers[i] = new Layer(this.vi[i], this.vi[i + 1], sr); } }
public withSha256() { super(new SHA256Digest(), new RainbowSigner()); } }
/** * 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(); }
private void initializeDefault() { RainbowKeyGenerationParameters rbKGParams = new RainbowKeyGenerationParameters(CryptoServicesRegistrar.getSecureRandom(), new RainbowParameters()); initialize(rbKGParams); }
public AsymmetricCipherKeyPair generateKeyPair() { return genKeyPair(); } }
public void init(KeyGenerationParameters param) { this.initialize(param); }
/** * This function generates the private map F, which consists of u-1 layers. * Each layer consists of oi polynomials where oi = vi[i+1]-vi[i]. * <p> * The methods for the generation of the coefficients of these polynomials * are called here. * </p> */ private void generateF() { this.layers = new Layer[this.numOfLayers]; for (int i = 0; i < this.numOfLayers; i++) { layers[i] = new Layer(this.vi[i], this.vi[i + 1], sr); } }
public withSha512() { super(new SHA512Digest(), new RainbowSigner()); } }