ElGamal implementation
- Source:
Requires
- module:bn.js
- module:crypto/random
Methods
(async, static) decrypt(c1, c2, p, x)
ElGamal Encryption function
Parameters:
Name | Type | Description |
---|---|---|
c1 |
BN | |
c2 |
BN | |
p |
BN | |
x |
BN |
- Source:
Returns:
BN
(async, static) encrypt(m, p, g, y) → {Object}
ElGamal Encryption function
Parameters:
Name | Type | Description |
---|---|---|
m |
BN | |
p |
BN | |
g |
BN | |
y |
BN |
- Source:
Returns:
- Type
- Object