Skip to content

Commit 4ef2d53

Browse files
authored
Clarify NetHSM pkcs11 ids and labels (#484)
1 parent cc26ce6 commit 4ef2d53

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

source/components/nethsm/pkcs11-tool.rst

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,18 @@ To learn more about the configuration of slots, please refer to chapter `Configu
5252
.. note::
5353
If your configuration supports more than one slot, you may have to add the ``--slot <arg>`` option in pkcs11-tool commands to use the right one.
5454

55-
Key IDs
56-
-------
55+
Key IDs and Labels
56+
------------------
57+
58+
NetHSM uses alphanumerical strings as key IDs.
59+
The NetHSM PKCS#11 module shows the key ID on the NetHSM as the PKCS#11 label of the key and a hexadecimal representation of it as PKCS#11 ID.
60+
The *pkcs11-tool* uses a hexadecimal key ID to identify keys, thus can use the generated PKCS#11 ID.
61+
62+
.. important::
63+
The key IDs on the NetHSM are alphanumerical strings, thus only the characters ``A-Z``, ``a-z``, and ``0-9`` are allowed.
64+
Invalid characters passed through PKCS#11 labels will result in a ``PKCS11 function C_GenerateKeyPair failed: rv = CKR_FUNCTION_FAILED (0x6)`` error.
5765

58-
pkcs11-tool uses an hexadecimal key ID to identify keys. NetHSM uses alphanumerical strings as key ID. NetHSM's PKCS#11 module uses the raw byte values of the string to form the PKCS#11 ID.
59-
You can get the hexadecimal version of a NetHSM key with ``xxd``:
66+
You can get the hexadecimal version of a NetHSM key ID with ``xxd``:
6067

6168
.. code-block:: bash
6269

0 commit comments

Comments
 (0)