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).
Link to python tool : https://github.com/SAFETECHio/SafeKey_Testing
Most of these features are going to be included in further releases of SafeKey Desktop.
SafeKey Tool Installation
Custom Storage (CS) Activation
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.
Get Device Activation Status
Activate Device To Support Custom Storage Features
Deactivate Device To Limit To SafeKey FIDO2 Features Only
activation.pem (is an activation key generated and owned by SafeTech)
Custom Storage (CS) Tests
The repository contains tests for the Custom Storage features, which are part of the SafeKey firmware.
Test List (will be uploaded soon)
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;
Setup 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
Other Tests
To blink the connected device, execute:
`shell script safekey key wink
License
Last updated