You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Conor Patrick 0ae85abc92 use ctap2 instead of client to avoid preemptive pin checking exceptions 2 years ago
solo use ctap2 instead of client to avoid preemptive pin checking exceptions 2 years ago
.editorconfig Initial commit 2 years ago
.envrc Start refactor 2 years ago
.flake8 Fix broken or_die function, linting, `make tag` 2 years ago
.gitignore Update .gitignore 2 years ago
CHANGELOG.md Bump version to 0.0.9 2 years ago
LICENSE-APACHE Initial commit 2 years ago
LICENSE-MIT Initial commit 2 years ago
Makefile Fix broken or_die function, linting, `make tag` 2 years ago
README.md Add badge with PyPI version 2 years ago
dev-requirements.txt Start linting - caught a few things! 2 years ago
pyproject.toml Specify minimum click version 2 years ago

README.md

Python tool and library for SoloKeys

Getting Started

We require Python >= 3.6 and corresponding pip3 command.

We intend to support Linux, Windows and macOS. Other platforms aren't supported by the FIDO2 library we rely on.

To get started, run pip3 install solo-python, this installs both the solo library and the solo interface.

Possible issues:

For development, we suggest you run make init instead, which

  • sets up a virtual environment
  • installs development requirements such as black
  • installs solo as symlink using our packaging tool flit, including all runtime dependencies listed in pyproject.toml

One way to ensure the virtual environment is active is to use direnv.

Solo Tool

For help, run solo --help after installation. The tool has a hierarchy of commands and subcommands.

Example:

solo ls  # lists all Solo keys connected to your machine
solo version  # outputs version of installed `solo` library and tool

solo key wink  # blinks the LED
solo key verify  # checks whether your Solo is genuine
solo key rng hexbytes  # outputs some random hex bytes generated on your key
solo key version  # outputs the version of the firmware on your key

Firmware Update

Upon release of signed firmware updates in solokeys/solo, to update the firmware on your Solo Secure ("regular" version) to the latest version:

  • update your solo tool if necessary via pip3 install --upgrade solo-python
  • plug in your key, keeping the button pressed until the LED flashes yellow
  • run solo key update --secure

To update an (unmodified) Solo Hacker, instead run solo key update --hacker.

For possibly helpful additional information, see https://github.com/solokeys/solo/issues/113.

Library Usage

The previous solotool.py has been refactored into a library with associated CLI tool called solo.

It is still work in progress, example usage:

import solo

client = solo.client.find()

client.wink()

random_bytes = client.get_rng(32)
print(random_bytes.hex())

Comprehensive documentation coming, for now these are the main components

  • solo.client: connect to Solo Hacker and Solo Secure keys in firmware or bootloader mode
  • solo.dfu: connect to Solo Hacker in dfu mode (disabled on Solo Secure keys)
  • solo.cli: implementation of the solo command line interface

License

Licensed under either of

at your option.

Contributing

Any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Code is to be formatted and linted according to Black and our Flake8 configuration Run make check to test compliance, run make fix to apply some automatic fixes.

We keep a CHANGELOG.