mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2024-09-20 11:20:08 +00:00
commit
d5899a90c1
@ -30,7 +30,7 @@ PIN=648219
|
||||
## Initialization
|
||||
The first step is to initialize the HSM. To do so, use the `pico-hsm-tool.py` in `tools` folder:
|
||||
```
|
||||
$ python3 pico-hsm-tool initialize --so-pin 3537363231383830 --pin 648219
|
||||
$ python3 pico-hsm-tool.py initialize --so-pin 3537363231383830 --pin 648219
|
||||
```
|
||||
The PIN number is used to manage all private keys in the device. It supports three attemps. After the third PIN failure, it gets blocked.
|
||||
The PIN accepts from 6 to 16 characters.
|
||||
|
9
tools/pico-hsm-tool.py
Executable file → Normal file
9
tools/pico-hsm-tool.py
Executable file → Normal file
@ -24,17 +24,16 @@ try:
|
||||
from smartcard.CardType import AnyCardType
|
||||
from smartcard.CardRequest import CardRequest
|
||||
from smartcard.Exceptions import CardRequestTimeoutException
|
||||
except:
|
||||
except ModuleNotFoundError:
|
||||
print('ERROR: smarctard module not found! Install pyscard package.\nTry with `pip install pyscard`')
|
||||
sys.exit(-1)
|
||||
|
||||
try:
|
||||
from cvc.certificates import CVC
|
||||
from cvc.asn1 import ASN1
|
||||
from cvc.oid import oid2scheme
|
||||
from cvc.utils import scheme_rsa
|
||||
from cvc.certificates import CVC
|
||||
|
||||
except:
|
||||
except ModuleNotFoundError:
|
||||
print('ERROR: cvc module not found! Install pycvc package.\nTry with `pip install pycvc`')
|
||||
sys.exit(-1)
|
||||
|
||||
@ -44,7 +43,7 @@ try:
|
||||
from cryptography.hazmat.primitives.serialization import Encoding, PublicFormat
|
||||
from cryptography.hazmat.primitives.ciphers.aead import ChaCha20Poly1305
|
||||
from cryptography.hazmat.primitives import hashes
|
||||
except:
|
||||
except ModuleNotFoundError:
|
||||
print('ERROR: cryptography module not found! Install cryptography package.\nTry with `pip install cryptography`')
|
||||
sys.exit(-1)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user