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(InputStream is,
NTRUSigningKeyGenerationParameters params)
Constructs a new private key from an input stream
|
NTRUSigningPrivateKeyParameters(List<NTRUSigningPrivateKeyParameters.Basis> bases,
NTRUSigningPublicKeyParameters publicKey) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(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(OutputStream os)
Writes the key to an output stream
|
isPrivate
public NTRUSigningPrivateKeyParameters(byte[] b, NTRUSigningKeyGenerationParameters params) throws IOException
b
- an encoded private keyparams
- the NtruSign parameters to useIOException
public NTRUSigningPrivateKeyParameters(InputStream is, NTRUSigningKeyGenerationParameters params) throws IOException
is
- an input streamparams
- the NtruSign parameters to useIOException
public NTRUSigningPrivateKeyParameters(List<NTRUSigningPrivateKeyParameters.Basis> bases, NTRUSigningPublicKeyParameters publicKey)
public NTRUSigningPrivateKeyParameters.Basis getBasis(int i)
i
-th basisi
- the indexi
public NTRUSigningPublicKeyParameters getPublicKey()
public byte[] getEncoded() throws IOException
IOException
public void writeTo(OutputStream os) throws IOException
os
- an output streamIOException
Copyright © 2020 BouncyCastle.org. All rights reserved.