Example usage for org.bouncycastle.jcajce.provider.asymmetric.ec BCECPrivateKey getS

List of usage examples for org.bouncycastle.jcajce.provider.asymmetric.ec BCECPrivateKey getS

Introduction

In this page you can find the example usage for org.bouncycastle.jcajce.provider.asymmetric.ec BCECPrivateKey getS.

Prototype

public BigInteger getS() 

Source Link

Usage

From source file:edu.tamu.tcat.crypto.bouncycastle.ASN1SeqKeyImpl.java

License:Apache License

private static DERBitString getPublic(java.security.interfaces.ECPrivateKey key) throws EncodingException {
    BCECPrivateKey priv = (BCECPrivateKey) key;
    org.bouncycastle.math.ec.ECPoint g = priv.getParameters().getG();
    org.bouncycastle.math.ec.ECPoint q = g.multiply(priv.getS());
    return new DERBitString(q.getEncoded());
}