public class PaillierKey extends Object implements Key
Modifier and Type | Field and Description |
---|---|
static String |
ALGORITHM_NAME
算法名称:Paillier
|
Modifier | Constructor and Description |
---|---|
protected |
PaillierKey(BigInteger n) |
Modifier and Type | Method and Description |
---|---|
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
|
public static final String ALGORITHM_NAME
protected PaillierKey(BigInteger n)
public BigInteger getN()
public String getAlgorithm()
getAlgorithm
in interface Key
public byte[] getEncoded()
getEncoded
in interface Key
public 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
- SecureRandom
Copyright © 2025. All rights reserved.