Skip to content

Commit

Permalink
more replaceKvn updates
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamVe committed Jan 20, 2025
1 parent 6e9ed5b commit 16aa0b8
Showing 1 changed file with 20 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,12 @@ public void deleteKey(KeyRef keyRef, boolean deleteLast) throws ApduException, I
*
* <p>Requires off-card entity verification.
*
* <p>If the new key is replacing an existing key with different KVN, the key being replaced can
* be specified via the replaceKvn parameter. When this value is non-zero, the existing key with
* that KVN will be deleted.
*
* @param keyRef the KID-KVN pair to assign the new key
* @param replaceKvn if 0x00, creates key with KVN from keyRef; if non-zero, replaces key with
* KVN=replaceKvn
* @param replaceKvn if non-zero replace existing key
* @return the public key from the generated key pair
*/
public PublicKeyValues.Ec generateEcKey(KeyRef keyRef, int replaceKvn)
Expand All @@ -365,10 +368,13 @@ public PublicKeyValues.Ec generateEcKey(KeyRef keyRef, int replaceKvn)
*
* <p>Requires off-card entity verification.
*
* <p>If the new key is replacing an existing key with different KVN, the key being replaced can
* be specified via the replaceKvn parameter. When this value is non-zero, the existing key with
* that KVN will be deleted.
*
* @param keyRef the KID-KVN pair to assign the new key set, KID must be 1
* @param keys the key material to import
* @param replaceKvn if 0x00, creates key with KVN from keyRef; if non-zero, replaces key with
* KVN=replaceKvn
* @param replaceKvn if non-zero replace existing key
*/
public void putKey(KeyRef keyRef, StaticKeys keys, int replaceKvn)
throws ApduException, IOException, BadResponseException {
Expand Down Expand Up @@ -412,10 +418,13 @@ public void putKey(KeyRef keyRef, StaticKeys keys, int replaceKvn)
*
* <p>Requires off-card entity verification.
*
* <p>If the new key is replacing an existing key with different KVN, the key being replaced can
* be specified via the replaceKvn parameter. When this value is non-zero, the existing key with
* that KVN will be deleted.
*
* @param keyRef the KID-KVN pair to assign the new secret key, KID must be 0x11, 0x13, or 0x15
* @param secretKey a private EC key used to authenticate the SD
* @param replaceKvn if 0x00, creates key with KVN from keyRef; if non-zero, replaces key with
* KVN=replaceKvn
* @param replaceKvn if non-zero replace existing key
*/
public void putKey(KeyRef keyRef, PrivateKeyValues secretKey, int replaceKvn)
throws ApduException, IOException, BadResponseException {
Expand Down Expand Up @@ -457,10 +466,13 @@ public void putKey(KeyRef keyRef, PrivateKeyValues secretKey, int replaceKvn)
*
* <p>Requires off-card entity verification.
*
* <p>If the new key is replacing an existing key with different KVN, the key being replaced can
* be specified via the replaceKvn parameter. When this value is non-zero, the existing key with
* that KVN will be deleted.
*
* @param keyRef the KID-KVN pair to assign the new public key
* @param publicKey a public EC key used as CA to authenticate the off-card entity
* @param replaceKvn if 0x00, creates key with KVN from keyRef; if non-zero, replaces key with
* KVN=replaceKvn
* @param replaceKvn if non-zero replace existing key
*/
public void putKey(KeyRef keyRef, PublicKeyValues publicKey, int replaceKvn)
throws ApduException, IOException, BadResponseException {
Expand Down

0 comments on commit 16aa0b8

Please sign in to comment.