Skip to content

Commit

Permalink
chore: Add instructions for key ID usage and signing data
Browse files Browse the repository at this point in the history
  • Loading branch information
microshine committed Nov 7, 2024
1 parent 6987cee commit 306d38f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ To display all objects (keys, certificates) on the GoodKey PKCS#11 module:
pkcs11-tool --module /usr/local/lib/gkp11.so -O
```

This command will list all keys and certificates available on the device. Make sure to copy the ID of the private key you intend to use for signing operations.

#### Listing Supported Mechanisms

To list all cryptographic mechanisms supported by the GoodKey PKCS#11 module:
Expand All @@ -255,6 +257,14 @@ pkcs11-tool --module /usr/local/lib/gkp11.so -M

#### Signing and Verifying Data

Use the key ID obtained from the list of objects for signing and verifying data. You can get the key ID by listing the objects on the device using the `pkcs11-tool` command.

To sign data, you need a test file with the data you want to sign. You can use your own file or create a new one. For example, you can create a new file with sample data using the `echo` command:

```bash
echo "Sample data to be signed" > data.txt
```

##### RSA Algorithm

**Signing Data with RSA:**
Expand Down

0 comments on commit 306d38f

Please sign in to comment.