Class NTRUEncryptionPublicKeyParameters
java.lang.Object
org.bouncycastle.crypto.params.AsymmetricKeyParameter
org.bouncycastle.pqc.legacy.crypto.ntru.NTRUEncryptionKeyParameters
org.bouncycastle.pqc.legacy.crypto.ntru.NTRUEncryptionPublicKeyParameters
- All Implemented Interfaces:
CipherParameters
A NtruEncrypt public key is essentially a polynomial named
h.-
Field Summary
FieldsFields inherited from class org.bouncycastle.pqc.legacy.crypto.ntru.NTRUEncryptionKeyParameters
params -
Constructor Summary
ConstructorsConstructorDescriptionNTRUEncryptionPublicKeyParameters(byte[] b, NTRUEncryptionParameters params) Converts a byte array to a polynomialhand constructs a new public keyReads a polynomialhfrom an input stream and constructs a new public keyConstructs a new public key from a polynomial -
Method Summary
Modifier and TypeMethodDescriptionbooleanbyte[]Converts the key to a byte arrayinthashCode()voidwriteTo(OutputStream os) Writes the key to an output streamMethods inherited from class org.bouncycastle.pqc.legacy.crypto.ntru.NTRUEncryptionKeyParameters
getParametersMethods inherited from class org.bouncycastle.crypto.params.AsymmetricKeyParameter
isPrivate
-
Field Details
-
h
-
-
Constructor Details
-
NTRUEncryptionPublicKeyParameters
Constructs a new public key from a polynomial- Parameters:
h- the polynomialhwhich determines the keyparams- the NtruEncrypt parameters to use
-
NTRUEncryptionPublicKeyParameters
Converts a byte array to a polynomialhand constructs a new public key- Parameters:
b- an encoded polynomialparams- the NtruEncrypt parameters to use- See Also:
-
NTRUEncryptionPublicKeyParameters
public NTRUEncryptionPublicKeyParameters(InputStream is, NTRUEncryptionParameters params) throws IOException Reads a polynomialhfrom an input stream and constructs a new public key- Parameters:
is- an input streamparams- the NtruEncrypt parameters to use- Throws:
IOException- See Also:
-
-
Method Details
-
getEncoded
public byte[] getEncoded()Converts the key to a byte array- Returns:
- the encoded key
- See Also:
-
writeTo
Writes the key to an output stream- Parameters:
os- an output stream- Throws:
IOException- See Also:
-
hashCode
public int hashCode() -
equals
-