Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| fedora:nitrokey:start [17.12.2018 21:03. ] – [Nitrokey Start und X.509 / S/MIME] django | fedora:nitrokey:start [18.11.2024 18:58. ] (aktuell) – Externe Bearbeitung 127.0.0.1 | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| ====== Nitrokey Start in der Praxis unter Fedora 29 ====== | ====== Nitrokey Start in der Praxis unter Fedora 29 ====== | ||
| {{: | {{: | ||
| - | In diesem Kapitel befassen wir uns eingehend mit dem [[https:// | + | In diesem Kapitel befassen wir uns eingehend mit dem [[https:// |
| Mit Hilfe von asymmetrischen Schlüsselmaterials (PGP und S/MIME) können eMails sowie Dateien und ganze Festplatten verschlüsselt und natürlich auch wieder entschlüsselt werden. Hierzu verwenden wir den [[https:// | Mit Hilfe von asymmetrischen Schlüsselmaterials (PGP und S/MIME) können eMails sowie Dateien und ganze Festplatten verschlüsselt und natürlich auch wieder entschlüsselt werden. Hierzu verwenden wir den [[https:// | ||
| Zeile 214: | Zeile 214: | ||
| Real name: Django aka [BOfH] | Real name: Django aka [BOfH] | ||
| - | Email address: secmail@mailserver.guru | + | Email address: secmail@nausch.org |
| Comment: Bastard Operator from Hell | Comment: Bastard Operator from Hell | ||
| You selected this USER-ID: | You selected this USER-ID: | ||
| - | " | + | " |
| Change (N)ame, (C)omment, (E)mail or (O)kay/ | Change (N)ame, (C)omment, (E)mail or (O)kay/ | ||
| Zeile 235: | Zeile 235: | ||
| pub | pub | ||
| E65B2BDF79A2E2E4C28F6E062E22436430385B49 | E65B2BDF79A2E2E4C28F6E062E22436430385B49 | ||
| - | uid Django aka [BOfH] (Bastard Operator from Hell) < | + | uid Django aka [BOfH] (Bastard Operator from Hell) < |
| sub | sub | ||
| sub | sub | ||
| Zeile 243: | Zeile 243: | ||
| In dem Artikel **[[https:// | In dem Artikel **[[https:// | ||
| - | Damit auf einem **Nitrokey Start** Schlüssel auf Basis elliptischer Kurven generiert werden können, muss dieser mindestens die Firmware Version 1.2 verfügen. Dies kontrolliert man am einfachsten | + | Damit auf einem **Nitrokey Start** Schlüssel auf Basis elliptischer Kurven generiert werden können, muss dieser mindestens die Firmware Version 1.2 verfügen. Dies kontrolliert man am einfachsten |
| $ gpg2 --card-status | grep Reader | $ gpg2 --card-status | grep Reader | ||
| Zeile 388: | Zeile 388: | ||
| Real name: Django aka [BOfH] | Real name: Django aka [BOfH] | ||
| - | Email address: secmail@mailserver.guru | + | Email address: secmail@nausch.org |
| Comment: Bastard Operator from Hell | Comment: Bastard Operator from Hell | ||
| You selected this USER-ID: | You selected this USER-ID: | ||
| - | " | + | " |
| Change (N)ame, (C)omment, (E)mail or (O)kay/ | Change (N)ame, (C)omment, (E)mail or (O)kay/ | ||
| Zeile 421: | Zeile 421: | ||
| Authentication key: 9131 32BE D5AF D08E 4464 89B6 77F0 A5B2 F32A 76AE | Authentication key: 9131 32BE D5AF D08E 4464 89B6 77F0 A5B2 F32A 76AE | ||
| created ....: 2018-11-27 21:26:26 | created ....: 2018-11-27 21:26:26 | ||
| - | General key info..: pub ed25519/ | + | General key info..: pub ed25519/ |
| sec> | sec> | ||
| card-no: FFFE 43243711 | card-no: FFFE 43243711 | ||
| Zeile 433: | Zeile 433: | ||
| < | < | ||
| 3E61A50347B523824132EC069308FC78386863AC | 3E61A50347B523824132EC069308FC78386863AC | ||
| - | uid Django aka [BOfH] (Bastard Operator from Hell) < | + | uid Django aka [BOfH] (Bastard Operator from Hell) < |
| sub | sub | ||
| sub | sub | ||
| Zeile 447: | Zeile 447: | ||
| E65B2BDF79A2E2E4C28F6E062E22436430385B49 | E65B2BDF79A2E2E4C28F6E062E22436430385B49 | ||
| Card serial no. = FFFE 43243711 | Card serial no. = FFFE 43243711 | ||
| - | uid | + | uid |
| ssb> | ssb> | ||
| ssb> | ssb> | ||
| Zeile 460: | Zeile 460: | ||
| pub | pub | ||
| E65B2BDF79A2E2E4C28F6E062E22436430385B49 | E65B2BDF79A2E2E4C28F6E062E22436430385B49 | ||
| - | uid | + | uid |
| sub | sub | ||
| sub | sub | ||
| Zeile 466: | Zeile 466: | ||
| === Öffentlichen Schlüssel ausgeben === | === Öffentlichen Schlüssel ausgeben === | ||
| Damit wir später unseren öffentlichen Schlüssel auch weitergeben oder zu einem [[https:// | Damit wir später unseren öffentlichen Schlüssel auch weitergeben oder zu einem [[https:// | ||
| - | $ gpg --export --armor secmail@mailserver.guru > secmail@mailserver.guru.pubkey | + | $ gpg --export --armor secmail@nausch.org > secmail@nausch.org.pubkey |
| Diese Datei enthält unseren Schlüssel in ASCII-lesbarer Form. | Diese Datei enthält unseren Schlüssel in ASCII-lesbarer Form. | ||
| - | $ cat secmail@mailserver.guru.pubkey | + | $ cat secmail@nausch.org.pubkey |
| - | <file key secmail@mailserver.guru.pubkey> | + | <file key secmail@nausch.org.pubkey> |
| mQENBFv8ZM0BCADIZ1us1KDfrl+VVZTmjgVDb9XLSJDWOCjjhngzkBNVIYpPRL9P | mQENBFv8ZM0BCADIZ1us1KDfrl+VVZTmjgVDb9XLSJDWOCjjhngzkBNVIYpPRL9P | ||
| Zeile 551: | Zeile 551: | ||
| created ....: 2018-11-26 21:25:33 | created ....: 2018-11-26 21:25:33 | ||
| General key info..: | General key info..: | ||
| - | pub 2048R/ | + | pub 2048R/ |
| sec> | sec> | ||
| card-no: FFFE 43243711 | card-no: FFFE 43243711 | ||
| Zeile 615: | Zeile 615: | ||
| created ....: 2018-11-26 21:25:33 | created ....: 2018-11-26 21:25:33 | ||
| General key info..: | General key info..: | ||
| - | pub 2048R/ | + | pub 2048R/ |
| sec> | sec> | ||
| card-no: FFFE 43243711 | card-no: FFFE 43243711 | ||
| Zeile 732: | Zeile 732: | ||
| - Zunächst Wir legen uns erst einmal ein beliebiges Testdokument an. < | - Zunächst Wir legen uns erst einmal ein beliebiges Testdokument an. < | ||
| - | - Nun verschlüsseln wir dieses Textdokument: | + | - Nun verschlüsseln wir dieses Textdokument: |
| -rw-rw-r--. 1 django django 573 Nov 26 22:57 testdatei.txt.pgp</ | -rw-rw-r--. 1 django django 573 Nov 26 22:57 testdatei.txt.pgp</ | ||
| Zeile 746: | Zeile 746: | ||
| -----END PGP MESSAGE-----</ | -----END PGP MESSAGE-----</ | ||
| - Nun entschlüsseln wir unser Dokument wieder.< | - Nun entschlüsseln wir unser Dokument wieder.< | ||
| - | " | + | " |
| === Signieren === | === Signieren === | ||
| Zeile 761: | Zeile 761: | ||
| ." | ." | ||
| | | ||
| - | �b �v�©]/ | + | �b �v�©]/ |
| gpg: signatures created so far: 8 | gpg: signatures created so far: 8 | ||
| Zeile 794: | Zeile 794: | ||
| =ld6o | =ld6o | ||
| -----END PGP SIGNATURE-----</ | -----END PGP SIGNATURE-----</ | ||
| - | gpg: Good signature from " | + | gpg: Good signature from " |
| gpg: WARNING: not a detached signature; file ' | gpg: WARNING: not a detached signature; file ' | ||
| Hash: SHA1 | Hash: SHA1 | ||
| Zeile 809: | Zeile 809: | ||
| =ld6o | =ld6o | ||
| -----END PGP SIGNATURE-----</ | -----END PGP SIGNATURE-----</ | ||
| - | gpg: BAD signature from " | + | gpg: BAD signature from " |
| Zeile 968: | Zeile 968: | ||
| Authentication key: 9131 32BE D5AF D08E 4464 89B6 77F0 A5B2 F32A 76AE | Authentication key: 9131 32BE D5AF D08E 4464 89B6 77F0 A5B2 F32A 76AE | ||
| created ....: 2018-11-27 21:26:26 | created ....: 2018-11-27 21:26:26 | ||
| - | General key info..: pub ed25519/ | + | General key info..: pub ed25519/ |
| sec> | sec> | ||
| Kartennummer: | Kartennummer: | ||
| Zeile 1036: | Zeile 1036: | ||
| Using reader with a card: Nitrokey Nitrokey Start (FSIJ-1.2.10-43210843) 00 00 | Using reader with a card: Nitrokey Nitrokey Start (FSIJ-1.2.10-43210843) 00 00 | ||
| + | |||
| + | [django@T410 Schreibtisch]$ gpg2 --card-status | ||
| + | Reader ...........: | ||
| + | Application ID ...: D276000124010200FFFE432108430000 | ||
| + | Version ..........: 2.0 | ||
| + | Manufacturer .....: unmanaged S/N range | ||
| + | Serial number ....: 43210843 | ||
| + | Name of cardholder: [nicht gesetzt] | ||
| + | Language prefs ...: [nicht gesetzt] | ||
| + | Sex ..............: | ||
| + | URL of public key : [nicht gesetzt] | ||
| + | Login data .......: [nicht gesetzt] | ||
| + | Signature PIN ....: zwingend | ||
| + | Key attributes ...: rsa2048 rsa2048 rsa2048 | ||
| + | Max. PIN lengths .: 127 127 127 | ||
| + | PIN retry counter : 3 3 3 | ||
| + | Signature counter : 0 | ||
| + | Signature key ....: [none] | ||
| + | Encryption key....: [none] | ||
| + | Authentication key: [none] | ||
| + | General key info..: [none] | ||
| + | [django@T410 Schreibtisch]$ gpg2 --card-edit | ||
| + | |||
| + | Reader ...........: | ||
| + | Application ID ...: D276000124010200FFFE432108430000 | ||
| + | Version ..........: 2.0 | ||
| + | Manufacturer .....: unmanaged S/N range | ||
| + | Serial number ....: 43210843 | ||
| + | Name of cardholder: [nicht gesetzt] | ||
| + | Language prefs ...: [nicht gesetzt] | ||
| + | Sex ..............: | ||
| + | URL of public key : [nicht gesetzt] | ||
| + | Login data .......: [nicht gesetzt] | ||
| + | Signature PIN ....: zwingend | ||
| + | Key attributes ...: rsa2048 rsa2048 rsa2048 | ||
| + | Max. PIN lengths .: 127 127 127 | ||
| + | PIN retry counter : 3 3 3 | ||
| + | Signature counter : 0 | ||
| + | Signature key ....: [none] | ||
| + | Encryption key....: [none] | ||
| + | Authentication key: [none] | ||
| + | General key info..: [none] | ||
| + | |||
| + | gpg/ | ||
| + | |||
| + | Reader ...........: | ||
| + | Application ID ...: D276000124010200FFFE432108430000 | ||
| + | Version ..........: 2.0 | ||
| + | Manufacturer .....: unmanaged S/N range | ||
| + | Serial number ....: 43210843 | ||
| + | Name of cardholder: [nicht gesetzt] | ||
| + | Language prefs ...: [nicht gesetzt] | ||
| + | Sex ..............: | ||
| + | URL of public key : [nicht gesetzt] | ||
| + | Login data .......: [nicht gesetzt] | ||
| + | Signature PIN ....: zwingend | ||
| + | Key attributes ...: rsa2048 rsa2048 rsa2048 | ||
| + | Max. PIN lengths .: 127 127 127 | ||
| + | PIN retry counter : 3 3 3 | ||
| + | Signature counter : 0 | ||
| + | Signature key ....: [none] | ||
| + | Encryption key....: [none] | ||
| + | Authentication key: [none] | ||
| + | General key info..: [none] | ||
| + | |||
| + | gpg/ | ||
| + | Admin-Befehle sind erlaubt | ||
| + | |||
| + | gpg/ | ||
| + | quit Menü verlassen | ||
| + | admin Zeige Admin-Befehle | ||
| + | help Diese Hilfe zeigen | ||
| + | list Alle vorhandenen Daten auflisten | ||
| + | name | ||
| + | url Schlüssel-holen-URL ändern | ||
| + | fetch Holen des Schlüssels mittels der URL auf der Karte | ||
| + | login Ändern der Logindaten | ||
| + | lang | ||
| + | sex Ändern des Geschlechts des Kartenbesitzers | ||
| + | cafpr Ändern des CA-Fingerabdrucks | ||
| + | forcesig | ||
| + | generate | ||
| + | passwd | ||
| + | verify | ||
| + | unblock | ||
| + | factory-reset | ||
| + | kdf-setup | ||
| + | key-attr | ||
| + | |||
| + | gpg/ | ||
| + | Familienname des Kartenbesitzers: | ||
| + | Vorname des Kartenbesitzers: | ||
| + | |||
| + | gpg/ | ||
| + | Spracheinstellungende | ||
| + | |||
| + | gpg/ | ||
| + | Geschlecht: (Männlich (M), Weiblich (F) oder Leerzeichen): | ||
| + | |||
| + | gpg/ | ||
| + | gpg: OpenPGP Karte Nr. D276000124010200FFFE432108430000 erkannt | ||
| + | |||
| + | 1 - change PIN | ||
| + | 2 - unblock PIN | ||
| + | 3 - change Admin PIN | ||
| + | 4 - set the Reset Code | ||
| + | Q - quit | ||
| + | |||
| + | Ihre Auswahl? 3 | ||
| + | PIN changed. | ||
| + | |||
| + | 1 - change PIN | ||
| + | 2 - unblock PIN | ||
| + | 3 - change Admin PIN | ||
| + | 4 - set the Reset Code | ||
| + | Q - quit | ||
| + | |||
| + | Ihre Auswahl? 1 | ||
| + | Error changing the PIN: Nutzungsvorraussetzungen nicht erfüllt | ||
| + | |||
| + | 1 - change PIN | ||
| + | 2 - unblock PIN | ||
| + | 3 - change Admin PIN | ||
| + | 4 - set the Reset Code | ||
| + | Q - quit | ||
| + | |||
| + | Ihre Auswahl? | ||
| + | |||
| + | 1 - change PIN | ||
| + | 2 - unblock PIN | ||
| + | 3 - change Admin PIN | ||
| + | 4 - set the Reset Code | ||
| + | Q - quit | ||
| + | |||
| + | Ihre Auswahl? q | ||
| + | |||
| + | gpg/ | ||
| + | |||
| + | Reader ...........: | ||
| + | Application ID ...: D276000124010200FFFE432108430000 | ||
| + | Version ..........: 2.0 | ||
| + | Manufacturer .....: unmanaged S/N range | ||
| + | Serial number ....: 43210843 | ||
| + | Name of cardholder: Michael Nausch | ||
| + | Language prefs ...: de | ||
| + | Sex ..............: | ||
| + | URL of public key : [nicht gesetzt] | ||
| + | Login data .......: [nicht gesetzt] | ||
| + | Signature PIN ....: zwingend | ||
| + | Key attributes ...: rsa2048 rsa2048 rsa2048 | ||
| + | Max. PIN lengths .: 127 127 127 | ||
| + | PIN retry counter : 3 3 3 | ||
| + | Signature counter : 0 | ||
| + | Signature key ....: [none] | ||
| + | Encryption key....: [none] | ||
| + | Authentication key: [none] | ||
| + | General key info..: [none] | ||
| + | |||
| + | gpg/ | ||
| + | |||
| + | |||
| + | $ opensc-explorer | ||
| + | OpenSC Explorer version 0.19.0 | ||
| + | Using reader with a card: Nitrokey Nitrokey Start (FSIJ-1.2.10-43210843) 00 00 | ||
| + | Failed to connect to card: Reader in use by another application | ||
| + | |||
| + | |||
| + | $ opensc-explorer | ||
| + | OpenSC Explorer version 0.19.0 | ||
| + | Using reader with a card: Nitrokey Nitrokey Start (FSIJ-1.2.10-43210843) 00 00 | ||
| + | OpenSC [3F00]> | ||
| + | |||
| + | |||
| + | $ openpgp-tool --erase | ||
| + | Using reader with a card: Nitrokey Nitrokey Start (FSIJ-1.2.10-43210843) 00 00 | ||
| + | Erase card | ||
| + | |||
| + | |||
| + | $ opensc-explorer | ||
| + | OpenSC Explorer version 0.19.0 | ||
| + | Using reader with a card: Nitrokey Nitrokey Start (FSIJ-1.2.10-43210843) 00 00 | ||
| + | OpenSC [3F00]> help | ||
| + | Supported commands: | ||
| + | echo [< | ||
| + | ls [< | ||
| + | find [<start id> [<end id> | ||
| + | find_tags [<start tag> [<end tag> | ||
| + | cd {.. | <file id> | aid:<DF name> | ||
| + | cat [<file id> | sfi:<sfi id> | ||
| + | info [<file id> | ||
| + | create <file id> < | ||
| + | mkdir <file id> < | ||
| + | delete <file id> | ||
| + | rm <file id> | ||
| + | verify {CHV|KEY|AUT|PRO}< | ||
| + | change CHV<pin ref> [[<old pin>] <new pin> | ||
| + | unblock CHV<pin ref> [< | ||
| + | put <file id> [<input file> | ||
| + | get <file id> [<output file> | ||
| + | do_get <hex tag> [<output file> | ||
| + | do_put <hex tag> < | ||
| + | erase erase card | ||
| + | random < | ||
| + | update_record <file id> <rec no> <rec offs> < | ||
| + | update_binary <file id> < | ||
| + | apdu < | ||
| + | asn1 [<file id> | ||
| + | sm open|close | ||
| + | debug [< | ||
| + | quit quit this program | ||
| + | exit quit this program | ||
| + | help show this help | ||
| + | OpenSC [3F00]> exit | ||
| + | Pairs of key & certificate from P12 file: | ||
| + | $ pkcs15-init --verbose --delete-objects privkey, | ||
| + | Using reader with a card: Nitrokey Nitrokey Start (FSIJ-1.2.10-43210843) 00 00 | ||
| + | Connecting to card in reader Nitrokey Nitrokey Start (FSIJ-1.2.10-43210843) 00 00... | ||
| + | Using card driver OpenPGP card. | ||
| + | Found OpenPGP card | ||
| + | User PIN required. | ||
| + | Please enter User PIN [Admin PIN]: | ||
| + | About to delete object(s). | ||
| + | NOTE: couldn' | ||
| + | NOTE: couldn' | ||
| + | Deleted 0 objects | ||
| + | About to store private key. | ||
| + | error: | ||
| + | Please enter passphrase to unlock secret key: | ||
| + | Importing 3 certificates: | ||
| + | 0: / | ||
| + | 1: / | ||
| + | 2: / | ||
| + | Failed to store private key: Invalid arguments | ||
| + | Vermutliche Ursache, private key zu groß! | ||
| */ | */ | ||