new ElGamalZKPoKWriteIn(standard, pGroup, hashfunction, randomSource, statDist)
Generalized Naor-Yung cryptosystem, i.e., a
generalized El Gamal with zero-knowledge proof of knowledge of the
plaintext without any restrictions on the plaintext.
Parameters:
Name | Type | Description |
---|---|---|
standard |
Determines if the standard or variant El Gamal cryptosystem is used. | |
pGroup |
Group G over which the cryptosystem is defined. | |
hashfunction |
Hash function used to implement the Fiat-Shamir heuristic in ZKPoKs. | |
randomSource |
Source of randomness. | |
statDist |
Statistical distance from the uniform distribution assuming that the output of the instance of the random source is perfect. |
- Source:
Methods
(static) benchEncrypt(standard, pGroups, hashfunction, maxWidth, minSamples, randomSource, statDist)
Estimates the running time of encryption in
milliseconds for various groups and widths.
Parameters:
Name | Type | Description |
---|---|---|
standard |
Indicates if the standard or variant scheme is used. | |
pGroups |
Groups over which the cryptosystem is defined. | |
hashfunction |
Hash function used for Fiat-Shamir heuristic. | |
maxWidth |
Maximal width of plaintexts. | |
minSamples |
Minimum number of executions performed. | |
randomSource |
Source of randomness. | |
statDist |
Statistical distance from the uniform distribution assuming that the output of the instance of the random source is perfect. |
- Source:
Returns:
Array or arrays of estimated running time of encryption in
milliseconds.
(static) benchEncryptPGroup(standard, pGroup, hashfunction, maxWidth, minSamples, randomSource, statDist)
Estimates the running time of encryption in
milliseconds for various widths.
Parameters:
Name | Type | Description |
---|---|---|
standard |
Indicates if the standard or variant scheme is used. | |
pGroup |
Group over which the cryptosystem is defined. | |
hashfunction |
Hash function used for Fiat-Shamir heuristic. | |
maxWidth |
Maximal width of plaintexts. | |
minSamples |
Minimum number of executions performed. | |
randomSource |
Source of randomness. | |
statDist |
Statistical distance from the uniform distribution assuming that the output of the instance of the random source is perfect. |
- Source:
Returns:
Array of estimated running times of encryption in
milliseconds.
(static) benchEncryptPGroupWidth(standard, pGroup, hashfunction, width, minSamples, randomSource, statDist)
Estimates the running time of encryption in
milliseconds.
Parameters:
Name | Type | Description |
---|---|---|
standard |
Indicates if the standard or variant scheme is used. | |
pGroup |
Group over which the cryptosystem is defined. | |
hashfunction |
Hash function used for Fiat-Shamir heuristic. | |
width |
Width of plaintexts. | |
minSamples |
Minimum number of executions performed. | |
randomSource |
Source of randomness. | |
statDist |
Statistical distance from the uniform distribution assuming that the output of the instance of the random source is perfect. |
- Source:
Returns:
Estimated running time of encryption in milliseconds.