From 39e29c1037efd8905719786d5cb53381bb50fc46 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Tue, 7 Jul 2015 18:36:54 +0200 Subject: [PATCH] use -O3 instead of -Os --- Makefile.include | 2 +- bootloader/signatures.c | 7 ++++--- trezor-crypto | 2 +- trezor-qrenc | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile.include b/Makefile.include index d63a35c690..af22f3f4bb 100644 --- a/Makefile.include +++ b/Makefile.include @@ -9,7 +9,7 @@ OBJDUMP = $(PREFIX)objdump FLASH = st-flash OPENOCD = openocd -OPTFLAGS = -Os -g -DNDEBUG +OPTFLAGS = -O3 -g -DNDEBUG CFLAGS += $(OPTFLAGS) \ -W \ diff --git a/bootloader/signatures.c b/bootloader/signatures.c index db9601b22f..85e921666f 100644 --- a/bootloader/signatures.c +++ b/bootloader/signatures.c @@ -21,6 +21,7 @@ #include "signatures.h" #include "ecdsa.h" +#include "secp256k1.h" #include "bootloader.h" #define PUBKEYS 5 @@ -52,13 +53,13 @@ int signatures_ok(void) if (sigindex1 == sigindex3) return 0; // duplicate use if (sigindex2 == sigindex3) return 0; // duplicate use - if (ecdsa_verify(pubkey[sigindex1 - 1], (uint8_t *)FLASH_META_SIG1, (uint8_t *)FLASH_APP_START, codelen) != 0) { // failure + if (ecdsa_verify(&secp256k1, pubkey[sigindex1 - 1], (uint8_t *)FLASH_META_SIG1, (uint8_t *)FLASH_APP_START, codelen) != 0) { // failure return 0; } - if (ecdsa_verify(pubkey[sigindex2 - 1], (uint8_t *)FLASH_META_SIG2, (uint8_t *)FLASH_APP_START, codelen) != 0) { // failure + if (ecdsa_verify(&secp256k1, pubkey[sigindex2 - 1], (uint8_t *)FLASH_META_SIG2, (uint8_t *)FLASH_APP_START, codelen) != 0) { // failure return 0; } - if (ecdsa_verify(pubkey[sigindex3 - 1], (uint8_t *)FLASH_META_SIG3, (uint8_t *)FLASH_APP_START, codelen) != 0) { // failture + if (ecdsa_verify(&secp256k1, pubkey[sigindex3 - 1], (uint8_t *)FLASH_META_SIG3, (uint8_t *)FLASH_APP_START, codelen) != 0) { // failture return 0; } diff --git a/trezor-crypto b/trezor-crypto index 71c24673ce..5ec72d3a5b 160000 --- a/trezor-crypto +++ b/trezor-crypto @@ -1 +1 @@ -Subproject commit 71c24673ced80c83dc90539364fa1dbeeb12ee6d +Subproject commit 5ec72d3a5ba1aa6b7c7c907d7e2059b6c9a8a690 diff --git a/trezor-qrenc b/trezor-qrenc index 1da1cedfd6..1183aa7146 160000 --- a/trezor-qrenc +++ b/trezor-qrenc @@ -1 +1 @@ -Subproject commit 1da1cedfd6bbd08784a3a4d7d6310b46830893cb +Subproject commit 1183aa714615dfaa9cfb771bca7ec8c11929a4c2