All Projects → MattGorko → libu2f-emu

MattGorko / libu2f-emu

Licence: GPL-2.0 license
Universal 2nd Factor (U2F) Emulation C Library

Programming Languages

c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language
CMake
9771 projects
Meson
512 projects
Makefile
30231 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to libu2f-emu

demo-emulator
Nintendo Game Boy emulator written in Go to be used in workshops about emulator programming
Stars: ✭ 41 (+17.14%)
Mutual labels:  emulation
UTM
Virtual machines for iOS and macOS
Stars: ✭ 16,904 (+48197.14%)
Mutual labels:  emulation
nand nor
C++ Compile time NAND/NOR obfuscation
Stars: ✭ 32 (-8.57%)
Mutual labels:  emulation
EmulationResources
Collection of resources for emulator developers
Stars: ✭ 80 (+128.57%)
Mutual labels:  emulation
dingusppc
An experimental emulator
Stars: ✭ 106 (+202.86%)
Mutual labels:  emulation
chip-8
A CHIP-8 Emulator written in Haskell
Stars: ✭ 34 (-2.86%)
Mutual labels:  emulation
zemu
Ledger Nano Emulation/testing framework
Stars: ✭ 28 (-20%)
Mutual labels:  emulation
u2f ex
A server-side U2F (Universal Second Factor) library in Elixir
Stars: ✭ 25 (-28.57%)
Mutual labels:  u2f
u2f-luks
No description or website provided.
Stars: ✭ 29 (-17.14%)
Mutual labels:  u2f
cpm8266
Z80-CP/M2.2 emulation on ESP8266 NONOS SDK + the NoSDK from cnlohr
Stars: ✭ 110 (+214.29%)
Mutual labels:  emulation
clarion
WebAuthn (U2F) helper for CLI operations (e.g. SSH Log in)
Stars: ✭ 78 (+122.86%)
Mutual labels:  u2f
apint
Arbitrary precision integers library.
Stars: ✭ 23 (-34.29%)
Mutual labels:  emulation
Cemu-UI
A user interface for the Wii U emulator, Cemu
Stars: ✭ 21 (-40%)
Mutual labels:  emulation
MetropolisLauncher
A data-heavy Emulation & Gaming front-end for Windows
Stars: ✭ 35 (+0%)
Mutual labels:  emulation
FirmWire
FirmWire is a full-system baseband firmware emulation platform for fuzzing, debugging, and root-cause analysis of smartphone baseband firmwares
Stars: ✭ 555 (+1485.71%)
Mutual labels:  emulation
em400
MERA 400 emulator
Stars: ✭ 36 (+2.86%)
Mutual labels:  emulation
pctation
PlayStation emulator & debugger in C++17
Stars: ✭ 103 (+194.29%)
Mutual labels:  emulation
retropie-overlays
Console overlays set for Retropie & Recalbox
Stars: ✭ 54 (+54.29%)
Mutual labels:  emulation
rx-otp
HMAC-based (HOTP) and Time-based (TOTP) One-Time Password manager. Works with Google Authenticator for Two-Factor Authentication.
Stars: ✭ 79 (+125.71%)
Mutual labels:  u2f
6502.ts
Emulators for MOS 6502 based systems written in TypeScript
Stars: ✭ 50 (+42.86%)
Mutual labels:  emulation

Universal 2nd Factor (U2F) Emulation C Library

Libu2f-emu, provides a C Library for the U2F device emulations.

API

The API is described in src/u2f-emu.h and src/u2f-emu-type.h.

It gives the possibility to create virtual emulated U2F devices with transport specific considerations. Four transports are available:

  • USB
  • NFC
  • BLUETOOTH
  • APDU

Once create, it is possible to interact with the devices by sending and receiving transport specific data through the API.

Device configuration

Each virtual device, for its configuration requires:

  • an EC x509 certificate
  • its EC private key
  • 48 bits of entropy
  • a global counter

All the files are grouped inside a setup_dir that can be created through the setup.sh script.

$ ./setup.sh <setup_dir>

Examples

For each transport, a code example is available and can be built:

$ make examples

USB:

Software that emulates U2F through a virtual USB device using UHID system API on Linux and the libu2f-emu.

$ ./examples/usb/u2f-emu-usb <setup_dir>

You can easily test the virtual device my registering it on websites or by playing with it on https://webauthn.io/.

Building

The project support two build systems:

  • Autotools
  • CMake
  • Meson

Setup the build system:

# Autotools
$ ./autogen.sh
$ ./configure

# CMake
$ mkdir build && cd build
$ cmake ..

# Meson
$ meson build && cd build

Build and install the library:

$ make
$ make install

Doc

The doc is generated using doxygen:

$ make doc

The doc can be accessed here: doc/html/index.html.

Tests

Somes testsuites come with the project, these can be generated and run: gtest is required:

$ make check

Coverage

The coverage and its html report can be easily generated: gcov, gcovr and gtest are required.

# Autotools
$ ./configure --enable-coverage
$ make coverage

# CMake
$ cmake -DCMAKE_BUILD_TYPE=Coverage ..
$ make coverage

# Meson
$ meson -Dcoverage=true build && cd build
$ make test && make coverage

The coverage html report can be accessed here: coverage/index.html.

Pkg-config

After the installation, the pkg-config informations are set:

$ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig pkgconf u2f-emu --libs --cflags

License

This project is licensed under GPL-2.0.

Author

César MattGorko Belley [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].