mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-27 08:38:07 +00:00
use -O3 instead of -Os
This commit is contained in:
parent
9ae7d6bf65
commit
39e29c1037
@ -9,7 +9,7 @@ OBJDUMP = $(PREFIX)objdump
|
|||||||
FLASH = st-flash
|
FLASH = st-flash
|
||||||
OPENOCD = openocd
|
OPENOCD = openocd
|
||||||
|
|
||||||
OPTFLAGS = -Os -g -DNDEBUG
|
OPTFLAGS = -O3 -g -DNDEBUG
|
||||||
|
|
||||||
CFLAGS += $(OPTFLAGS) \
|
CFLAGS += $(OPTFLAGS) \
|
||||||
-W \
|
-W \
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include "signatures.h"
|
#include "signatures.h"
|
||||||
#include "ecdsa.h"
|
#include "ecdsa.h"
|
||||||
|
#include "secp256k1.h"
|
||||||
#include "bootloader.h"
|
#include "bootloader.h"
|
||||||
|
|
||||||
#define PUBKEYS 5
|
#define PUBKEYS 5
|
||||||
@ -52,13 +53,13 @@ int signatures_ok(void)
|
|||||||
if (sigindex1 == sigindex3) return 0; // duplicate use
|
if (sigindex1 == sigindex3) return 0; // duplicate use
|
||||||
if (sigindex2 == 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;
|
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;
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 71c24673ced80c83dc90539364fa1dbeeb12ee6d
|
Subproject commit 5ec72d3a5ba1aa6b7c7c907d7e2059b6c9a8a690
|
@ -1 +1 @@
|
|||||||
Subproject commit 1da1cedfd6bbd08784a3a4d7d6310b46830893cb
|
Subproject commit 1183aa714615dfaa9cfb771bca7ec8c11929a4c2
|
Loading…
Reference in New Issue
Block a user