public class NTRUSigningPrivateKeyParameters extends AsymmetricKeyParameter
NTRUSigningPrivateKeyParameters.Basis
of three polynomials each,
except the zeroth basis for which h
is undefined.Modifier and Type | Class and Description |
---|---|
static class |
NTRUSigningPrivateKeyParameters.Basis
A NtruSign basis.
|
Constructor and Description |
---|
NTRUSigningPrivateKeyParameters(byte[] b,
NTRUSigningKeyGenerationParameters params)
Constructs a new private key from a byte array
|
NTRUSigningPrivateKeyParameters(java.io.InputStream is,
NTRUSigningKeyGenerationParameters params)
Constructs a new private key from an input stream
|
NTRUSigningPrivateKeyParameters(java.util.List<NTRUSigningPrivateKeyParameters.Basis> bases,
NTRUSigningPublicKeyParameters publicKey) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
NTRUSigningPrivateKeyParameters.Basis |
getBasis(int i)
Returns the
i -th basis |
byte[] |
getEncoded()
Converts the key to a byte array
|
NTRUSigningPublicKeyParameters |
getPublicKey() |
int |
hashCode() |
void |
writeTo(java.io.OutputStream os)
Writes the key to an output stream
|
isPrivate
public NTRUSigningPrivateKeyParameters(byte[] b, NTRUSigningKeyGenerationParameters params) throws java.io.IOException
b
- an encoded private keyparams
- the NtruSign parameters to usejava.io.IOException
public NTRUSigningPrivateKeyParameters(java.io.InputStream is, NTRUSigningKeyGenerationParameters params) throws java.io.IOException
is
- an input streamparams
- the NtruSign parameters to usejava.io.IOException
public NTRUSigningPrivateKeyParameters(java.util.List<NTRUSigningPrivateKeyParameters.Basis> bases, NTRUSigningPublicKeyParameters publicKey)
public NTRUSigningPrivateKeyParameters.Basis getBasis(int i)
i
-th basisi
- the indexi
public NTRUSigningPublicKeyParameters getPublicKey()
public byte[] getEncoded() throws java.io.IOException
java.io.IOException
public void writeTo(java.io.OutputStream os) throws java.io.IOException
os
- an output streamjava.io.IOException
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object