Package org.bouncycastle.crypto.params
Class ECCSIKeyGenerationParameters
java.lang.Object
org.bouncycastle.crypto.KeyGenerationParameters
org.bouncycastle.crypto.params.ECCSIKeyGenerationParameters
Parameters for ECCSI key generation.
This class encapsulates the parameters required for ECCSI (Elliptic Curve Certificateless Signatures for Identity-based encryption) key generation. It holds the elliptic curve domain parameters and computes the key pair components used in ECCSI.
The secret component ksak
is generated randomly and reduced modulo
q
, while kpak
is derived from ksak
by multiplying the
generator point.
-
Constructor Summary
ConstructorsConstructorDescriptionECCSIKeyGenerationParameters
(SecureRandom random, X9ECParameters params, Digest digest, byte[] id) Constructs an instance ofECCSIKeyGenerationParameters
with the specified source of randomness, elliptic curve parameters, digest algorithm, and identifier. -
Method Summary
Modifier and TypeMethodDescriptioncomputeSSK
(BigInteger hs_v) Computes the session secret key (SSK) by adding the provided value to the secret key component and reducing modulo the curve order.Returns the digest algorithm used for key generation.getG()
Returns the generator (base point) of the elliptic curve.byte[]
getId()
Returns a copy of the identifier used in these parameters.getKPAK()
Returns the public key component (kpak) corresponding to the secret key.int
getN()
Returns the bit length used in key generation.getQ()
Returns the order of the elliptic curve.Methods inherited from class org.bouncycastle.crypto.KeyGenerationParameters
getRandom, getStrength
-
Constructor Details
-
ECCSIKeyGenerationParameters
public ECCSIKeyGenerationParameters(SecureRandom random, X9ECParameters params, Digest digest, byte[] id) Constructs an instance ofECCSIKeyGenerationParameters
with the specified source of randomness, elliptic curve parameters, digest algorithm, and identifier.- Parameters:
random
- the source of randomness.params
- the elliptic curve parameters (in X9.62 format) providing the curve, order, and generator.digest
- the digest algorithm to be used.id
- the identifier associated with the key generation (e.g. a user or device ID).
-
-
Method Details
-
getId
public byte[] getId()Returns a copy of the identifier used in these parameters.- Returns:
- a byte array containing the identifier.
-
getKPAK
Returns the public key component (kpak) corresponding to the secret key.- Returns:
- the public key point.
-
computeSSK
Computes the session secret key (SSK) by adding the provided value to the secret key component and reducing modulo the curve order.- Parameters:
hs_v
- a BigInteger value (typically derived from a hash) to be added to the secret.- Returns:
- the computed session secret key.
-
getQ
Returns the order of the elliptic curve.- Returns:
- the curve order.
-
getG
Returns the generator (base point) of the elliptic curve.- Returns:
- the generator point.
-
getDigest
Returns the digest algorithm used for key generation.- Returns:
- the digest.
-
getN
public int getN()Returns the bit length used in key generation.- Returns:
- the bit length.
-