How to remove/delete Pgp Keypair form nitroykey Pro *Solved*

Hello, on my Nitro keypro are two Pgp keys which should be removed by Gpg directly in the shell.
Sadly i cant do that because i didn’t find any documentation on how a smardcard key can be erased.
pg2 --card-edit
Then “admin” - which gives you admin rights
that’s the part which i stuck on because the other commands like,

–delete-secret-key xxxxxx
–delete-secret-and-public-key xxxxx
oder delsig xxxx

arnt excepted by the mini program (pg2 --card-edit)

If you look at the the mini program gpg2 --card-edit → help - there isn’t any sign of “delete private key” or something that’s look like it
Has anybody a clue how to delete the keypair at the nitrokey?

Best regards
Blanka


Hallo, auf meinem Nitro keypro sind zwei Pgp schlüssel die ich entfernen möchte.
Einer ist abgeläufen beim zweiten ist mir beim Generieren ein Fehler unterlaufen, hab den default wert von 2048bits genommen, das ist heute ja nicht mehr als sicher zu betrachten, deswegen muss der Key erneuert werden!

Mich macht gpg fertig, in der 2.1er version sehe ich keinen Befehl wie ich über die komandozeile(terminal) die beiden Keypaare vom Nitrokey Pro löschen kann! Da der nitrokey Pro sich ja wie eine smarcard verhält, kann man diese ja abfragen:

gpg2 --card-edit
Dann “admin” - um admin befhle auszuführen
Nur weiter kommt man nicht, weil befehle wie

–delete-secret-key xxxxxx
–delete-secret-and-public-key xxxxx
oder delsig xxxx

wird alles nicht akzeptiert!!!

Wenn man sich nur,das menue anschaut, welches man durch gpg2 --card-edit → help / bekommt.

Dort fehlt der punkt, wo man keypaare von der smarcard löschen kann!
Soweit ich weiß passen maximal 3 keypaar auf den nitrokeypro, somit muss man mit den verbleibenden Patz sehr sorgsam umgehen.

Hat jemand vielleicht einen Tipp, oder kennt die korrekten comands ?
Schon mal vielen dank an alle :slight_smile:
grüße Blanka

------------------------------------------SOLVED---------------------------------------------------------------------------------------------------------------------

Guide:

The solution to my problem:

A smartcard(which the nitrokey pro is) cant be alterted, it can only be reset to the factory values !
So the simplest approach is to use the nitrokeyreset.txt file
https://www.nitrokey.com/de/documentation/how-reset-nitrokey

Workflow under Arch:

git clone https://aur.archlinux.org/nitrokey-app.git

makepkg

pakman -u nitrokey-app…

after this

gpg-connect-agent < nitrokey-reset.txt

The reset deletes the RSA keys an also resets the PIN and admin PW to the factory defaults!

best regards
Blanka