public class KeyBuilder extends Object
KeyBuilder
class is a key object factory.Modifier and Type | Field and Description |
---|---|
static byte |
ALG_TYPE_AES
Algorithmic key type
ALG_TYPE_AES choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. |
static byte |
ALG_TYPE_DES
Algorithmic key type
ALG_TYPE_DES choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. |
static byte |
ALG_TYPE_DH_PARAMETERS
Algorithmic key type
ALG_TYPE_DH_PARAMETERS choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. |
static byte |
ALG_TYPE_DH_PRIVATE
Algorithmic key type
ALG_TYPE_DH_PRIVATE choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. |
static byte |
ALG_TYPE_DH_PUBLIC
Algorithmic key type
ALG_TYPE_DH_PUBLIC choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. |
static byte |
ALG_TYPE_DSA_PARAMETERS
Algorithmic key type
ALG_TYPE_DSA_PARAMETERS choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. |
static byte |
ALG_TYPE_DSA_PRIVATE
Algorithmic key type
ALG_TYPE_DSA_PRIVATE choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. |
static byte |
ALG_TYPE_DSA_PUBLIC
Algorithmic key type
ALG_TYPE_DSA_PUBLIC choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. |
static byte |
ALG_TYPE_EC_F2M_PARAMETERS
Algorithmic key type
ALG_TYPE_EC_F2M_PARAMETERS choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. |
static byte |
ALG_TYPE_EC_F2M_PRIVATE
Algorithmic key type
ALG_TYPE_EC_F2M_PRIVATE choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. |
static byte |
ALG_TYPE_EC_F2M_PUBLIC
Algorithmic key type
ALG_TYPE_EC_F2M_PUBLIC choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. |
static byte |
ALG_TYPE_EC_FP_PARAMETERS
Algorithmic key type
ALG_TYPE_EC_FP_PARAMETERS choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. |
static byte |
ALG_TYPE_EC_FP_PRIVATE
Algorithmic key type
ALG_TYPE_EC_FP_PRIVATE choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. |
static byte |
ALG_TYPE_EC_FP_PUBLIC
Algorithmic key type
ALG_TYPE_EC_FP_PUBLIC choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. |
static byte |
ALG_TYPE_HMAC
Algorithmic key type
ALG_TYPE_HMAC choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. |
static byte |
ALG_TYPE_KOREAN_SEED
Algorithmic key type
ALG_TYPE_KOREAN_SEED choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. |
static byte |
ALG_TYPE_RSA_CRT_PRIVATE
Algorithmic key type
ALG_TYPE_RSA_CRT_PRIVATE choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. |
static byte |
ALG_TYPE_RSA_PRIVATE
Algorithmic key type
ALG_TYPE_RSA_PRIVATE choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. |
static byte |
ALG_TYPE_RSA_PUBLIC
Algorithmic key type
ALG_TYPE_RSA_PUBLIC choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. |
static short |
LENGTH_AES_128
AES Key Length
LENGTH_AES_128 = 128. |
static short |
LENGTH_AES_192
AES Key Length
LENGTH_AES_192 = 192. |
static short |
LENGTH_AES_256
AES Key Length
LENGTH_AES_256 = 256. |
static short |
LENGTH_DES
DES Key Length
LENGTH_DES = 64. |
static short |
LENGTH_DES3_2KEY
DES Key Length
LENGTH_DES3_2KEY for triple DES algorithm = 128. |
static short |
LENGTH_DES3_3KEY
DES Key Length
LENGTH_DES3_3KEY for triple DES algorithm = 192. |
static short |
LENGTH_DH_1024
DH Key Length
LENGTH_DH_1024 = 1024. |
static short |
LENGTH_DH_2048
DH Key Length
LENGTH_DH_2048 = 2048. |
static short |
LENGTH_DSA_1024
DSA Key Length
LENGTH_DSA_1024 = 1024. |
static short |
LENGTH_DSA_512
DSA Key Length
LENGTH_DSA_512 = 512. |
static short |
LENGTH_DSA_768
DSA Key Length
LENGTH_DSA_768 = 768. |
static short |
LENGTH_EC_F2M_113
EC Key Length
LENGTH_EC_F2M_113 = 113. |
static short |
LENGTH_EC_F2M_131
EC Key Length
LENGTH_EC_F2M_131 = 131. |
static short |
LENGTH_EC_F2M_163
EC Key Length
LENGTH_EC_F2M_163 = 163. |
static short |
LENGTH_EC_F2M_193
EC Key Length
LENGTH_EC_F2M_193 = 193. |
static short |
LENGTH_EC_FP_112
EC Key Length
LENGTH_EC_FP_112 = 112. |
static short |
LENGTH_EC_FP_128
EC Key Length
LENGTH_EC_FP_128 = 128. |
static short |
LENGTH_EC_FP_160
EC Key Length
LENGTH_EC_FP_160 = 160. |
static short |
LENGTH_EC_FP_192
EC Key Length
LENGTH_EC_FP_192 = 192. |
static short |
LENGTH_EC_FP_224
EC Key Length
LENGTH_EC_FP_224 = 224. |
static short |
LENGTH_EC_FP_256
EC Key Length
LENGTH_EC_FP_256 = 256. |
static short |
LENGTH_EC_FP_384
EC Key Length
LENGTH_EC_FP_384 = 384. |
static short |
LENGTH_EC_FP_521
EC Key Length
LENGTH_EC_FP_521 = 521. |
static short |
LENGTH_HMAC_SHA_1_BLOCK_64
HMAC Key Length
LENGTH_HMAC_SHA_1_BLOCK_64 = 64. |
static short |
LENGTH_HMAC_SHA_256_BLOCK_64
HMAC Key Length
LENGTH_HMAC_SHA_256_BLOCK_64 = 64. |
static short |
LENGTH_HMAC_SHA_384_BLOCK_128
HMAC Key Length
LENGTH_HMAC_SHA_384_BLOCK_128 = 128. |
static short |
LENGTH_HMAC_SHA_512_BLOCK_128
HMAC Key Length
LENGTH_HMAC_SHA_512_BLOCK_128 = 128. |
static short |
LENGTH_KOREAN_SEED_128
Korean Seed Key Length
LENGTH_KOREAN_SEED_128 = 128. |
static short |
LENGTH_RSA_1024
RSA Key Length
LENGTH_RSA_1024 = 1024. |
static short |
LENGTH_RSA_1280
RSA Key Length
LENGTH_RSA_1280 = 1280. |
static short |
LENGTH_RSA_1536
RSA Key Length
LENGTH_RSA_1536 = 1536. |
static short |
LENGTH_RSA_1984
RSA Key Length
LENGTH_RSA_1984 = 1984. |
static short |
LENGTH_RSA_2048
RSA Key Length
LENGTH_RSA_2048 = 2048. |
static short |
LENGTH_RSA_3072
RSA Key Length
LENGTH_RSA_3072 = 3072. |
static short |
LENGTH_RSA_4096
RSA Key Length
LENGTH_RSA_4096 = 4096. |
static short |
LENGTH_RSA_512
RSA Key Length
LENGTH_RSA_512 = 512. |
static short |
LENGTH_RSA_736
RSA Key Length
LENGTH_RSA_736 = 736. |
static short |
LENGTH_RSA_768
RSA Key Length
LENGTH_RSA_768 = 768. |
static short |
LENGTH_RSA_896
RSA Key Length
LENGTH_RSA_896 = 896. |
static byte |
TYPE_AES
Key object which implements interface type
AESKey with persistent key data. |
static byte |
TYPE_AES_TRANSIENT_DESELECT
Key object which implements interface type
AESKey with CLEAR_ON_DESELECT transient key data. |
static byte |
TYPE_AES_TRANSIENT_RESET
Key object which implements interface type
AESKey with CLEAR_ON_RESET transient key data. |
static byte |
TYPE_DES
Key object which implements interface type
DESKey with persistent key data. |
static byte |
TYPE_DES_TRANSIENT_DESELECT
Key object which implements interface type
DESKey with CLEAR_ON_DESELECT transient key data. |
static byte |
TYPE_DES_TRANSIENT_RESET
Key object which implements interface type
DESKey with CLEAR_ON_RESET transient key data. |
static byte |
TYPE_DH_PRIVATE
Key object which implements the interface type
DHPrivateKey
for DH operations. |
static byte |
TYPE_DH_PRIVATE_TRANSIENT_DESELECT
Key object which implements the interface type
DHPrivateKey
for DH operations, . |
static byte |
TYPE_DH_PRIVATE_TRANSIENT_RESET
Key object which implements the interface type
DHPrivateKey
for DH operations. |
static byte |
TYPE_DH_PUBLIC
Key object which implements the interface type
DHPublicKey
for DH operations. |
static byte |
TYPE_DH_PUBLIC_TRANSIENT_DESELECT
Key object which implements the interface type
DHPublicKey
for DH operations, . |
static byte |
TYPE_DH_PUBLIC_TRANSIENT_RESET
Key object which implements the interface type
DHPublicKey
for DH operations. |
static byte |
TYPE_DSA_PRIVATE
Key object which implements the interface type
DSAPrivateKey for the DSA algorithm. |
static byte |
TYPE_DSA_PRIVATE_TRANSIENT_DESELECT
Key object which implements the interface type
DSAPrivateKey for the DSA algorithm, with
CLEAR_ON_DESELECT transient key data. |
static byte |
TYPE_DSA_PRIVATE_TRANSIENT_RESET
Key object which implements the interface type
DSAPrivateKey for the DSA algorithm, with CLEAR_ON_RESET
transient key data. |
static byte |
TYPE_DSA_PUBLIC
Key object which implements the interface type
DSAPublicKey for the DSA algorithm. |
static byte |
TYPE_EC_F2M_PRIVATE
Key object which implements the interface type
ECPrivateKey
for EC operations over fields of characteristic 2 with polynomial basis. |
static byte |
TYPE_EC_F2M_PRIVATE_TRANSIENT_DESELECT
Key object which implements the interface type
ECPrivateKey
for EC operations over fields of characteristic 2 with polynomial basis,
with CLEAR_ON_DESELECT transient key data. |
static byte |
TYPE_EC_F2M_PRIVATE_TRANSIENT_RESET
Key object which implements the interface type
ECPrivateKey
for EC operations over fields of characteristic 2 with polynomial basis,
with CLEAR_ON_RESET transient key data. |
static byte |
TYPE_EC_F2M_PUBLIC
Key object which implements the interface type
ECPublicKey
for EC operations over fields of characteristic 2 with polynomial basis. |
static byte |
TYPE_EC_FP_PRIVATE
Key object which implements the interface type
ECPrivateKey
for EC operations over large prime fields. |
static byte |
TYPE_EC_FP_PRIVATE_TRANSIENT_DESELECT
Key object which implements the interface type
ECPrivateKey
for EC operations over large prime fields, with CLEAR_ON_DESELECT
transient key data. |
static byte |
TYPE_EC_FP_PRIVATE_TRANSIENT_RESET
Key object which implements the interface type
ECPrivateKey
for EC operations over large prime fields, with CLEAR_ON_RESET transient
key data. |
static byte |
TYPE_EC_FP_PUBLIC
Key object which implements the interface type
ECPublicKey
for EC operations over large prime fields. |
static byte |
TYPE_HMAC
Key object which implements interface type
HMACKey with persistent key data. |
static byte |
TYPE_HMAC_TRANSIENT_DESELECT
Key object which implements interface type
HMACKey with CLEAR_ON_DESELECT transient key data. |
static byte |
TYPE_HMAC_TRANSIENT_RESET
Key object which implements interface type
HMACKey with CLEAR_ON_RESET transient key data. |
static byte |
TYPE_KOREAN_SEED
Key object which implements interface type
KoreanSEEDKey with persistent key data. |
static byte |
TYPE_KOREAN_SEED_TRANSIENT_DESELECT
Key object which implements interface type
KoreanSEEDKey with CLEAR_ON_DESELECT transient key data. |
static byte |
TYPE_KOREAN_SEED_TRANSIENT_RESET
Key object which implements interface type
KoreanSEEDKey with CLEAR_ON_RESET transient key data. |
static byte |
TYPE_RSA_CRT_PRIVATE
Key object which implements interface type
RSAPrivateCrtKey which uses Chinese Remainder Theorem. |
static byte |
TYPE_RSA_CRT_PRIVATE_TRANSIENT_DESELECT
Key object which implements interface type
RSAPrivateCrtKey which uses Chinese Remainder Theorem,
with CLEAR_ON_DESELECT transient key data. |
static byte |
TYPE_RSA_CRT_PRIVATE_TRANSIENT_RESET
Key object which implements interface type
RSAPrivateCrtKey which uses Chinese Remainder Theorem,
with CLEAR_ON_RESET transient key data. |
static byte |
TYPE_RSA_PRIVATE
Key object which implements interface type
RSAPrivateKey which uses modulus/exponent form. |
static byte |
TYPE_RSA_PRIVATE_TRANSIENT_DESELECT
Key object which implements interface type
RSAPrivateKey which uses modulus/exponent form, with
CLEAR_ON_DESELECT transient key data. |
static byte |
TYPE_RSA_PRIVATE_TRANSIENT_RESET
Key object which implements interface type
RSAPrivateKey which uses modulus/exponent form, with
CLEAR_ON_RESET transient key data. |
static byte |
TYPE_RSA_PUBLIC
Key object which implements interface type
RSAPublicKey . |
Modifier and Type | Method and Description |
---|---|
static Key |
buildKey(byte algorithmicKeyType,
byte keyMemoryType,
short keyLength,
boolean keyEncryption)
Creates uninitialized cryptographic keys for signature and cipher
algorithms.
|
static Key |
buildKey(byte keyType,
short keyLength,
boolean keyEncryption)
Creates uninitialized cryptographic keys for signature and cipher
algorithms.
|
static Key |
buildKeyWithSharedDomain(byte algorithmicKeyType,
byte keyMemoryType,
Key domainParameters,
boolean keyEncryption)
Creates cryptographic keys for signature and key agreement
algorithms.
|
public static final byte TYPE_DES_TRANSIENT_RESET
Key
object which implements interface type
DESKey
with CLEAR_ON_RESET transient key data.
This Key
object implicitly performs a
clearKey()
on power on or card reset.
public static final byte TYPE_DES_TRANSIENT_DESELECT
Key
object which implements interface type
DESKey
with CLEAR_ON_DESELECT transient key data.
This Key
object implicitly performs a
clearKey()
on power on, card reset and applet deselection.
public static final byte TYPE_DES
Key
object which implements interface type
DESKey
with persistent key data.public static final byte TYPE_RSA_PUBLIC
Key
object which implements interface type
RSAPublicKey
.public static final byte TYPE_RSA_PRIVATE
Key
object which implements interface type
RSAPrivateKey
which uses modulus/exponent form.public static final byte TYPE_RSA_CRT_PRIVATE
Key
object which implements interface type
RSAPrivateCrtKey
which uses Chinese Remainder Theorem.public static final byte TYPE_DSA_PUBLIC
Key
object which implements the interface type
DSAPublicKey
for the DSA algorithm.public static final byte TYPE_DSA_PRIVATE
Key
object which implements the interface type
DSAPrivateKey
for the DSA algorithm.public static final byte TYPE_EC_F2M_PUBLIC
ECPublicKey
for EC operations over fields of characteristic 2 with polynomial basis.public static final byte TYPE_EC_F2M_PRIVATE
ECPrivateKey
for EC operations over fields of characteristic 2 with polynomial basis.public static final byte TYPE_EC_FP_PUBLIC
ECPublicKey
for EC operations over large prime fields.public static final byte TYPE_EC_FP_PRIVATE
ECPrivateKey
for EC operations over large prime fields.public static final byte TYPE_AES_TRANSIENT_RESET
Key
object which implements interface type
AESKey
with CLEAR_ON_RESET transient key data.
This Key
object implicitly performs a
clearKey()
on power on or card reset.
public static final byte TYPE_AES_TRANSIENT_DESELECT
Key
object which implements interface type
AESKey
with CLEAR_ON_DESELECT transient key data.
This Key
object implicitly performs a
clearKey()
on power on, card reset and applet deselection.
public static final byte TYPE_AES
Key
object which implements interface type
AESKey
with persistent key data.public static final byte TYPE_KOREAN_SEED_TRANSIENT_RESET
Key
object which implements interface type
KoreanSEEDKey
with CLEAR_ON_RESET transient key data.
This Key
object implicitly performs a
clearKey()
on power on or card reset.
public static final byte TYPE_KOREAN_SEED_TRANSIENT_DESELECT
Key
object which implements interface type
KoreanSEEDKey
with CLEAR_ON_DESELECT transient key data.
This Key
object implicitly performs a
clearKey()
on power on or card reset.
public static final byte TYPE_KOREAN_SEED
Key
object which implements interface type
KoreanSEEDKey
with persistent key data.public static final byte TYPE_HMAC_TRANSIENT_RESET
Key
object which implements interface type
HMACKey
with CLEAR_ON_RESET transient key data.
This Key
object implicitly performs a
clearKey()
on power on or card reset. Note, there is no
length constant associated with HMAC, since the specification states that
the key can have any length.
public static final byte TYPE_HMAC_TRANSIENT_DESELECT
Key
object which implements interface type
HMACKey
with CLEAR_ON_DESELECT transient key data.
This Key
object implicitly performs a
clearKey()
on power on or card reset.
public static final byte TYPE_HMAC
Key
object which implements interface type
HMACKey
with persistent key data.public static final byte TYPE_RSA_PRIVATE_TRANSIENT_RESET
Key
object which implements interface type
RSAPrivateKey
which uses modulus/exponent form, with
CLEAR_ON_RESET transient key data.
This Key
object implicitly performs a
clearKey()
on power on or card reset.
public static final byte TYPE_RSA_PRIVATE_TRANSIENT_DESELECT
Key
object which implements interface type
RSAPrivateKey
which uses modulus/exponent form, with
CLEAR_ON_DESELECT transient key data.
This Key
object implicitly performs a
clearKey()
on power on or card reset.
public static final byte TYPE_RSA_CRT_PRIVATE_TRANSIENT_RESET
Key
object which implements interface type
RSAPrivateCrtKey
which uses Chinese Remainder Theorem,
with CLEAR_ON_RESET transient key data.
This Key
object implicitly performs a
clearKey()
on power on or card reset.
public static final byte TYPE_RSA_CRT_PRIVATE_TRANSIENT_DESELECT
Key
object which implements interface type
RSAPrivateCrtKey
which uses Chinese Remainder Theorem,
with CLEAR_ON_DESELECT transient key data.
This Key
object implicitly performs a
clearKey()
on power on or card reset.
public static final byte TYPE_DSA_PRIVATE_TRANSIENT_RESET
Key
object which implements the interface type
DSAPrivateKey
for the DSA algorithm, with CLEAR_ON_RESET
transient key data.
This Key
object implicitly performs a
clearKey()
on power on or card reset.
public static final byte TYPE_DSA_PRIVATE_TRANSIENT_DESELECT
Key
object which implements the interface type
DSAPrivateKey
for the DSA algorithm, with
CLEAR_ON_DESELECT transient key data.
This Key
object implicitly performs a
clearKey()
on power on or card reset.
public static final byte TYPE_EC_F2M_PRIVATE_TRANSIENT_RESET
ECPrivateKey
for EC operations over fields of characteristic 2 with polynomial basis,
with CLEAR_ON_RESET transient key data.
This Key
object implicitly performs a
clearKey()
on power on or card reset.
public static final byte TYPE_EC_F2M_PRIVATE_TRANSIENT_DESELECT
ECPrivateKey
for EC operations over fields of characteristic 2 with polynomial basis,
with CLEAR_ON_DESELECT transient key data.
This Key
object implicitly performs a
clearKey()
on power on or card reset.
public static final byte TYPE_EC_FP_PRIVATE_TRANSIENT_RESET
ECPrivateKey
for EC operations over large prime fields, with CLEAR_ON_RESET transient
key data.
This Key
object implicitly performs a
clearKey()
on power on or card reset.
public static final byte TYPE_EC_FP_PRIVATE_TRANSIENT_DESELECT
ECPrivateKey
for EC operations over large prime fields, with CLEAR_ON_DESELECT
transient key data.
This Key
object implicitly performs a
clearKey()
on power on or card reset.
public static final byte TYPE_DH_PUBLIC
DHPublicKey
for DH operations.public static final byte TYPE_DH_PUBLIC_TRANSIENT_DESELECT
DHPublicKey
for DH operations, .
This Key
object implicitly performs a
clearKey()
on applet deselection, card power on or card reset.public static final byte TYPE_DH_PUBLIC_TRANSIENT_RESET
DHPublicKey
for DH operations.
This Key
object implicitly performs a
clearKey()
public static final byte TYPE_DH_PRIVATE
DHPrivateKey
for DH operations.public static final byte TYPE_DH_PRIVATE_TRANSIENT_DESELECT
DHPrivateKey
for DH operations, .
This Key
object implicitly performs a
clearKey()
on applet deselection, card power on or card reset.public static final byte TYPE_DH_PRIVATE_TRANSIENT_RESET
DHPrivateKey
for DH operations.
This Key
object implicitly performs a
clearKey()
public static final byte ALG_TYPE_DES
ALG_TYPE_DES
choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. The key instance created implements the interface type
DESKey
.public static final byte ALG_TYPE_AES
ALG_TYPE_AES
choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. The key instance created implements the interface type
AESKey
.public static final byte ALG_TYPE_DSA_PUBLIC
ALG_TYPE_DSA_PUBLIC
choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. The key instance created implements the interface type
DSAPublicKey
.public static final byte ALG_TYPE_DSA_PRIVATE
ALG_TYPE_DSA_PRIVATE
choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. The key instance created implements the interface type
DSAPrivateKey
.public static final byte ALG_TYPE_EC_F2M_PUBLIC
ALG_TYPE_EC_F2M_PUBLIC
choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. The key instance created implements the interface type
ECPublicKey
.public static final byte ALG_TYPE_EC_F2M_PRIVATE
ALG_TYPE_EC_F2M_PRIVATE
choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. The key instance created implements the interface type
ECPrivateKey
.public static final byte ALG_TYPE_EC_FP_PUBLIC
ALG_TYPE_EC_FP_PUBLIC
choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. The key instance created implements the interface type
ECPublicKey
.public static final byte ALG_TYPE_EC_FP_PRIVATE
ALG_TYPE_EC_FP_PRIVATE
choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. The key instance created implements the interface type
ECPrivateKey
.public static final byte ALG_TYPE_HMAC
ALG_TYPE_HMAC
choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. The key instance created implements the interface type
HMACKey
.public static final byte ALG_TYPE_KOREAN_SEED
ALG_TYPE_KOREAN_SEED
choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. The key instance created implements the interface type
KoreanSEEDKey
.public static final byte ALG_TYPE_RSA_PUBLIC
ALG_TYPE_RSA_PUBLIC
choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. The key instance created implements the interface type
RSAPublicKey
.public static final byte ALG_TYPE_RSA_PRIVATE
ALG_TYPE_RSA_PRIVATE
choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. The key instance created implements the interface type
RSAPrivateKey
.public static final byte ALG_TYPE_RSA_CRT_PRIVATE
ALG_TYPE_RSA_CRT_PRIVATE
choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. The key instance created implements the interface type
RSAPrivateCrtKey
.public static final byte ALG_TYPE_DH_PUBLIC
ALG_TYPE_DH_PUBLIC
choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. The key instance created implements the interface type
DSAPublicKey
.public static final byte ALG_TYPE_DH_PRIVATE
ALG_TYPE_DH_PRIVATE
choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. The key instance created implements the interface type
DSAPrivateKey
.public static final byte ALG_TYPE_EC_F2M_PARAMETERS
ALG_TYPE_EC_F2M_PARAMETERS
choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. The key instance created implements the interface types
ECKey
and Key
.public static final byte ALG_TYPE_EC_FP_PARAMETERS
ALG_TYPE_EC_FP_PARAMETERS
choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. The key instance created implements the interface types
ECKey
and Key
.public static final byte ALG_TYPE_DSA_PARAMETERS
ALG_TYPE_DSA_PARAMETERS
choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. The key instance created implements the interface types
DSAKey
and Key
.public static final byte ALG_TYPE_DH_PARAMETERS
ALG_TYPE_DH_PARAMETERS
choice for the algorithmicKeyType
parameter of the
buildKey(byte, byte, short, boolean)
method. The key instance created implements the interface types
DHKey
and Key
.public static final short LENGTH_DES
LENGTH_DES
= 64.public static final short LENGTH_DES3_2KEY
LENGTH_DES3_2KEY
for triple DES algorithm = 128.public static final short LENGTH_DES3_3KEY
LENGTH_DES3_3KEY
for triple DES algorithm = 192.public static final short LENGTH_RSA_512
LENGTH_RSA_512
= 512.public static final short LENGTH_RSA_736
LENGTH_RSA_736
= 736.public static final short LENGTH_RSA_768
LENGTH_RSA_768
= 768.public static final short LENGTH_RSA_896
LENGTH_RSA_896
= 896.public static final short LENGTH_RSA_1024
LENGTH_RSA_1024
= 1024.public static final short LENGTH_RSA_1280
LENGTH_RSA_1280
= 1280.public static final short LENGTH_RSA_1536
LENGTH_RSA_1536
= 1536.public static final short LENGTH_RSA_1984
LENGTH_RSA_1984
= 1984.public static final short LENGTH_RSA_2048
LENGTH_RSA_2048
= 2048.public static final short LENGTH_RSA_3072
LENGTH_RSA_3072
= 3072.public static final short LENGTH_RSA_4096
LENGTH_RSA_4096
= 4096.public static final short LENGTH_DSA_512
LENGTH_DSA_512
= 512.public static final short LENGTH_DSA_768
LENGTH_DSA_768
= 768.public static final short LENGTH_DSA_1024
LENGTH_DSA_1024
= 1024.public static final short LENGTH_EC_FP_112
LENGTH_EC_FP_112
= 112.public static final short LENGTH_EC_F2M_113
LENGTH_EC_F2M_113
= 113.public static final short LENGTH_EC_FP_128
LENGTH_EC_FP_128
= 128.public static final short LENGTH_EC_F2M_131
LENGTH_EC_F2M_131
= 131.public static final short LENGTH_EC_FP_160
LENGTH_EC_FP_160
= 160.public static final short LENGTH_EC_F2M_163
LENGTH_EC_F2M_163
= 163.public static final short LENGTH_EC_FP_192
LENGTH_EC_FP_192
= 192.public static final short LENGTH_EC_F2M_193
LENGTH_EC_F2M_193
= 193.public static final short LENGTH_EC_FP_224
LENGTH_EC_FP_224
= 224.public static final short LENGTH_EC_FP_256
LENGTH_EC_FP_256
= 256.public static final short LENGTH_EC_FP_384
LENGTH_EC_FP_384
= 384.public static final short LENGTH_EC_FP_521
LENGTH_EC_FP_521
= 521.public static final short LENGTH_AES_128
LENGTH_AES_128
= 128.public static final short LENGTH_AES_192
LENGTH_AES_192
= 192.public static final short LENGTH_AES_256
LENGTH_AES_256
= 256.public static final short LENGTH_KOREAN_SEED_128
LENGTH_KOREAN_SEED_128
= 128.public static final short LENGTH_HMAC_SHA_1_BLOCK_64
LENGTH_HMAC_SHA_1_BLOCK_64
= 64.public static final short LENGTH_HMAC_SHA_256_BLOCK_64
LENGTH_HMAC_SHA_256_BLOCK_64
= 64.public static final short LENGTH_HMAC_SHA_384_BLOCK_128
LENGTH_HMAC_SHA_384_BLOCK_128
= 128.public static final short LENGTH_HMAC_SHA_512_BLOCK_128
LENGTH_HMAC_SHA_512_BLOCK_128
= 128.public static final short LENGTH_DH_1024
LENGTH_DH_1024
= 1024.public static final short LENGTH_DH_2048
LENGTH_DH_2048
= 2048.public static Key buildKey(byte keyType, short keyLength, boolean keyEncryption) throws CryptoException
Signature
,
Cipher
and KeyPair
. Note that the object
returned must be cast to their appropriate key type interface.keyType
- the type of key to be generated. Valid codes listed in
TYPE_*
constants, for example
TYPE_DES_TRANSIENT_RESET
.keyLength
- the key size in bits. The valid key bit lengths are key type
dependent. Some common key lengths are listed above above in
the LENGTH_*
constants, for example
LENGTH_DES
.keyEncryption
- if true
this boolean requests a key
implementation which implements the
javacardx.crypto.KeyEncryption
interface. The
key implementation returned may implement the
javacardx.crypto.KeyEncryption
interface even
when this parameter is false
.CryptoException
- with the following reason codes:
CryptoException.NO_SUCH_ALGORITHM
if
the requested algorithm associated with the specified
type, size of key and key encryption interface is not
supported.
buildKey(byte, byte, short, boolean)
public static Key buildKey(byte algorithmicKeyType, byte keyMemoryType, short keyLength, boolean keyEncryption) throws CryptoException
Signature
,
Cipher
and KeyPair
. Note that the object
returned must be cast to their appropriate key type interface.algorithmicKeyType
- the type of key and algorithm to be generated. Valid codes listed in
ALG_TYPE_*
constants, for example
ALG_TYPE_DES
.keyMemoryType
- the type of memory for key data storage. Valid codes listed in
JCSystem.MEMORY_TYPE_*
constants, for example
MEMORY_TYPE_PERSISTENT
.keyLength
- the key size in bits. The valid key bit lengths are key type
dependent. Some common key lengths are listed above above in
the LENGTH_*
constants, for example
LENGTH_DES
.keyEncryption
- if true
this boolean requests a key
implementation which implements the
javacardx.crypto.KeyEncryption
interface. The
key implementation returned may implement the
javacardx.crypto.KeyEncryption
interface even
when this parameter is false
.CryptoException
- with the following reason codes:
CryptoException.NO_SUCH_ALGORITHM
if
the requested algorithm associated with the specified
algorithmic type, or memory storage type for key, or
size of key or key encryption interface requested is not
supported.
buildKey(byte, short, boolean)
public static Key buildKeyWithSharedDomain(byte algorithmicKeyType, byte keyMemoryType, Key domainParameters, boolean keyEncryption) throws CryptoException
Signature
,
KeyAgreement
and KeyPair
. Note that the object
returned must be cast to their appropriate key type interface.
The domain parameters object in the domainParameters
argument is shared
with other keys created using the same parameter argument.
This means that any changes to the shared parameters - by calling one of the
setter methods - will be reflected within the other keys sharing these
parameters.
The domainParameters argument must be a special parameters object. Parameter objects
can be created created using key algorithm types which are suffixed with _PARAMETERS using the
buildKey(byte, byte, short, boolean)
method.
The key value, such as the secret S or the public point W for an EC Key, or X or Y for DH
and DSA Key will never be shared.
The key size is determined by information contained in the domainParameters
argument.
algorithmicKeyType
- the type of key and algorithm to be generated. Valid codes listed in
ALG_TYPE_*
constants, for example
ALG_TYPE_EC_F2M_PUBLIC
.keyMemoryType
- the type of memory for key data storage. Valid codes listed in
JCSystem.MEMORY_TYPE_*
constants, for example
MEMORY_TYPE_PERSISTENT
.domainParameters
- a special parameters object containing domain parameters.
Parameter objects can be created created using key types
which are suffixed with _PARAMETERSkeyEncryption
- if true
this boolean requests a key
implementation which implements the
javacardx.crypto.KeyEncryption
interface. The
key implementation returned may implement the
javacardx.crypto.KeyEncryption
interface even
when this parameter is false
.CryptoException
- with the following reason codes:
CryptoException.NO_SUCH_ALGORITHM
if
the requested algorithm associated with the specified
type, size of key and key encryption interface is not
supported.Copyright © 1998, 2015, Oracle and/or its affiliates. All rights reserved.