|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object | +--SmartCardHSM
Class implementing support for SmartCard-HSM access
Defined in smartcardhsm.js
| Field Summary | |
Object |
card
|
Object |
idmap
|
Object |
maxAPDU
|
Object |
namemap
|
<static> Object |
C_DevAut
|
<static> Object |
CACERTIFICATEPREFIX
|
<static> Object |
CONFIDENTIALDATAPREFIX
|
<static> Object |
devAutPuk
|
<static> Object |
EECERTIFICATEPREFIX
|
<static> Object |
KEYMETAPREFIX
|
<static> Object |
KEYPREFIX
|
<static> Object |
PIN_User
|
<static> Object |
PrK_DevAut
|
<static> Object |
PRKDPREFIX
|
<static> Object |
rootCerts
|
| Constructor Summary | |
SmartCardHSM(<Card> card)
Create a SmartCard-HSM access object |
|
| Method Summary | |
void
|
addKeyToMap(<HSMKey> key)
Add a new key to the map of keys |
void
|
changeUserPIN(<ByteString> currentPIN, <ByteString> newPIN)
Change User PIN |
Object
|
decipher(<Number> keyid, <Number> algo, <ByteString> data)
Decipher cryptogram or agree shared secret using Diffie-Hellman |
Object
|
deleteFile(<ByteString> fid)
Delete file system object (EF or key) |
Number
|
determineFreeKeyId()
Determine an unused key identifier |
String[]
|
enumerateKeys()
Enumerate key objects in the SmartCard-HSM and build the map of keys |
Object
|
enumerateObjects()
Enumerate Objects |
ByteString
|
generateAsymmetricKeyPair(<Number> newkid, <Number> signkid, <ByteString> keydata)
Generate an asymmetric key pair |
Object
|
generateRandom(<Number> length)
Generate random data |
HSMCrypto
|
getCrypto()
Get crypto object |
Key
|
getKey(label)
Get a key reference object |
Object
|
importKeyShare(<ByteString> keyshare)
Import DKEK share or query status |
void
|
initDevice(<ByteString> options, <ByteString> initialPIN, <ByteString> initializationCode, <Number> retryCounterInitial, <Number> keyshares)
Initialize device and clear all keys and files |
void
|
logout()
Logout |
ISOSecureChannel
|
openSecureChannel(<Crypto> crypto, <Key> devAuthPK)
Open a secure channel using device authentication |
Number
|
queryUserPINStatus()
Request PIN Status Information |
ByteString
|
readBinary(<ByteString> fid, <Number> offset, <Number> length)
Read transparent EF referenced by file identifier |
Object
|
sign(<Number> keyid, <algo> algo, <ByteString> data)
Sign data using referenced key |
void
|
unwrapKey(<Number> id, <ByteString> keyblob)
Unwrap key with DKEK |
void
|
updateBinary(<ByteString> fid, <Number> offset, <ByteString> data)
Update transparent EF referenced by file identifier |
Object
|
verifyUserPIN(<ByteString> userPIN)
Verify User PIN |
ByteString
|
wrapKey(<Number> id)
Wrap key under DKEK |
<static> ByteString
|
buildGAKPwithECC(<PublicKeyReference> innerCAR, <ByteString> algo, <PublicKeyReference> chr, <Key> dp, <PublicKeyReference> outerCAR, priKey)
Build input for Generate Asymmetric Key Pair command for generating an ECC key pair |
<static> ByteString
|
buildGAKPwithRSA(<PublicKeyReference> innerCAR, <ByteString> algo, <PublicKeyReference> chr, <Number> keysize, <PublicKeyReference> outerCAR)
Build input for Generate Asymmetric Key Pair command for generating a RSA key pair |
<static> ASN1
|
buildPrkDforECC(<Number> keyid, <String> label, keysize)
Create a PKCS#15 PrivateECCKey description |
<static> ASN1
|
buildPrkDforRSA(<Number> keyid, <String> label, <Number> modulussize)
Create a PKCS#15 PrivateRSAKey description |
<static> void
|
dumpKeyData(<ByteString> keydata)
Dump C-Data of Generate Asymmetric Key Pair command |
<static> ByteString
|
stripLeadingZeros(<ByteString> value)
Strips leading zeros of a ByteString |
<static> void
|
test()
|
<static> Key
|
validateCertificateChain(<Crypto> crypto, <ByteString> devAutCert)
Validate device certificate chain |
| Field Detail |
Object card
Object idmap
Object maxAPDU
Object namemap
<static> Object C_DevAut
<static> Object CACERTIFICATEPREFIX
<static> Object CONFIDENTIALDATAPREFIX
<static> Object devAutPuk
<static> Object EECERTIFICATEPREFIX
<static> Object KEYMETAPREFIX
<static> Object KEYPREFIX
<static> Object PIN_User
<static> Object PrK_DevAut
<static> Object PRKDPREFIX
<static> Object rootCerts
| Constructor Detail |
SmartCardHSM(<Card> card)
card - the card object
| Method Detail |
void addKeyToMap(<HSMKey> key)
key - the HSM key
void changeUserPIN(<ByteString> currentPIN, <ByteString> newPIN)
currentPIN - current user PIN value
newPIN - new user PIN value
Object decipher(<Number> keyid, <Number> algo, <ByteString> data)
keyid - the key identifier
algo - the algorithm identifier
data - the the cryptogram or concatenation of x || y of ECC public key
Object deleteFile(<ByteString> fid)
fid - the two byte file object identifier
Number determineFreeKeyId()
String[] enumerateKeys()
Object enumerateObjects()
ByteString generateAsymmetricKeyPair(<Number> newkid, <Number> signkid, <ByteString> keydata)
newkid - key identifier for new key
signkid - key identifier for signing the new public key
keydata - the key data template
Object generateRandom(<Number> length)
length - number of bytes
HSMCrypto getCrypto()
Key getKey(label)
path - the relative path of the PKI element (e.g. "/UTCVCA1/UTDVCA1/UTTERM")
Object importKeyShare(<ByteString> keyshare)
keyshare - 32 byte key share
void initDevice(<ByteString> options, <ByteString> initialPIN, <ByteString> initializationCode, <Number> retryCounterInitial, <Number> keyshares)
options - two byte option mask
initialPIN - initial user PIN value
initializationCode - secret code for device initialization (set during first use)
retryCounterInitial - retry counter for user PIN
keyshares - number of device key encryption key shares (optional)
void logout()
ISOSecureChannel openSecureChannel(<Crypto> crypto, <Key> devAuthPK)
crypto - the crypto provider to use
devAuthPK - the device authentication public key
Number queryUserPINStatus()
ByteString readBinary(<ByteString> fid, <Number> offset, <Number> length)
fid - the two byte file identifier
offset - the offset into the EF (optional)
length - the number of byte to read (optional)
Object sign(<Number> keyid, <algo> algo, <ByteString> data)
keyid - the key identifier for signing
algo - the algorithm identifier
data - the data to be signed
void unwrapKey(<Number> id, <ByteString> keyblob)
id - key id
keyblob - the wrapped key
void updateBinary(<ByteString> fid, <Number> offset, <ByteString> data)
fid - the two byte file identifier
offset - the offset into the EF
data - the data to write
Object verifyUserPIN(<ByteString> userPIN)
userPIN - user PIN value
ByteString wrapKey(<Number> id)
id - key id
<static> ByteString buildGAKPwithECC(<PublicKeyReference> innerCAR, <ByteString> algo, <PublicKeyReference> chr, <Key> dp, <PublicKeyReference> outerCAR, priKey)
innerCAR - the CA the request shall be directed to
algo - the public key algorithm
chr - the certificate holder reference associated with this key
dp - the domain parameter for the key
outerCAR - the certificate holder reference of the public key for verifying the outer signature
privateKey - optional parameter to supply a private key value for import. This only works with the development version of the SmartCard-HSM.
<static> ByteString buildGAKPwithRSA(<PublicKeyReference> innerCAR, <ByteString> algo, <PublicKeyReference> chr, <Number> keysize, <PublicKeyReference> outerCAR)
innerCAR - the CA the request shall be directed to
algo - the public key algorithm
chr - the certificate holder reference associated with this key
keysize - the module size in bits (1024, 1536 or 2048)
outerCAR - the certificate holder reference of the public key for verifying the outer signature
<static> ASN1 buildPrkDforECC(<Number> keyid, <String> label, keysize)
keyid - the key identifier
label - the key label
<static> ASN1 buildPrkDforRSA(<Number> keyid, <String> label, <Number> modulussize)
keyid - the key identifier
label - the key label
modulussize -
<static> void dumpKeyData(<ByteString> keydata)
keydata - the content of C-Data
<static> ByteString stripLeadingZeros(<ByteString> value)
value - the ByteString value
<static> void test()
<static> Key validateCertificateChain(<Crypto> crypto, <ByteString> devAutCert)
crypto - the crypto provider to use
devAutCert - the device certificate chain read from EF.C_DevAut
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||