public final class ECKeyPairGenerator extends KeyPairGenerator
References:
[1] FIPS PUB 186-4 FEDERAL INFORMATION PROCESSING STANDARDS PUBLICATION Digital Signature Standard (DSS),Patrick Gallagher and Deputy Director Foreword and Cita Furlani Director, 2013
[2] Elaine Barker, William Barker, William Burr, William Polk, and Miles Smid, Recommendation for Key Management - Part 1: General, NIST special publication (SP 800-57); http://csrc.nist.gov/publications/nistpubs /800-57/sp800-57-Part1-revised2_Mar08-2007.pdf.
[3] ANSI X9.62-2005, "American National Standard for Financial Services - The Elliptic Curve Digital Signature Algorithm (ECDSA)" , ASC X9, November 2005.
ECKey
,
ECPublicKey
,
ECPublicKeySpec
,
ECPrivateKey
,
ECPrivateKeySpec
Constructor and Description |
---|
ECKeyPairGenerator()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
KeyPair |
generateKeyPair() |
void |
initialize(AlgorithmParameterSpec params)
Initializes the key pair generator with the given curve domain parameters.
|
void |
initialize(AlgorithmParameterSpec params,
SecureRandom random)
Initializes the key pair generator with the given curve domain parameters
and the specified
SecureRandom . |
void |
initialize(int keySize)
Initializes the key pair generator with curve domain parameters matching
the given key size.
|
void |
initialize(int keySize,
SecureRandom random)
Initializes the key pair generator with curve domain parameters matching
the given key size and the specified
SecureRandom . |
genKeyPair, getAlgorithm, getInstance, getInstance, getInstance, getProvider
public void initialize(int keySize)
initialize
in class KeyPairGenerator
keySize
- the size of the curve domain parameterspublic void initialize(int keySize, SecureRandom random)
SecureRandom
. Note that
[1] requires the SecureRandom
object to be a NIST SP800-90
PRNG. If the user specifies another type of PRNG, an exception will be
thrown.initialize
in class KeyPairGenerator
keySize
- the size of the curve domain parametersrandom
- the NIST SP800-90 PRNG; if null
an appropriate NIST
SP800-90 PRNG will be selected automaticallypublic void initialize(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException
SecureRandom
. Note that [1] requires the
SecureRandom
object to be a NIST SP800-90 PRNG. If the user
specifies another type of PRNG, an exception will be thrown.initialize
in class KeyPairGenerator
params
- the curve domain parametersrandom
- the NIST SP800-90 PRNG; if null
an appropriate NIST
SP800-90 PRNG will be selected automaticallyInvalidAlgorithmParameterException
public void initialize(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException
initialize
in class KeyPairGenerator
params
- the curve domain parametersInvalidAlgorithmParameterException
public KeyPair generateKeyPair()
generateKeyPair
in class KeyPairGenerator
Copyright © 2011–2022 Stiftung SIC. All rights reserved.