Python CLI Tools (CS)
This page provides information on Python command line interface (CLI) tools to install and test various features of SafeKey such as Custom Storage (CS).
Last updated
Was this helpful?
This page provides information on Python command line interface (CLI) tools to install and test various features of SafeKey such as Custom Storage (CS).
Last updated
Was this helpful?
Activation feature allows to enable or disable Custom Storage (CS) commands on the given custom FIDO2 device.
It is based on the Elliptic Curve Cryptography (ECC), with set of operations based on public and private keys.
By default CS commands are disabled, and device returns error code on attempt of their execution.
Activation could be performed locally, with a potential extension to remote work (without firmware change). No one besides the person in the possession of the key can perform the procedure.
The received activation signature is restricted to the given device, and valid for only a single request, due to the use of MCU’s serial number, and a randomly device-generated transaction token.
Data received from the device allow to identify it, and track the activation status on the server.
The repository contains tests for the Custom Storage features, which are part of the SafeKey firmware.
test_activation.py
- unit tests for the Activation feature;
test_comm.py
- general suite for the low-level communication, read and write of the data on the device;
test_cs_unlock.py
- tests for the Unlock Passphrase feature;
test_pin_management.py
- test suite for the PIN handling, and the connection between FIDO2 and Custom Storage PIN counter;
test_fido2.py
- brief FIDO2 tests;
To run the tests, a pytest
package has to be installed beforehand, as well as all requirements for the safekey-tool
.
Please run the tests in the same environment, as the tool is installed.
For user-scope installation:
`shell script pip3 install pytest -y
To blink the connected device, execute:
`shell script safekey key wink