public class PaillierKey extends Object implements Key
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
ALGORITHM_NAME
算法名称:Paillier
|
| 限定符 | 构造器和说明 |
|---|---|
protected |
PaillierKey(BigInteger n) |
| 限定符和类型 | 方法和说明 |
|---|---|
BigInteger |
generateRandomRinZn(SecureRandom random)
This method generates a random
r in Z_{n}^* for
each separate encryption using the same modulus n Paillier cryptosystem
allows the generated r to differ every time, such that the same plaintext
encrypted several times will produce different ciphertext every time. |
String |
getAlgorithm() |
byte[] |
getEncoded() |
String |
getFormat() |
BigInteger |
getN()
获取N值
|
BigInteger |
getNSquare()
获取N * N
|
protected PaillierKey(BigInteger n)
public BigInteger getN()
public String getAlgorithm()
getAlgorithm 在接口中 Keypublic byte[] getEncoded()
getEncoded 在接口中 Keypublic BigInteger getNSquare()
public BigInteger generateRandomRinZn(SecureRandom random)
r in Z_{n}^* for
each separate encryption using the same modulus n Paillier cryptosystem
allows the generated r to differ every time, such that the same plaintext
encrypted several times will produce different ciphertext every time.random - SecureRandomCopyright © 2023. All rights reserved.