Example usage for org.bouncycastle.pqc.crypto.newhope NHPublicKeyParameters NHPublicKeyParameters

List of usage examples for org.bouncycastle.pqc.crypto.newhope NHPublicKeyParameters NHPublicKeyParameters

Introduction

In this page you can find the example usage for org.bouncycastle.pqc.crypto.newhope NHPublicKeyParameters NHPublicKeyParameters.

Prototype

public NHPublicKeyParameters(byte[] pubData) 

Source Link

Usage

From source file:com.distrimind.util.crypto.NewHopeKeyAgreementServer.java

License:Open Source License

public void setDataPhase1(byte[] data) {
    valid = false;//from w  ww. j  ava 2 s . co m
    byte[] sharedValue = new byte[agreementSize];
    byte[] publicKeyValue = new byte[SENDB_BYTES];

    AbstractNewHopeKeyAgreement.sharedB(randomForKeys, sharedValue, publicKeyValue, data);

    exchangePair = new ExchangePair(new NHPublicKeyParameters(publicKeyValue), sharedValue);
    shared = exchangePair.getSharedValue();
    valid = true;
}