diff --git a/core/emu.py b/core/emu.py index 0cf88a6ca9..ba1b2ff1ce 100755 --- a/core/emu.py +++ b/core/emu.py @@ -168,6 +168,12 @@ def cli( By default, emulator output goes to stdout. If silenced with -q, it is redirected to $TREZOR_PROFILE_DIR/trezor.log. You can also specify a custom path with -o. + + This emulator is for development purposes only. Any other usage of the emulator is + discouraged. Doing so runs the risk of losing funds. It uses a pseudo random number + generator, and thus no guarantee on its entropy is made. Security and hardening + efforts are only made available on physical Trezor hardware. + """ if executable: executable = Path(executable) diff --git a/core/src/boot.py b/core/src/boot.py index 01777b7a9c..051aa3605b 100644 --- a/core/src/boot.py +++ b/core/src/boot.py @@ -104,6 +104,10 @@ async def bootscreen() -> None: utils.halt(e.__class__.__name__) +# Display emulator warning. +if utils.EMULATOR: + print("\x1b[1;31m*** TREZOR EMULATOR IS FOR DEVELOPMENT PURPOSES ONLY ***\x1b[0m") + # Ignore all automated PIN messages in the boot-phase (turned off in `bootscreen()`), unless Optiga throttling delays are active. if not utils.USE_OPTIGA or (optiga.get_sec() or 0) < 150: ignore_nonpin_loader_messages() diff --git a/docs/legacy/index.md b/docs/legacy/index.md index 6c9204b9fb..c85672bd8d 100644 --- a/docs/legacy/index.md +++ b/docs/legacy/index.md @@ -70,6 +70,12 @@ poetry run ./script/cibuild A built device firmware will be located in `legacy/firmware/trezor.bin`. A built emulator will be located in `legacy/firmware/trezor.elf`. +### ⚠️ Disclaimer ⚠️ + +The emulator is for *development purposes only*. It uses a pseudo random number generator, and thus no guarantee on its entropy is made. No security or hardening efforts are made here. It is, and will continue to be, intended for development purposes only. Security and hardening efforts are only made available on [physical Trezor hardware](https://shop.trezor.io/). + +Any other usage of the emulator is discouraged. Doing so runs the risk of losing funds. + ### Common errors * **"Exception: bootloader has to be smaller than 32736 bytes"**: if you didn't modify the bootloader diff --git a/legacy/firmware/trezor.c b/legacy/firmware/trezor.c index 477e9e378e..5edfd95589 100644 --- a/legacy/firmware/trezor.c +++ b/legacy/firmware/trezor.c @@ -34,10 +34,14 @@ #include "timer.h" #include "usb.h" #include "util.h" + #if !EMULATOR #include #include "otp.h" +#else +#include #endif + #ifdef USE_SECP256K1_ZKP #include "zkp_context.h" #endif @@ -183,6 +187,13 @@ int main(void) { #endif #endif +#if EMULATOR + printf( + "\x1b[1;31m" + "*** TREZOR EMULATOR IS FOR DEVELOPMENT PURPOSES ONLY ***" + "\x1b[0m\n"); +#endif + oledDrawBitmap(40, 0, &bmp_logo64_half); oledDrawBitmapFlip(40 + 24, 0, &bmp_logo64_half); oledRefresh();