Top Description Fields Constructors Methods
org.bouncycastle.pqc.legacy.crypto.ntru

public Class NTRUSignerPrng

extends Object
Class Inheritance
Imports
java.nio.ByteBuffer, org.bouncycastle.crypto.Digest

An implementation of the deterministic pseudo-random generator in EESS section 3.7.3.1

Field Summary

Modifier and TypeField and Description
private int
private Digest
private byte[]

Constructor Summary

AccessConstructor and Description
pack-priv
NTRUSignerPrng(byte[]
a seed
seed
,
Digest
the hash algorithm to use
hashAlg
)

Constructs a new PRNG and seeds it with a byte array.

Method Summary

Modifier and TypeMethod and Description
pack-priv byte[]

Returns:

the next n random bytes
nextBytes
(int
number of bytes to return
n
)

Returns n random bytes

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

counterback to summary
private int counter
hashAlgback to summary
private Digest hashAlg
seedback to summary
private byte[] seed

Constructor Detail

NTRUSignerPrngback to summary
pack-priv NTRUSignerPrng(byte[] seed, Digest hashAlg)

Constructs a new PRNG and seeds it with a byte array.

Parameters
seed:byte[]

a seed

hashAlg:Digest

the hash algorithm to use

Method Detail

nextBytesback to summary
pack-priv byte[] nextBytes(int n)

Returns n random bytes

Parameters
n:int

number of bytes to return

Returns:byte[]

the next n random bytes