Modifier and Type | Field and Description |
---|---|
private static final int | |
private int | |
private Cipher | |
private String | |
private int | |
private byte[] | |
private String | |
private int | |
private int | |
private byte[] |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
private static void | |
private static int | |
private byte[] | Returns: the resultthe key k, byte[]... after concatenated, the data to be operated upon. This is
a series of byte[], each with an arbitrary length. Note
that the full length is not necessarily a multiple of
outlen. XOR with zero is no-op. data)Block_Encrypt in 10.3.3 |
protected void | chooseAlgorithmAndStrength()
Implements abstract sun. |
private byte[] | Returns: the output block (always of seedLen)the input string input)Block_cipher_df in 10.3.2 |
public synchronized void | generateAlgorithm(byte[]
fill result here, not null result, byte[] additional input, can be null. If not null,
its length is smaller than additionalInput)maxAdditionalInputLength Implements abstract sun. |
protected void | initEngine()
Implements abstract sun. |
protected void | instantiateAlgorithm(byte[] ei)
Implements abstract sun. |
protected synchronized void | reseedAlgorithm(byte[] ei, byte[]
additional input, can be null. If not null,
its length is smaller than additionalInput)maxAdditionalInputLength Overrides sun. |
private void | |
public String | toString()
Overrides sun. |
private void |
AES_LIMIT | back to summary |
---|---|
private static final int AES_LIMIT |
blockLen | back to summary |
---|---|
private int blockLen |
cipher | back to summary |
---|---|
private Cipher cipher |
cipherAlg | back to summary |
---|---|
private String cipherAlg |
ctrLen | back to summary |
---|---|
private int ctrLen |
k | back to summary |
---|---|
private byte[] k |
keyAlg | back to summary |
---|---|
private String keyAlg |
keyLen | back to summary |
---|---|
private int keyLen |
seedLen | back to summary |
---|---|
private int seedLen |
v | back to summary |
---|---|
private byte[] v |
CtrDrbg | back to summary |
---|---|
public CtrDrbg(SecureRandomParameters params) |
addOne | back to summary |
---|---|
private static void addOne(byte[] data, int len) Add one to data, only touch the last len bytes. |
alg2strength | back to summary |
---|---|
private static int alg2strength(String algorithm) |
bcc | back to summary |
---|---|
private byte[] bcc(byte[] k, byte[]... data) Block_Encrypt in 10.3.3
|
chooseAlgorithmAndStrength | back to summary |
---|---|
protected void chooseAlgorithmAndStrength() Implements abstract sun. Doc from sun. Decides what algorithm and strength to use (SHA-256 or AES-256,
128 or 256). Strength related fields must also be defined or redefined
here. Called in
If
If
Since every call to
Here are some examples of the algorithm and strength chosen (suppose
requested effective (SHA-224, 256) IAE (SHA-256, -1) (SHA-256,128) (SHA-256, 112) (SHA-256,112) (SHA-256, 128) (SHA-256,128) (SHA-3, -1) IAE (null, -1) (SHA-256,128) (null, 112) (SHA-256,112) (null, 192) (SHA-256,192) (null, 256) (SHA-256,256) (null, 384) IAE
|
df | back to summary |
---|---|
private byte[] df(byte[] input) Block_cipher_df in 10.3.2
|
generateAlgorithm | back to summary |
---|---|
public synchronized void generateAlgorithm(byte[] result, byte[] additionalInput) Implements abstract sun. Doc from sun. The generate function.
|
initEngine | back to summary |
---|---|
protected void initEngine() Implements abstract sun. This call, used by the constructors, instantiates the digest.
|
instantiateAlgorithm | back to summary |
---|---|
protected void instantiateAlgorithm(byte[] ei) Implements abstract sun. Doc from sun. Instantiates a DRBG. Called automatically before the first
Note that the other parameters (nonce, strength, ps) are already stored inside at configuration. |
reseedAlgorithm | back to summary |
---|---|
protected synchronized void reseedAlgorithm(byte[] ei, byte[] additionalInput) Overrides sun. Doc from sun. The reseed function.
|
status | back to summary |
---|---|
private void status() |
toString | back to summary |
---|---|
public String toString() Overrides sun. Doc from java. Returns a string representation of the object. |
update | back to summary |
---|---|
private void update(byte[] input) |