nitrokey/libnitrokey

Created Feb 15, 2021 · View the nitrokey/libnitrokey repository page

Communicate with Nitrokey devices in a clean and easy manner

Want this for your repo?

Render a free sample of any GitHub repo in seconds.

Visualize your own →

Contributors

16

Lines of Code

1,653

From

Oct 22, 2015

To

Sep 19, 2020

About nitrokey/libnitrokey

libnitrokey is a C++14 library that enables clean and easy communication with Nitrokey Pro and Storage hardware security devices. The library serves as a living documentation of the communication protocol between host computers and Nitrokey stick devices, with detailed command packet formats and handling operations included in the source code. It provides both C and C++ APIs, with Python bindings available through CFFI for Python 3, allowing developers to interact with the devices programmatically.

The library supports core Nitrokey functionality including one-time password generation (HOTP), password vault management, and for Storage devices, encrypted volume operations. It is designed to be cross-platform, with tested support on Linux, macOS, and Windows, and can be built using CMake as the primary build system with alternative options through Qt's qMake or Meson. The project requires libhidapi and libusb-1.0 dependencies on Linux and is tested with modern C++ compilers including GCC 5.4+ and Clang 3.8+.

The project includes comprehensive test suites written in both Python and C++, with Python tests demonstrating practical usage patterns for common device operations. Development is actively maintained with CI testing on multiple platforms, and the codebase is licensed under LGPL version 3. The documentation is embedded in the source code and can be generated with Doxygen, making the protocol implementation itself a reference for developers working with Nitrokey devices.

Share this video

More from nitrokey

See all →