setA(byte[] buffer,
short offset,
short length)
Sets the first coefficient of the curve of the key.

void

setB(byte[] buffer,
short offset,
short length)
Sets the second coefficient of the curve of the key.

void

setFieldF2M(short e)
Sets the field specification parameter value for keys
of type TYPE_EC_F2M_PUBLIC or TYPE_EC_F2M_PRIVATE in
the case where the polynomial is a trinomial, of the form
x^n + x^e + 1 (where n is the bit length of the key).

void

setFieldF2M(short e1,
short e2,
short e3)
Sets the field specification parameter value for keys
of type TYPE_EC_F2M_PUBLIC or TYPE_EC_F2M_PRIVATE in
the case where the polynomial is a pentanomial, of the form
x^n + x^e1 + x^e2 + x^e3 + 1 (where n is the bit length of the key).

void

setFieldFP(byte[] buffer,
short offset,
short length)
Sets the field specification parameter value for keys of type
TYPE_EC_FP_PRIVATE or TYPE_EC_FP_PUBLIC.

void

setG(byte[] buffer,
short offset,
short length)
Sets the fixed point of the curve.

void

setK(short K)
Sets the cofactor of the order of the fixed point G of the curve.

void

setR(byte[] buffer,
short offset,
short length)
Sets the order of the fixed point G of the curve.

isInitialized

Reports the initialized state of the key. Keys must be initialized before
being used.

A Key object sets its initialized state to true only when all the associated
Key object parameters have been set at least once since the time the initialized state was set to false.

A newly created Key object sets its initialized state to false. Invocation of the
clearKey() method sets the initialized state to false. A key with transient key data
sets its initialized state to false on the associated clear events.

setFieldFP

Sets the field specification parameter value for keys of type
TYPE_EC_FP_PRIVATE or TYPE_EC_FP_PUBLIC. The
specified value is the prime p corresponding to the field GF(p).
The plain text data format is big-endian and right-aligned
(the least significant bit is the least significant bit of last byte).
Input parameter data is copied into the internal representation.

Note:

If the key object implements the javacardx.crypto.KeyEncryption
interface and the Cipher object specified via setKeyCipher()
is not null, the key value is decrypted using the Cipher object.

setFieldF2M

Sets the field specification parameter value for keys
of type TYPE_EC_F2M_PUBLIC or TYPE_EC_F2M_PRIVATE in
the case where the polynomial is a trinomial, of the form
x^n + x^e + 1 (where n is the bit length of the key).
It is required that n > e > 0.

setFieldF2M

Sets the field specification parameter value for keys
of type TYPE_EC_F2M_PUBLIC or TYPE_EC_F2M_PRIVATE in
the case where the polynomial is a pentanomial, of the form
x^n + x^e1 + x^e2 + x^e3 + 1 (where n is the bit length of the key).
It is required for all ei where ei = {e1, e2, e3} that n > ei > 0.

setA

Sets the first coefficient of the curve of the key.
For keys of type TYPE_EC_FP_PRIVATE or TYPE_EC_FP_PUBLIC,
this is the value of A as an integer modulo the field specification
parameter p, that is, an integer in the range 0 to p-1.
For keys of type TYPE_EC_F2M_PRIVATE or
TYPE_EC_F2M_PUBLIC, the bit representation of this value
specifies a polynomial with binary coefficients which represents
the value of A in the field.
The plain text data format is big-endian and right-aligned
(the least significant bit is the least significant bit of last byte).
Input parameter data is copied into the internal representation.

Note:

If the key object implements the javacardx.crypto.KeyEncryption
interface and the Cipher object specified via setKeyCipher()
is not null, the key value is decrypted using the Cipher object.

setB

Sets the second coefficient of the curve of the key.
For keys of type TYPE_EC_FP_PRIVATE or TYPE_EC_FP_PUBLIC,
this is the value of B as an integer modulo the field specification
parameter p, that is, an integer in the range 0 to p-1.
For keys of type TYPE_EC_F2M_PRIVATE or
TYPE_EC_F2M_PUBLIC, the bit representation of this value
specifies a polynomial with binary coefficients which represents
the value of B in the field.
The plain text data format is big-endian and right-aligned
(the least significant bit is the least significant bit of last byte).
Input parameter data is copied into the internal representation.

Note:

If the key object implements the javacardx.crypto.KeyEncryption
interface and the Cipher object specified via setKeyCipher()
is not null, the key value is decrypted using the Cipher object.

setG

Sets the fixed point of the curve. The point should be specified as an octet string as
per ANSI X9.62. A specific implementation need not support the
compressed form, but must support the uncompressed form of the point.
The plain text data format is big-endian and right-aligned
(the least significant bit is the least significant bit of last byte).
Input parameter data is copied into the internal representation.

Note:

If the key object implements the javacardx.crypto.KeyEncryption
interface and the Cipher object specified via setKeyCipher()
is not null, the key value is decrypted using the Cipher object.

setR

Sets the order of the fixed point G of the curve.
The plain text data format is big-endian and right-aligned
(the least significant bit is the least significant bit of last byte).
Input parameter data is copied into the internal representation.

setK

Sets the cofactor of the order of the fixed point G of the curve.
The cofactor need not be specified for the key to be initialized.
However, the KeyAgreement algorithm type
ALG_EC_SVDP_DHC requires that the cofactor, K, be initialized.

getField

Returns the field specification parameter value of the key.
For keys of type TYPE_EC_FP_PRIVATE or TYPE_EC_FP_PUBLIC,
this is the value of the prime p corresponding to the field GF(p).
For keys of type TYPE_EC_F2M_PRIVATE or
TYPE_EC_F2M_PUBLIC, it is the value whose bit representation
specifies the polynomial with binary coefficients used to define the
arithmetic operations in the field GF(2^n)
The plain text data format is big-endian and right-aligned
(the least significant bit is the least significant bit of last byte).

getA

Returns the first coefficient of the curve of the key.
For keys of type TYPE_EC_FP_PRIVATE or TYPE_EC_FP_PUBLIC,
this is the value of A as an integer modulo the field specification
parameter p, that is, an integer in the range 0 to p-1.
For keys of type TYPE_EC_F2M_PRIVATE or
TYPE_EC_F2M_PUBLIC, the bit representation of this value
specifies a polynomial with binary coefficients which represents
the value of A in the field.
The plain text data format is big-endian and right-aligned
(the least significant bit is the least significant bit of last byte).

getB

Returns the second coefficient of the curve of the key.
For keys of type TYPE_EC_FP_PRIVATE or TYPE_EC_FP_PUBLIC,
this is the value of B as an integer modulo the field specification
parameter p, that is, an integer in the range 0 to p-1.
For keys of type TYPE_EC_F2M_PRIVATE or
TYPE_EC_F2M_PUBLIC, the bit representation of this value
specifies a polynomial with binary coefficients which represents
the value of B in the field.
The plain text data format is big-endian and right-aligned
(the least significant bit is the least significant bit of last byte).

getG

Returns the fixed point of the curve.
The point is represented as an octet string in compressed or
uncompressed forms as per ANSI X9.62.
The plain text data format is big-endian and right-aligned
(the least significant bit is the least significant bit of last byte).

CryptoException.UNINITIALIZED_KEY if the cofactor of the
order of the fixed point G of the curve of the key has not been
successfully initialized since the
time the initialized state of the key was set to false.