Package org.bouncycastle.pqc.crypto.ntru
Class NTRUSigningPublicKeyParameters
- java.lang.Object
-
- org.bouncycastle.crypto.params.AsymmetricKeyParameter
-
- org.bouncycastle.pqc.crypto.ntru.NTRUSigningPublicKeyParameters
-
- All Implemented Interfaces:
CipherParameters
public class NTRUSigningPublicKeyParameters extends AsymmetricKeyParameter
A NtruSign public key is essentially a polynomial namedh.
-
-
Field Summary
Fields Modifier and Type Field Description IntegerPolynomialh
-
Constructor Summary
Constructors Constructor Description NTRUSigningPublicKeyParameters(byte[] b, NTRUSigningParameters params)Converts a byte array to a polynomialhand constructs a new public keyNTRUSigningPublicKeyParameters(java.io.InputStream is, NTRUSigningParameters params)Reads a polynomialhfrom an input stream and constructs a new public keyNTRUSigningPublicKeyParameters(IntegerPolynomial h, NTRUSigningParameters params)Constructs a new public key from a polynomial
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)byte[]getEncoded()Converts the key to a byte arrayinthashCode()voidwriteTo(java.io.OutputStream os)Writes the key to an output stream-
Methods inherited from class org.bouncycastle.crypto.params.AsymmetricKeyParameter
isPrivate
-
-
-
-
Field Detail
-
h
public IntegerPolynomial h
-
-
Constructor Detail
-
NTRUSigningPublicKeyParameters
public NTRUSigningPublicKeyParameters(IntegerPolynomial h, NTRUSigningParameters params)
Constructs a new public key from a polynomial- Parameters:
h- the polynomialhwhich determines the keyparams- the NtruSign parameters to use
-
NTRUSigningPublicKeyParameters
public NTRUSigningPublicKeyParameters(byte[] b, NTRUSigningParameters params)Converts a byte array to a polynomialhand constructs a new public key- Parameters:
b- an encoded polynomialparams- the NtruSign parameters to use
-
NTRUSigningPublicKeyParameters
public NTRUSigningPublicKeyParameters(java.io.InputStream is, NTRUSigningParameters params) throws java.io.IOExceptionReads a polynomialhfrom an input stream and constructs a new public key- Parameters:
is- an input streamparams- the NtruSign parameters to use- Throws:
java.io.IOException
-
-
Method Detail
-
getEncoded
public byte[] getEncoded()
Converts the key to a byte array- Returns:
- the encoded key
-
writeTo
public void writeTo(java.io.OutputStream os) throws java.io.IOExceptionWrites the key to an output stream- Parameters:
os- an output stream- Throws:
java.io.IOException
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-