| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavacard.security.KeyBuilder
public class KeyBuilder
The KeyBuilder class is a key object factory.
| Field Summary | |
|---|---|
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 = 128. | 
static short | 
LENGTH_DES3_3KEY
DES Key Length LENGTH_DES3_3KEY = 192. | 
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_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_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_DSA_PRIVATE
Key object which implements the interface type DSAPrivateKey
 for the DSA algorithm. | 
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_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_PUBLIC
Key object which implements the interface type ECPublicKey
 for EC operations over large prime fields. | 
static byte | 
TYPE_RSA_CRT_PRIVATE
Key object which implements interface type RSAPrivateCrtKey which
 uses Chinese Remainder Theorem. | 
static byte | 
TYPE_RSA_PRIVATE
Key object which implements interface type RSAPrivateKey which
 uses modulus/exponent form. | 
static byte | 
TYPE_RSA_PUBLIC
Key object which implements interface type RSAPublicKey. | 
| Constructor Summary | |
|---|---|
KeyBuilder()
 | 
|
| Method Summary | |
|---|---|
static Key | 
buildKey(byte keyType,
         short keyLength,
         boolean keyEncryption)
Creates uninitialized cryptographic keys for signature and cipher algorithms.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
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 short LENGTH_DES
LENGTH_DES = 64.
public static final short LENGTH_DES3_2KEY
LENGTH_DES3_2KEY = 128.
public static final short LENGTH_DES3_3KEY
LENGTH_DES3_3KEY = 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_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_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.
| Constructor Detail | 
|---|
public KeyBuilder()
| Method Detail | 
|---|
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.
 See 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.
 See 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.
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||