From 07436dcd1d7c952f2494f09e7a89ee71de2a2d54 Mon Sep 17 00:00:00 2001 From: Parnika Cypherock <39666569+VeronicaGupta@users.noreply.github.com> Date: Sat, 29 Jun 2024 18:48:00 +0530 Subject: [PATCH] chore: Add format corrections --- docs/nfc_card_operations.md | 124 ++++++++++++++++++++++++++++-------- 1 file changed, 99 insertions(+), 25 deletions(-) diff --git a/docs/nfc_card_operations.md b/docs/nfc_card_operations.md index c81f2d1ab..f62d2b274 100644 --- a/docs/nfc_card_operations.md +++ b/docs/nfc_card_operations.md @@ -183,6 +183,7 @@ This card operation pairs X1 Vault with an X1 card. A public-private key pair is
+
Table 4: Generate Key-Pair Response APDU

TAG

@@ -222,7 +223,7 @@ This card operation retrieves the wallet data from the card, and shares the retr ### RETRIVE WALLET APDU Command-Response - +
Table 4: Retrieve wallet Command APDUTable 5: Retrieve wallet Command APDU

TAG

@@ -303,7 +304,7 @@ This card operation retrieves the wallet data from the card, and shares the retr - +
Table 5: Retrieve wallet Response APDUTable 6: Retrieve wallet Response APDU

Tag

@@ -406,7 +407,7 @@ This card operation retrieves the wallet data from the card, and shares the retr

- +
Retrieve wallet SW
Table 7: Retrieve wallet Status Word

SW

@@ -468,11 +469,11 @@ This card operation retrieves the wallet data from the card, and shares the retr ## 5. Write Card Shares -This card operation writes the wallet share to an X1 card. For checking if space is available to store new wallet, if it is available then applet will store information mentioned in the data part of the request apdu. Applet will ensure there is no wallet name conflict. +This card operation writes the wallet share to an X1 card. Checks if space is available to store new wallet, if it is available then applet will store information mentioned in the data part of the request apdu. Also, ensures there is no wallet name conflict. ### ADD WALLET APDU Command-Response - +
Add walletTable 8: Add wallet Command APDU

TAG

@@ -673,7 +674,7 @@ This card operation writes the wallet share to an X1 card. For checking if space
- +
Table 6: Add Wallet SWTable 9: Add Wallet Status Word

SW

@@ -738,7 +739,7 @@ This card operation deletes wallet share data from an X1 card and updates wallet ### DELETE WALLET APDU Command-Response - +
Table 7: Delete wallet Command APDUTable 10: Delete wallet Command APDU

TAG

@@ -819,7 +820,7 @@ This card operation deletes wallet share data from an X1 card and updates wallet
- +
Table 8: Delete wallet SWTable 11: Delete wallet Status Word

SW

@@ -883,12 +884,12 @@ This card operation deletes wallet share data from an X1 card and updates wallet This card operation extracts the wallet list from an X1 card. To retrieve all wallet names send the below mentioned APDU, the card will send names of wallet stored in that card. No verification by password is required. -### LIST ALL WALLET NAMES APDU Command-Response +### LIST WALLET NAMES APDU Command-Response Note : The first byte will return the number of wallets. - +
Table 9: List Wallet Name Command APDUTable 12: List Wallet Name Command APDU

TAG

@@ -939,13 +940,87 @@ Note : The first byte will return the number of wallets.
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 13: List Wallet Name Response APDU
+

Tag

+
+

Length

+
+

Value

+
+

Wallet Info (0xE8)

+
+

Skip

+
+

To be Added

+
+

Is Stored Data Arbitary (0xA1)

+
+

Skip

+
+

0x01 if Arbitary Data, Set else 0x00 by Default

+
+

Is Wallet Locked (0xD4)

+
+

Skip

+
+

0x01 if Wallet Locked else 0x00

+
+

Wallet Name (0xE0)

+
+

‘16’

+
+

Name of Wallet

+
+

Wallet ID (0xEC)

+
+

‘32’

+
+

Hash of master public key (at m/1000'/0'/3'/1)

+
+ + ## 9. Fetch Challenge This card operation fetches wallet challenge data from an X1 card. When the card gets locked due to incorrect pin tries, this operation is used to get the challenge which is to be solved and unlock the card. The challenge corresponding to the wallet name provided is returned. Subsequent calls to this APDU will not change the challenge. The challenge changes only if it is solved. ### GET CHALLENGE APDU Command-Response - +
Command APDUTable 14: Get Challenge Command APDU

TAG

@@ -1013,7 +1088,7 @@ This card operation fetches wallet challenge data from an X1 card. When the card
- +
Response APDUTable 15: Get Challenge Response APDU

TAG

@@ -1059,7 +1134,7 @@ This card operation fetches wallet challenge data from an X1 card. When the card
- +
Status WordsTable 16: Get Challenge Status Word

SW

@@ -1110,7 +1185,7 @@ This card operation signs authentication data with the provided configuration. T ### SIGN CHALLENGE APDU Command-Response - +
Command APDUTable 17: Sign Challenge Command APDU

TAG

@@ -1172,7 +1247,7 @@ This card operation signs authentication data with the provided configuration. T
- +
Response DataTable 18: Sign Challenge Response APDU
@@ -1217,7 +1292,7 @@ If the card is already unlocked then this APDU can also be used to verify PIN. ### VERIFY CHALLENGE APDU Command-Response - +
Command APDUTable 19: Verify Challenge Command APDU

TAG

@@ -1310,7 +1385,7 @@ If the card is already unlocked then this APDU can also be used to verify PIN.
- +
Response APDUTable 20: Verify Challenge Response APDU

TAG

@@ -1356,7 +1431,7 @@ If the card is already unlocked then this APDU can also be used to verify PIN.
- +
Status WordTable 21: Verify Challenge Status Word

SW

@@ -1423,7 +1498,7 @@ This card operation will encrypt data using the AES key and IV which was stored ### ENCRYPT DATA APDU Command-Response - +
Command APDUTable 22: Encrypt Data Command APDU

TAG

@@ -1503,7 +1578,7 @@ This card operation will encrypt data using the AES key and IV which was stored
- +
Response APDUTable 23: Encrypt Data Response APDU

TAG

@@ -1532,7 +1607,7 @@ This card operation will encrypt data using the AES key and IV which was stored
- +
Status WordsTable 24: Encrypt Data Status Words

SW

@@ -1582,7 +1657,7 @@ This card operation will decrypt data using the AES key and IV which was stored ### DECRYPT DATA APDU Command-Response - +
Command APDUTable 25: Decrypt Data Command APDU

TAG

@@ -1661,7 +1736,7 @@ This card operation will decrypt data using the AES key and IV which was stored

- +
Response APDUTable 26: Decrypt Data Response APDU
@@ -1691,8 +1766,7 @@ This card operation will decrypt data using the AES key and IV which was stored
- - +
Status WordTable 27: Decrypt Data Status Word

SW