Class NamedParameterSpec
- java.lang.Object
-
- javacard.security.NamedParameterSpec
-
- All Implemented Interfaces:
AlgorithmParameterSpec
public class NamedParameterSpec extends Object implements AlgorithmParameterSpec
This class is used to specify any algorithm parameters that are determined by a standard name. This class also holds constants for standard parameter set names.Example:
X25519
defines the domain parameters used for Diffie-Hellman key agreement operations using curve25519.- Since:
- 3.1
-
-
Field Summary
Fields Modifier and Type Field Description static short
BRAINPOOLP192R1
Parameters for ECDSA and ECDH key agreement operations using brainpoolP192r1 curve as defined in RFC 5639.static short
BRAINPOOLP192T1
Parameters for ECDSA and ECDH key agreement operations using brainpoolP192t1 curve as defined in RFC 5639.static short
BRAINPOOLP224R1
Parameters for ECDSA and ECDH key agreement operations using brainpoolP224r1 curve as defined in RFC 5639.static short
BRAINPOOLP224T1
Parameters for ECDSA and ECDH key agreement operations using brainpoolP224t1 curve as defined in RFC 5639.static short
BRAINPOOLP256R1
Parameters for ECDSA and ECDH key agreement operations using brainpoolP256r1 curve as defined in RFC 5639.static short
BRAINPOOLP256T1
Parameters for ECDSA and ECDH key agreement operations using brainpoolP256t1 curve as defined in RFC 5639.static short
BRAINPOOLP320R1
Parameters for ECDSA and ECDH key agreement operations using brainpoolP320r1 curve as defined in RFC 5639.static short
BRAINPOOLP320T1
Parameters for ECDSA and ECDH key agreement operations using brainpoolP320t1 curve as defined in RFC 5639.static short
BRAINPOOLP384R1
Parameters for ECDSA and ECDH key agreement operations using brainpoolP384r1 curve as defined in RFC 5639.static short
BRAINPOOLP384T1
Parameters for ECDSA and ECDH key agreement operations using brainpoolP384t1 curve as defined in RFC 5639.static short
BRAINPOOLP512R1
Parameters for ECDSA and ECDH key agreement operations using brainpoolP512r1 curve as defined in RFC 5639.static short
BRAINPOOLP512T1
Parameters for ECDSA and ECDH key agreement operations using brainpoolP512t1 curve as defined in RFC 5639.static short
ED25519
Parameters for EdDSA operations using curve25519 as defined in RFC 8032.static short
ED448
Parameters for EdDSA operations using curve448 as defined in RFC 8032static short
FRP256V1
Parameters for ECDSA and ECDH key agreement operations using FRP256v1 curve parameters as defined by ANSSIstatic short
SECP192R1
Parameters for ECDSA and ECDH key agreement operations using secp192r1 curve as defined in FIPS 186-4.static short
SECP224R1
Parameters for ECDSA and ECDH key agreement operations using secp224r1 curve as defined in FIPS 186-4.static short
SECP256R1
Parameters for ECDSA and ECDH key agreement operations using secp256r1 curve as defined in FIPS 186-4.static short
SECP384R1
Parameters for ECDSA and ECDH key agreement operations using secp384r1 curve as defined in FIPS 186-4.static short
SECP521R1
Parameters for ECDSA and ECDH key agreement operations using secp521r1 curve as defined in FIPS 186-4.static short
SM2
Parameters for signature, key exchange and encryption operations using SM2 curve as defined in GM/T 0003.5-2012.static short
X25519
Parameters for ECDH key agreement operations using curve25519 as defined in RFC 7748static short
X448
Parameters for ECDH key agreement operations using curve448 as defined in RFC 7748
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NamedParameterSpec
getInstance(short stdName)
Returns a parameter specification using a standard (or predefined) namestdName
.short
getName()
Returns the standard name that determines the algorithm parameters.
-
-
-
Field Detail
-
ED25519
public static final short ED25519
Parameters for EdDSA operations using curve25519 as defined in RFC 8032.Note:
Key
instances created with these parameters usingKeyBuilder.buildXECKey(NamedParameterSpec, short, boolean)
have the following characteristics:Key.getType()
returns theKeyBuilder.TYPE_XEC
constantKey.getSize()
returns 255- instances are implementing either
XECPublicKey
orXECPrivateKey
interface and can be used forSignature
operations - The encoding of the key used by
setEncoded()
and returned bygetEncoded()
must conform to RFC 8032 (January 2017 section 5.1.5) XECKey.getEncodingLength()
returns 32 bytes both for public and private key
- See Also:
- Constant Field Values
-
ED448
public static final short ED448
Parameters for EdDSA operations using curve448 as defined in RFC 8032Note:
Key
instances created with these parameters usingKeyBuilder.buildXECKey(NamedParameterSpec, short, boolean)
have the following characteristics:-
Key.getType()
returns theKeyBuilder.TYPE_XEC
constant -
Key.getSize()
returns 448 - instances are implementing either
XECPublicKey
orXECPrivateKey
interface and can be used forSignature
operations - The encoding of the key used by
setEncoded()
and returned bygetEncoded()
must conform to RFC 8032 (January 2017 section 5.1.5) XECKey.getEncodingLength()
returns 57 bytes both for public and private key
- See Also:
- Constant Field Values
-
-
X25519
public static final short X25519
Parameters for ECDH key agreement operations using curve25519 as defined in RFC 7748Note:
Key
instances created with these parameters usingKeyBuilder.buildXECKey(NamedParameterSpec, short, boolean)
have the following characteristics:-
Key.getType()
returns theKeyBuilder.TYPE_XEC
constant -
Key.getSize()
returns 255 - instances are implementing either
XECPublicKey
orXECPrivateKey
interface and can be used forKeyAgreement
operations - The encoding of the key used by
setEncoded()
and returned bygetEncoded()
must conform to RFC 7748 (January 2016) XECKey.getEncodingLength()
returns 32 bytes both for public and private key
- See Also:
- Constant Field Values
-
-
X448
public static final short X448
Parameters for ECDH key agreement operations using curve448 as defined in RFC 7748Note:
Key
instances created with these parameters usingKeyBuilder.buildXECKey(NamedParameterSpec, short, boolean)
have the following characteristics:-
Key.getType()
returns theKeyBuilder.TYPE_XEC
constant -
Key.getSize()
returns 448 - instances are implementing either
XECPublicKey
orXECPrivateKey
interface and can be used forKeyAgreement
operations - The encoding of the key used by
setEncoded()
and returned bygetEncoded()
must conform to RFC 7748 (January 2016) XECKey.getEncodingLength()
returns 56 bytes both for public and private key
- See Also:
- Constant Field Values
-
-
FRP256V1
public static final short FRP256V1
Parameters for ECDSA and ECDH key agreement operations using FRP256v1 curve parameters as defined by ANSSINote:
Key
instances created with these parameters usingKeyBuilder.buildXECKey(NamedParameterSpec, short, boolean)
have the following characteristics:Key.getType()
returns theKeyBuilder.TYPE_XEC
constantKey.getSize()
returns 512- instances are implementing either
XECPublicKey
orXECPrivateKey
interface and can be used forSignature
andKeyAgreement
operations - The encoding of the public key used by
setEncoded()
and returned bygetEncoded()
corresponds to the encoding of the W point. The point should be specified as an octet string as per ANSI X9.62 using the uncompressed form of the point including the leading tag 0x04. The plain text data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte). - The encoding of the private key used by
setEncoded()
and returned bygetEncoded()
is the plain value using big-endian and right-aligned (the least significant bit is the least significant bit of last byte) and may include leading zeroes to have a size matching exactly the value returned bygetEncodingLength()
. getEncodingLength()
returns 65 (length in bytes) when called on aXECPublicKey
getEncodingLength()
returns 32 (length in bytes) when called on aXECPrivateKey
- See Also:
- Constant Field Values
-
SM2
public static final short SM2
Parameters for signature, key exchange and encryption operations using SM2 curve as defined in GM/T 0003.5-2012.SM2 curve is defined as
y^2 = x^3 + A * x + B
with the following plain text data parameters encoded in big-endian and right-aligned (the least significant bit is the least significant bit of last byte) in ASCII (ANSI INCITS 4-1986) format:- Field: field=FFFFFFFE FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 00000000 FFFFFFFF FFFFFFFF
- First coefficient: A=FFFFFFFE FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 00000000 FFFFFFFF FFFFFFFC
- Second Coefficient: B=28E9FA9E 9D9F5E34 4D5A9E4B CF6509A7 F39789F5 15AB8F92 DDBCBD41 4D940E93
- Order of the fixed point G: R=FFFFFFFE FFFFFFFF FFFFFFFF FFFFFFFF 7203DF6B 21C6052B 53BBF409 39D54123
- Fixed point G x-coordinate: Gx=32C4AE2C 1F198119 5F990446 6A39C994 8FE30BBF F2660BE1 715A4589 334C74C7
- Fixed point G y-coordinate: Gy=BC3736A2 F4F6779C 59BDCEE3 6B692153 D0A9877C C62A4740 02DF32E5 2139F0A0
Note:
Key
instances created with these parameters usingKeyBuilder.buildXECKey(NamedParameterSpec, short, boolean)
have the following characteristics:Key.getType()
returns theKeyBuilder.TYPE_XEC
constantKey.getSize()
returns 256- instances are implementing either
XECPublicKey
orXECPrivateKey
interface and can be used forSignature
,KeyAgreement
andCipher
operations - The encoding of the public key used by
setEncoded()
and returned bygetEncoded()
corresponds to the encoding of the W point. The point should be specified as an octet string as per ANSI X9.62 using the uncompressed form of the point including the leading tag 0x04. The plain text data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte). - The encoding of the private key used by
setEncoded()
and returned bygetEncoded()
is the plain value using big-endian and right-aligned (the least significant bit is the least significant bit of last byte) and may include leading zeroes to have a size matching exactly the value returned bygetEncodingLength()
. getEncodingLength()
returns 65 (length in bytes) when called on aXECPublicKey
getEncodingLength()
returns 32 (length in bytes) when called on aXECPrivateKey
- See Also:
- Constant Field Values
-
SECP192R1
public static final short SECP192R1
Parameters for ECDSA and ECDH key agreement operations using secp192r1 curve as defined in FIPS 186-4.Note:
Key
instances created with these parameters usingKeyBuilder.buildXECKey(NamedParameterSpec, short, boolean)
have the following characteristics:Key.getType()
returns theKeyBuilder.TYPE_XEC
constantKey.getSize()
returns 192- instances are implementing either
XECPublicKey
orXECPrivateKey
interface and can be used forSignature
andKeyAgreement
operations - The encoding of the public key used by
setEncoded()
and returned bygetEncoded()
corresponds to the encoding of the W point. The point should be specified as an octet string as per ANSI X9.62 using the uncompressed form of the point including the leading tag 0x04. The plain text data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte). - The encoding of the private key used by
setEncoded()
and returned bygetEncoded()
is the plain value using big-endian and right-aligned (the least significant bit is the least significant bit of last byte) and may include leading zeroes to have a size matching exactly the value returned bygetEncodingLength()
. getEncodingLength()
returns 49 (length in bytes) when called on aXECPublicKey
getEncodingLength()
returns 24 (length in bytes) when called on aXECPrivateKey
- See Also:
- Constant Field Values
-
SECP224R1
public static final short SECP224R1
Parameters for ECDSA and ECDH key agreement operations using secp224r1 curve as defined in FIPS 186-4.Note:
Key
instances created with these parameters usingKeyBuilder.buildXECKey(NamedParameterSpec, short, boolean)
have the following characteristics:Key.getType()
returns theKeyBuilder.TYPE_XEC
constantKey.getSize()
returns 224- instances are implementing either
XECPublicKey
orXECPrivateKey
interface and can be used forSignature
andKeyAgreement
operations - The encoding of the public key used by
setEncoded()
and returned bygetEncoded()
corresponds to the encoding of the W point. The point should be specified as an octet string as per ANSI X9.62 using the uncompressed form of the point including the leading tag 0x04. The plain text data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte). - The encoding of the private key used by
setEncoded()
and returned bygetEncoded()
is the plain value using big-endian and right-aligned (the least significant bit is the least significant bit of last byte) and may include leading zeroes to have a size matching exactly the value returned bygetEncodingLength()
. getEncodingLength()
returns 57 (length in bytes) when called on aXECPublicKey
getEncodingLength()
returns 28 (length in bytes) when called on aXECPrivateKey
- See Also:
- Constant Field Values
-
SECP256R1
public static final short SECP256R1
Parameters for ECDSA and ECDH key agreement operations using secp256r1 curve as defined in FIPS 186-4.Note:
Key
instances created with these parameters usingKeyBuilder.buildXECKey(NamedParameterSpec, short, boolean)
have the following characteristics:Key.getType()
returns theKeyBuilder.TYPE_XEC
constantKey.getSize()
returns 256- instances are implementing either
XECPublicKey
orXECPrivateKey
interface and can be used forSignature
andKeyAgreement
operations - The encoding of the public key used by
setEncoded()
and returned bygetEncoded()
corresponds to the encoding of the W point. The point should be specified as an octet string as per ANSI X9.62 using the uncompressed form of the point including the leading tag 0x04. The plain text data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte). - The encoding of the private key used by
setEncoded()
and returned bygetEncoded()
is the plain value using big-endian and right-aligned (the least significant bit is the least significant bit of last byte) and may include leading zeroes to have a size matching exactly the value returned bygetEncodingLength()
. getEncodingLength()
returns 65 (length in bytes) when called on aXECPublicKey
getEncodingLength()
returns 32 (length in bytes) when called on aXECPrivateKey
- See Also:
- Constant Field Values
-
SECP384R1
public static final short SECP384R1
Parameters for ECDSA and ECDH key agreement operations using secp384r1 curve as defined in FIPS 186-4.Note:
Key
instances created with these parameters usingKeyBuilder.buildXECKey(NamedParameterSpec, short, boolean)
have the following characteristics:Key.getType()
returns theKeyBuilder.TYPE_XEC
constantKey.getSize()
returns 384- instances are implementing either
XECPublicKey
orXECPrivateKey
interface and can be used forSignature
andKeyAgreement
operations - The encoding of the public key used by
setEncoded()
and returned bygetEncoded()
corresponds to the encoding of the W point. The point should be specified as an octet string as per ANSI X9.62 using the uncompressed form of the point including the leading tag 0x04. The plain text data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte). - The encoding of the private key used by
setEncoded()
and returned bygetEncoded()
is the plain value using big-endian and right-aligned (the least significant bit is the least significant bit of last byte) and may include leading zeroes to have a size matching exactly the value returned bygetEncodingLength()
. getEncodingLength()
returns 97 (length in bytes) when called on aXECPublicKey
getEncodingLength()
returns 48 (length in bytes) when called on aXECPrivateKey
- See Also:
- Constant Field Values
-
SECP521R1
public static final short SECP521R1
Parameters for ECDSA and ECDH key agreement operations using secp521r1 curve as defined in FIPS 186-4.Note:
Key
instances created with these parameters usingKeyBuilder.buildXECKey(NamedParameterSpec, short, boolean)
have the following characteristics:Key.getType()
returns theKeyBuilder.TYPE_XEC
constantKey.getSize()
returns 521- instances are implementing either
XECPublicKey
orXECPrivateKey
interface and can be used forSignature
andKeyAgreement
operations - The encoding of the public key used by
setEncoded()
and returned bygetEncoded()
corresponds to the encoding of the W point. The point should be specified as an octet string as per ANSI X9.62 using the uncompressed form of the point including the leading tag 0x04. The plain text data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte). - The encoding of the private key used by
setEncoded()
and returned bygetEncoded()
is the plain value using big-endian and right-aligned (the least significant bit is the least significant bit of last byte) and may include leading zeroes to have a size matching exactly the value returned bygetEncodingLength()
. getEncodingLength()
returns 133 (length in bytes) when called on aXECPublicKey
getEncodingLength()
returns 66 (length in bytes) when called on aXECPrivateKey
- See Also:
- Constant Field Values
-
BRAINPOOLP192R1
public static final short BRAINPOOLP192R1
Parameters for ECDSA and ECDH key agreement operations using brainpoolP192r1 curve as defined in RFC 5639.Note:
Key
instances created with these parameters usingKeyBuilder.buildXECKey(NamedParameterSpec, short, boolean)
have the following characteristics:Key.getType()
returns theKeyBuilder.TYPE_XEC
constantKey.getSize()
returns 192- instances are implementing either
XECPublicKey
orXECPrivateKey
interface and can be used forSignature
andKeyAgreement
operations - The encoding of the public key used by
setEncoded()
and returned bygetEncoded()
corresponds to the encoding of the W point. The point should be specified as an octet string as per ANSI X9.62 using the uncompressed form of the point including the leading tag 0x04. The plain text data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte). - The encoding of the private key used by
setEncoded()
and returned bygetEncoded()
is the plain value using big-endian and right-aligned (the least significant bit is the least significant bit of last byte) and may include leading zeroes to have a size matching exactly the value returned bygetEncodingLength()
. getEncodingLength()
returns 49 (length in bytes) when called on aXECPublicKey
getEncodingLength()
returns 24 (length in bytes) when called on aXECPrivateKey
- See Also:
- Constant Field Values
-
BRAINPOOLP192T1
public static final short BRAINPOOLP192T1
Parameters for ECDSA and ECDH key agreement operations using brainpoolP192t1 curve as defined in RFC 5639.Note:
Key
instances created with these parameters usingKeyBuilder.buildXECKey(NamedParameterSpec, short, boolean)
have the following characteristics:Key.getType()
returns theKeyBuilder.TYPE_XEC
constantKey.getSize()
returns 192- instances are implementing either
XECPublicKey
orXECPrivateKey
interface and can be used forSignature
andKeyAgreement
operations - The encoding of the public key used by
setEncoded()
and returned bygetEncoded()
corresponds to the encoding of the W point. The point should be specified as an octet string as per ANSI X9.62 using the uncompressed form of the point including the leading tag 0x04. The plain text data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte). - The encoding of the private key used by
setEncoded()
and returned bygetEncoded()
is the plain value using big-endian and right-aligned (the least significant bit is the least significant bit of last byte) and may include leading zeroes to have a size matching exactly the value returned bygetEncodingLength()
. getEncodingLength()
returns 49 (length in bytes) when called on aXECPublicKey
getEncodingLength()
returns 24 (length in bytes) when called on aXECPrivateKey
- See Also:
- Constant Field Values
-
BRAINPOOLP224R1
public static final short BRAINPOOLP224R1
Parameters for ECDSA and ECDH key agreement operations using brainpoolP224r1 curve as defined in RFC 5639.Note:
Key
instances created with these parameters usingKeyBuilder.buildXECKey(NamedParameterSpec, short, boolean)
have the following characteristics:Key.getType()
returns theKeyBuilder.TYPE_XEC
constantKey.getSize()
returns 224- instances are implementing either
XECPublicKey
orXECPrivateKey
interface and can be used forSignature
andKeyAgreement
operations - The encoding of the public key used by
setEncoded()
and returned bygetEncoded()
corresponds to the encoding of the W point. The point should be specified as an octet string as per ANSI X9.62 using the uncompressed form of the point including the leading tag 0x04. The plain text data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte). - The encoding of the private key used by
setEncoded()
and returned bygetEncoded()
is the plain value using big-endian and right-aligned (the least significant bit is the least significant bit of last byte) and may include leading zeroes to have a size matching exactly the value returned bygetEncodingLength()
. getEncodingLength()
returns 57 (length in bytes) when called on aXECPublicKey
getEncodingLength()
returns 28 (length in bytes) when called on aXECPrivateKey
- See Also:
- Constant Field Values
-
BRAINPOOLP224T1
public static final short BRAINPOOLP224T1
Parameters for ECDSA and ECDH key agreement operations using brainpoolP224t1 curve as defined in RFC 5639.Note:
Key
instances created with these parameters usingKeyBuilder.buildXECKey(NamedParameterSpec, short, boolean)
have the following characteristics:Key.getType()
returns theKeyBuilder.TYPE_XEC
constantKey.getSize()
returns 224- instances are implementing either
XECPublicKey
orXECPrivateKey
interface and can be used forSignature
andKeyAgreement
operations - The encoding of the public key used by
setEncoded()
and returned bygetEncoded()
corresponds to the encoding of the W point. The point should be specified as an octet string as per ANSI X9.62 using the uncompressed form of the point including the leading tag 0x04. The plain text data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte). - The encoding of the private key used by
setEncoded()
and returned bygetEncoded()
is the plain value using big-endian and right-aligned (the least significant bit is the least significant bit of last byte) and may include leading zeroes to have a size matching exactly the value returned bygetEncodingLength()
. getEncodingLength()
returns 57 (length in bytes) when called on aXECPublicKey
getEncodingLength()
returns 28 (length in bytes) when called on aXECPrivateKey
- See Also:
- Constant Field Values
-
BRAINPOOLP256R1
public static final short BRAINPOOLP256R1
Parameters for ECDSA and ECDH key agreement operations using brainpoolP256r1 curve as defined in RFC 5639.Note:
Key
instances created with these parameters usingKeyBuilder.buildXECKey(NamedParameterSpec, short, boolean)
have the following characteristics:Key.getType()
returns theKeyBuilder.TYPE_XEC
constantKey.getSize()
returns 256- instances are implementing either
XECPublicKey
orXECPrivateKey
interface and can be used forSignature
andKeyAgreement
operations - The encoding of the public key used by
setEncoded()
and returned bygetEncoded()
corresponds to the encoding of the W point. The point should be specified as an octet string as per ANSI X9.62 using the uncompressed form of the point including the leading tag 0x04. The plain text data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte). - The encoding of the private key used by
setEncoded()
and returned bygetEncoded()
is the plain value using big-endian and right-aligned (the least significant bit is the least significant bit of last byte) and may include leading zeroes to have a size matching exactly the value returned bygetEncodingLength()
. getEncodingLength()
returns 65 (length in bytes) when called on aXECPublicKey
getEncodingLength()
returns 32 (length in bytes) when called on aXECPrivateKey
- See Also:
- Constant Field Values
-
BRAINPOOLP256T1
public static final short BRAINPOOLP256T1
Parameters for ECDSA and ECDH key agreement operations using brainpoolP256t1 curve as defined in RFC 5639.Note:
Key
instances created with these parameters usingKeyBuilder.buildXECKey(NamedParameterSpec, short, boolean)
have the following characteristics:Key.getType()
returns theKeyBuilder.TYPE_XEC
constantKey.getSize()
returns 256- instances are implementing either
XECPublicKey
orXECPrivateKey
interface and can be used forSignature
andKeyAgreement
operations - The encoding of the public key used by
setEncoded()
and returned bygetEncoded()
corresponds to the encoding of the W point. The point should be specified as an octet string as per ANSI X9.62 using the uncompressed form of the point including the leading tag 0x04. The plain text data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte). - The encoding of the private key used by
setEncoded()
and returned bygetEncoded()
is the plain value using big-endian and right-aligned (the least significant bit is the least significant bit of last byte) and may include leading zeroes to have a size matching exactly the value returned bygetEncodingLength()
. getEncodingLength()
returns 65 (length in bytes) when called on aXECPublicKey
getEncodingLength()
returns 32 (length in bytes) when called on aXECPrivateKey
- See Also:
- Constant Field Values
-
BRAINPOOLP320R1
public static final short BRAINPOOLP320R1
Parameters for ECDSA and ECDH key agreement operations using brainpoolP320r1 curve as defined in RFC 5639.Note:
Key
instances created with these parameters usingKeyBuilder.buildXECKey(NamedParameterSpec, short, boolean)
have the following characteristics:Key.getType()
returns theKeyBuilder.TYPE_XEC
constantKey.getSize()
returns 320- instances are implementing either
XECPublicKey
orXECPrivateKey
interface and can be used forSignature
andKeyAgreement
operations - The encoding of the public key used by
setEncoded()
and returned bygetEncoded()
corresponds to the encoding of the W point. The point should be specified as an octet string as per ANSI X9.62 using the uncompressed form of the point including the leading tag 0x04. The plain text data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte). - The encoding of the private key used by
setEncoded()
and returned bygetEncoded()
is the plain value using big-endian and right-aligned (the least significant bit is the least significant bit of last byte) and may include leading zeroes to have a size matching exactly the value returned bygetEncodingLength()
. getEncodingLength()
returns 81 (length in bytes) when called on aXECPublicKey
getEncodingLength()
returns 40 (length in bytes) when called on aXECPrivateKey
- See Also:
- Constant Field Values
-
BRAINPOOLP320T1
public static final short BRAINPOOLP320T1
Parameters for ECDSA and ECDH key agreement operations using brainpoolP320t1 curve as defined in RFC 5639.Note:
Key
instances created with these parameters usingKeyBuilder.buildXECKey(NamedParameterSpec, short, boolean)
have the following characteristics:Key.getType()
returns theKeyBuilder.TYPE_XEC
constantKey.getSize()
returns 320- instances are implementing either
XECPublicKey
orXECPrivateKey
interface and can be used forSignature
andKeyAgreement
operations - The encoding of the public key used by
setEncoded()
and returned bygetEncoded()
corresponds to the encoding of the W point. The point should be specified as an octet string as per ANSI X9.62 using the uncompressed form of the point including the leading tag 0x04. The plain text data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte). - The encoding of the private key used by
setEncoded()
and returned bygetEncoded()
is the plain value using big-endian and right-aligned (the least significant bit is the least significant bit of last byte) and may include leading zeroes to have a size matching exactly the value returned bygetEncodingLength()
. getEncodingLength()
returns 81 (length in bytes) when called on aXECPublicKey
getEncodingLength()
returns 40 (length in bytes) when called on aXECPrivateKey
- See Also:
- Constant Field Values
-
BRAINPOOLP384R1
public static final short BRAINPOOLP384R1
Parameters for ECDSA and ECDH key agreement operations using brainpoolP384r1 curve as defined in RFC 5639.Note:
Key
instances created with these parameters usingKeyBuilder.buildXECKey(NamedParameterSpec, short, boolean)
have the following characteristics:Key.getType()
returns theKeyBuilder.TYPE_XEC
constantKey.getSize()
returns 384- instances are implementing either
XECPublicKey
orXECPrivateKey
interface and can be used forSignature
andKeyAgreement
operations - The encoding of the public key used by
setEncoded()
and returned bygetEncoded()
corresponds to the encoding of the W point. The point should be specified as an octet string as per ANSI X9.62 using the uncompressed form of the point including the leading tag 0x04. The plain text data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte). - The encoding of the private key used by
setEncoded()
and returned bygetEncoded()
is the plain value using big-endian and right-aligned (the least significant bit is the least significant bit of last byte) and may include leading zeroes to have a size matching exactly the value returned bygetEncodingLength()
. getEncodingLength()
returns 97 (length in bytes) when called on aXECPublicKey
getEncodingLength()
returns 48 (length in bytes) when called on aXECPrivateKey
- See Also:
- Constant Field Values
-
BRAINPOOLP384T1
public static final short BRAINPOOLP384T1
Parameters for ECDSA and ECDH key agreement operations using brainpoolP384t1 curve as defined in RFC 5639.Note:
Key
instances created with these parameters usingKeyBuilder.buildXECKey(NamedParameterSpec, short, boolean)
have the following characteristics:Key.getType()
returns theKeyBuilder.TYPE_XEC
constantKey.getSize()
returns 384- instances are implementing either
XECPublicKey
orXECPrivateKey
interface and can be used forSignature
andKeyAgreement
operations - The encoding of the public key used by
setEncoded()
and returned bygetEncoded()
corresponds to the encoding of the W point. The point should be specified as an octet string as per ANSI X9.62 using the uncompressed form of the point including the leading tag 0x04. The plain text data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte). - The encoding of the private key used by
setEncoded()
and returned bygetEncoded()
is the plain value using big-endian and right-aligned (the least significant bit is the least significant bit of last byte) and may include leading zeroes to have a size matching exactly the value returned bygetEncodingLength()
. getEncodingLength()
returns 97 (length in bytes) when called on aXECPublicKey
getEncodingLength()
returns 48 (length in bytes) when called on aXECPrivateKey
- See Also:
- Constant Field Values
-
BRAINPOOLP512R1
public static final short BRAINPOOLP512R1
Parameters for ECDSA and ECDH key agreement operations using brainpoolP512r1 curve as defined in RFC 5639.Note:
Key
instances created with these parameters usingKeyBuilder.buildXECKey(NamedParameterSpec, short, boolean)
have the following characteristics:Key.getType()
returns theKeyBuilder.TYPE_XEC
constantKey.getSize()
returns 512- instances are implementing either
XECPublicKey
orXECPrivateKey
interface and can be used forSignature
andKeyAgreement
operations - The encoding of the public key used by
setEncoded()
and returned bygetEncoded()
corresponds to the encoding of the W point. The point should be specified as an octet string as per ANSI X9.62 using the uncompressed form of the point including the leading tag 0x04. The plain text data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte). - The encoding of the private key used by
setEncoded()
and returned bygetEncoded()
is the plain value using big-endian and right-aligned (the least significant bit is the least significant bit of last byte) and may include leading zeroes to have a size matching exactly the value returned bygetEncodingLength()
. getEncodingLength()
returns 129 (length in bytes) when called on aXECPublicKey
getEncodingLength()
returns 64 (length in bytes) when called on aXECPrivateKey
- See Also:
- Constant Field Values
-
BRAINPOOLP512T1
public static final short BRAINPOOLP512T1
Parameters for ECDSA and ECDH key agreement operations using brainpoolP512t1 curve as defined in RFC 5639.Note:
Key
instances created with these parameters usingKeyBuilder.buildXECKey(NamedParameterSpec, short, boolean)
have the following characteristics:Key.getType()
returns theKeyBuilder.TYPE_XEC
constantKey.getSize()
returns 512- instances are implementing either
XECPublicKey
orXECPrivateKey
interface and can be used forSignature
andKeyAgreement
operations - The encoding of the public key used by
setEncoded()
and returned bygetEncoded()
corresponds to the encoding of the W point. The point should be specified as an octet string as per ANSI X9.62 using the uncompressed form of the point including the leading tag 0x04. The plain text data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte). - The encoding of the private key used by
setEncoded()
and returned bygetEncoded()
is the plain value using big-endian and right-aligned (the least significant bit is the least significant bit of last byte) and may include leading zeroes to have a size matching exactly the value returned bygetEncodingLength()
. getEncodingLength()
returns 129 (length in bytes) when called on aXECPublicKey
getEncodingLength()
returns 64 (length in bytes) when called on aXECPrivateKey
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static final NamedParameterSpec getInstance(short stdName) throws CryptoException
Returns a parameter specification using a standard (or predefined) namestdName
.Instances returned by this method are permanent Java Card runtime environment Entry Point Objects and can be accessed from any application context. References to these permanent objects can be stored and re-used.
- Parameters:
stdName
- the standard name of the algorithm parameters. Use constants defined in this class.- Returns:
- the algorithm parameters for the specified name
- Throws:
CryptoException
- with the following reason codes:CryptoException.NO_SUCH_ALGORITHM
if the requested parameters are not supported.
-
getName
public final short getName()
Returns the standard name that determines the algorithm parameters.- Returns:
- the standard name.
-
-