Hi,
I have a Nitrokey HSM containing many items including:
$ pkcs11-tool -l --list-objects
Using slot 0 with a present token (0x0)
Logging in to "powersoft-test-token (UserPIN)".
Please enter User PIN:
[...]
Private Key Object; RSA
label: SRK2_test
ID: 03
Usage: decrypt, sign, unwrap
Access: sensitive, always sensitive, never extractable, local
Certificate Object; type = X.509 cert
label: SRK2_test
subject: DN: CN=SRK2_sha256_2048_65537_v3_ca
serial: 1234567B
ID: 03
Public Key Object; RSA 2048 bits
label: SRK2_test
ID: 03
Usage: encrypt, verify
Access: local
[...]
I delete the private key like this:
pkcs11-tool --delete-object --slot=0 --label="SRK2_test" --pin=****** --login --type=privkey
and this operation also causes the public key and certificate to be deleted.
I tried deleting by pointing instead to pubkey
and nothing happens, instead pointing to cert
deletes the certificate and the public key but not the private one.
It is as if there is a hierarchy.
Is this normal behavior? What is it due to?
In this case I still had to delete everything, but if I really wanted to delete only the private key, how should I do it?
regards
Max