Class NTRUSigningPrivateKeyParameters
java.lang.Object
org.bouncycastle.crypto.params.AsymmetricKeyParameter
org.bouncycastle.pqc.legacy.crypto.ntru.NTRUSigningPrivateKeyParameters
- All Implemented Interfaces:
CipherParameters
A NtruSign private key comprises one or more
NTRUSigningPrivateKeyParameters.Basis of three polynomials each,
except the zeroth basis for which h is undefined.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA NtruSign basis. -
Constructor Summary
ConstructorsConstructorDescriptionNTRUSigningPrivateKeyParameters(byte[] b, NTRUSigningKeyGenerationParameters params) Constructs a new private key from a byte arrayConstructs a new private key from an input streamNTRUSigningPrivateKeyParameters(List<NTRUSigningPrivateKeyParameters.Basis> bases, NTRUSigningPublicKeyParameters publicKey) -
Method Summary
Modifier and TypeMethodDescriptionbooleangetBasis(int i) Returns thei-th basisbyte[]Converts the key to a byte arrayinthashCode()voidwriteTo(OutputStream os) Writes the key to an output streamMethods inherited from class org.bouncycastle.crypto.params.AsymmetricKeyParameter
isPrivate
-
Constructor Details
-
NTRUSigningPrivateKeyParameters
public NTRUSigningPrivateKeyParameters(byte[] b, NTRUSigningKeyGenerationParameters params) throws IOException Constructs a new private key from a byte array- Parameters:
b- an encoded private keyparams- the NtruSign parameters to use- Throws:
IOException
-
NTRUSigningPrivateKeyParameters
public NTRUSigningPrivateKeyParameters(InputStream is, NTRUSigningKeyGenerationParameters params) throws IOException Constructs a new private key from an input stream- Parameters:
is- an input streamparams- the NtruSign parameters to use- Throws:
IOException
-
NTRUSigningPrivateKeyParameters
public NTRUSigningPrivateKeyParameters(List<NTRUSigningPrivateKeyParameters.Basis> bases, NTRUSigningPublicKeyParameters publicKey)
-
-
Method Details
-
getBasis
Returns thei-th basis- Parameters:
i- the index- Returns:
- the basis at index
i
-
getPublicKey
-
getEncoded
Converts the key to a byte array- Returns:
- the encoded key
- Throws:
IOException
-
writeTo
Writes the key to an output stream- Parameters:
os- an output stream- Throws:
IOException
-
hashCode
public int hashCode() -
equals
-