Skip to content

speculos-builder

Install from the command line:
Learn more
$ docker pull ghcr.io/ledgerhq/speculos-builder:sha-5fab0ab

Recent tagged image versions

  • Published 3 months ago · Digest
    sha256:68143c9145bd3f907cdb744fae9092e9a6d0ac39e79a61402a64ee303b7f26a1
    315
  • Published about 1 year ago · Digest
    sha256:7887da947190ed6d434d54a7d8eb82c8fc4abb332144d34184f1e01a4f0079ff
    974
  • Published about 1 year ago · Digest
    sha256:d3a584f25d69b15303fab6458bd8fdfda6580a14e82e619020416469cfed861d
    37
  • Published about 1 year ago · Digest
    sha256:566499567d41628289222be84f36f59c844c59730ae028c15fd7bd689c3cdbf1
    11
  • Published about 1 year ago · Digest
    sha256:29d54d4d5c463f9cbf71c0e2b7929472a7ccc8cb782d9b0ae7bb584fad347cf5
    14

Speculos

codecov lgtm

screenshot btc nano s

The goal of this project is to emulate Ledger Nano S, Nano X and Blue apps on standard desktop computers, without any hardware device. More information can be found here in the documentation website (or in the docs/ folder directly).

Usage example:

./speculos.py apps/btc.elf
# ... and open a browser on http://127.0.0.1:5000

Bugs and contributions

Feel free to open issues and create pull requests on this GitHub repository.

The master branch is protected to disable force pushing. Contributions should be made through pull requests, which are reviewed by @LedgerHQ members before being merged to master:

  • @LedgerHQ members can create branches directly on the repository (if member of a team with write access to the repository)
  • External contributors should fork the repository

Limitations

The emulator handles only a few syscalls made by common apps; for instance, syscalls related to app install, firmware update or OS info can't be implemented.

There is absolutely no guarantee that apps will have the same behavior on hardware devices and Speculos:

  • Invalid syscall parameters might throw an exception on a real device while being ignored on Speculos.
  • Attempts to perform unaligned accesses when not allowed (eg. dereferencing a misaligned pointer) will cause an alignment fault on a hardware device.

Security

Apps can make arbitrary Linux system calls (and use QEMU semihosting features), thus don't run Speculos on untrusted apps.

It's worth noting that the syscall implementation (src/) doesn't expect malicious input. By the way, in Speculos, there is no privilege separation between the app and the syscalls. This doesn't reflect the security of the firmware on hardware devices where app and OS isolation is enforced.

Speculos is not part of Ledger bug bounty program.

Are you developing a Nano App as an external developer?

For a smooth and quick integration:

Details


Last published

3 months ago

Issues

16

Total downloads

1.51K


Collaborators 5