Outils pour utilisateurs

Outils du site


informatique:safenet_etoken_5110

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
informatique:safenet_etoken_5110 [17/08/2023 18:52] – [Essai ...] cyrilleinformatique:safenet_etoken_5110 [28/08/2023 17:43] (Version actuelle) – [Charger la paire de clés et le certificat dans le token] cyrille
Ligne 10: Ligne 10:
     * Using Tokens in Ubuntu with PGP https://craftware.xyz/securitybricks/2017/07/17/using-tokens-in-Ubuntu-with-pgp.html     * Using Tokens in Ubuntu with PGP https://craftware.xyz/securitybricks/2017/07/17/using-tokens-in-Ubuntu-with-pgp.html
  
-Version "5110 CC" Acheté 37 € (2023-08) sur https://qscd.eu 
  
-Voir aussi [[/informatique/safenet_etoken_5300|SafeNet eToken 5300]]+  * Version "5110 CC" Acheté 37 € (2023-08) sur https://qscd.eu 
 +  * Voir aussi [[/informatique/safenet_etoken_5300|SafeNet eToken 5300]] 
  
   * API et normes compatibles : PKCS#11, Microsoft CAPI, PC/SC, stockage de certificats X.509 v3, SSL v3, IPSec/IKE, MS mini-lecteur, CNG   * API et normes compatibles : PKCS#11, Microsoft CAPI, PC/SC, stockage de certificats X.509 v3, SSL v3, IPSec/IKE, MS mini-lecteur, CNG
Ligne 92: Ligne 93:
 W: no-manual-page usr/bin/SACTools W: no-manual-page usr/bin/SACTools
 W: package-name-doesnt-match-sonames libIDClassicSISTokenEngine10 libIDPVSlotEngine10 libIDPrimePKCS11-10 libIDPrimeSISTokenEngine10 libIDPrimeTokenEngine10 libSACLog10 libSACUI10 libeTPKCS15-10 libeToken10 libeTokenHID10 W: package-name-doesnt-match-sonames libIDClassicSISTokenEngine10 libIDPVSlotEngine10 libIDPrimePKCS11-10 libIDPrimeSISTokenEngine10 libIDPrimeTokenEngine10 libSACLog10 libSACUI10 libeTPKCS15-10 libeToken10 libeTokenHID10
 +</code>
 +
 +Ajout du module SafeNet ''/usr/lib/libIDPrimePKCS11.so'' dans Firefox :
 +
 +{{:informatique:crypto:safenet_5110_firefox_-_1.png?direct&600|}}
 +
 +{{:informatique:crypto:safenet_5110_firefox_-_2.png?direct&600|}}
 +
 +Chrome / Chromium ne propose pas d'interface graphique, il faut passer par la ligne de commande :
 +  * [[https://linuxkamarada.com/en/2019/09/26/setting-up-smart-card-authentication-on-google-chrome-chromium/|Setting up smart card authentication on Google Chrome / Chromium]]
 +
 +===== pkcs11-register =====
 +
 +<code>
 +$ pkcs11-register
 +Added OpenSC smartcard framework (0.22) to /home/user/.pki/nssdb/pkcs11.txt
 +Added OpenSC smartcard framework (0.22) to /home/user/.mozilla/firefox/CyrilleGiquello/pkcs11.txt
 +Added OpenSC smartcard framework (0.22) to /home/user/.thunderbird/CyrilleGiquello/pkcs11.txt
 +
 +$ pkcs11-register -m /usr/lib/libIDPrimePKCS11.so
 +Added Gemalto PKCS11 (10.8) to /home/cyrille/.pki/nssdb/pkcs11.txt
 +Added Gemalto PKCS11 (10.8) to /home/cyrille/.mozilla/firefox/CyrilleGiquello/pkcs11.txt
 +Added Gemalto PKCS11 (10.8) to /home/cyrille/.thunderbird/CyrilleGiquello/pkcs11.txt
 </code> </code>
  
Ligne 212: Ligne 236:
   token manufacturer : Gemalto   token manufacturer : Gemalto
 ... ...
 +</code>
 +
 +Avec le module ''/usr/lib/libIDPrimePKCS11.so'' au lieu de ''/usr/lib/libeToken.so'' on obtient un 8eme slot pour "Digital Signature Pin"
 +<code>
 +$ pkcs11-tool --module /usr/lib/libIDPrimePKCS11.so -L
 +Available slots:
 +Slot 0 (0x0): SafeNet eToken 5100 [eToken 5110 SC] 00 00
 +  token label        : CyrilleSN5110
 +  token manufacturer : Gemalto
 +  token model        : ID Prime MD
 +  token flags        : login required, rng, token initialized, PIN initialized, other flags=0x200
 +  hardware version   : 0.0
 +  firmware version   : 0.0
 +  serial num         : 00D7E011831A61E9
 +  pin min/max        : 4/16
 +Slot 1 (0x1): 
 +  (empty)
 +Slot 2 (0x2): 
 +  (empty)
 +Slot 3 (0x3): 
 +  (empty)
 +Slot 4 (0x4): 
 +  (empty)
 +Slot 5 (0x5): 
 +  (empty)
 +Slot 6 (0x6): 
 +  (empty)
 +Slot 7 (0x7): 
 +  (empty)
 +Slot 8 (0x10): SafeNet eToken 5100 [eToken 5110 SC] 00  (Digital Signature Pin)
 +  token label        : CyrilleSN5110 (Digital Signature
 +  token manufacturer : Gemalto
 +  token model        : ID Prime MD
 +  token flags        : login required, rng, token initialized, PIN initialized, other flags=0x200
 +  hardware version   : 0.0
 +  firmware version   : 0.0
 +  serial num         : 00D7E011831A61E9
 +  pin min/max        : 4/16
 +</code>
 +
 +Avec ''opensc-tool'' de [[https://github.com/OpenSC/OpenSC/wiki|OpenSC]]
 +<code>
 +$ opensc-tool -l
 +# Detected readers (pcsc)
 +Nr.  Card  Features  Name
 +0    Yes             SafeNet eToken 5100 [eToken 5110 SC] 00 00
 +
 +$ opensc-tool --reader 0 --name
 +Unsupported card
 +</code>
 +
 +===== Charger la paire de clés et le certificat dans le token =====
 +
 +  * [[https://sztsian.github.io/2022/03/12/Generate-Key-Pair-With-OpenSSL-And-Import-To-PKCS11-Token.html|Generate Key Pair With OpenSSL And Import To PKCS#11 Token]]
 +  * https://github.com/OpenSC/OpenSC/wiki/Quick-Start-with-OpenSC
 +
 +<code bash>
 +# extraire les clés et le certificat au format DER
 +$ openssl rsa -in privkey.pkey -outform DER -out testkey-key.der
 +$ openssl x509 -in cert.cer -outform DER -out testkey-crt.der
 +$ openssl rsa -in privkey.pkey -pubout -out testkey-public.key
 +
 +# import private key into token
 +$ pkcs11-tool --module /usr/lib/libIDPrimePKCS11.so --login --write-object testkey-key.der --type privkey --id 1
 +Using slot 0 with a present token (0x0)
 +Logging in to "CyrilleSN5110".
 +Please enter User PIN: 
 +Created private key:
 +Private Key Object; RSA 
 +  label:      
 +  ID:         01
 +  Usage:      decrypt, sign, unwrap
 +  Access:     sensitive
 +
 +# import certificat into token
 +$ pkcs11-tool --module /usr/lib/libIDPrimePKCS11.so --login --write-object testkey-crt.der --type cert --id 1
 +Using slot 0 with a present token (0x0)
 +Logging in to "CyrilleSN5110".
 +Please enter User PIN: 
 +Created certificate:
 +Certificate Object; type = X.509 cert
 +  label:      
 +  subject:    DN: emailAddress=cyrille@somewhere.eu
 +  ID:         01
 +
 +# import public key into token
 +$ pkcs11-tool --module /usr/lib/libIDPrimePKCS11.so --login --write-object testkey-public.key --type pubkey --id 1
 +Using slot 0 with a present token (0x0)
 +Logging in to "CyrilleSN5110".
 +Please enter User PIN: 
 +Created public key:
 +Public Key Object; RSA 2048 bits
 +  label:      
 +  ID:         01
 +  Usage:      encrypt, verify, wrap
 +  Access:     none
 +
 +</code>
 +
 +Et hop, visualisation du travail avec SAC:
 +
 +{{:informatique:crypto:safenet_5110_avec_certificat.png?direct&600|}}
 +
 +Et avec ''pkcs-tool'' (la clé privée n'est pas affichée sans ''--login'')
 +<code bash>
 +$ pkcs11-tool --module /usr/lib/libIDPrimePKCS11.so --login --list-objects
 +Using slot 0 with a present token (0x0)
 +Logging in to "CyrilleSN5110".
 +Please enter User PIN: 
 +Certificate Object; type = X.509 cert
 +  label:      
 +  subject:    DN: emailAddress=cyrille.giquello@internet.net
 +  ID:         01
 +Public Key Object; RSA 2048 bits
 +  label:      
 +  ID:         01
 +  Usage:      encrypt, verify, wrap
 +  Access:     none
 +Private Key Object; RSA 
 +  label:      
 +  ID:         01
 +  Usage:      decrypt, sign, unwrap
 +  Access:     sensitive
 </code> </code>
  
informatique/safenet_etoken_5110.1692291140.txt.gz · Dernière modification : 17/08/2023 18:52 de cyrille

Sauf mention contraire, le contenu de ce wiki est placé sous les termes de la licence suivante : CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki