diff --git a/app/tasks/core_task.c b/app/tasks/core_task.c index cc2c7c8..9502026 100644 --- a/app/tasks/core_task.c +++ b/app/tasks/core_task.c @@ -6,8 +6,6 @@ #include "pwr.h" #include "usb/usb.h" #include "crypto/aes.h" -#include "crypto/ecdsa.h" -#include "crypto/secp256k1.h" static inline void core_action_run(i18n_str_id_t menu) { switch(menu) { @@ -60,25 +58,7 @@ static inline void core_action_run(i18n_str_id_t menu) { } } -const uint8_t* ec_uncompress_key(const ecdsa_curve *curve, const uint8_t* pub_key, uint8_t out[ECC256_POINT_SIZE]); -const uint8_t EXAMPLE_PRIV[] = { - 0x90, 0xf4, 0x55, 0x61, 0xb5, 0xa4, 0x3d, 0xa2, 0x7f, 0x35, 0x70, 0x63, 0x48, 0xbf, 0x86, 0xa4, - 0x75, 0x9b, 0x23, 0x8a, 0x58, 0xa0, 0xed, 0xdb, 0x24, 0x2a, 0xa2, 0x64, 0xd0, 0xf0, 0x2f, 0x55, -}; -const uint8_t EXAMPLE_PUB[] = { - 0x03, - 0xf2, 0x56, 0xc6, 0xe6, 0xc8, 0x0b, 0x21, 0x3f, 0x2a, 0xa0, 0xb0, 0x17, 0x44, 0x23, 0x5d, 0x51, - 0x5c, 0x59, 0x44, 0x35, 0xbe, 0x65, 0x1b, 0x15, 0x88, 0x3a, 0x10, 0xdd, 0x47, 0x2f, 0xa6, 0x46, - - 0xce, 0x62, 0xea, 0xf3, 0x67, 0x0d, 0xc5, 0xcb, 0x91, 0x00, 0xa0, 0xca, 0x2a, 0x55, 0xb2, 0xc1, - 0x47, 0xc1, 0xe9, 0xa3, 0x8c, 0xe4, 0x28, 0x87, 0x8e, 0x7d, 0x46, 0xe1, 0xfb, 0x71, 0x4a, 0x99, -}; - void core_task_entry(void* pvParameters) { - uint8_t out[ECC256_POINT_SIZE + 1]; - //ecdsa_get_public_key65(&secp256k1, EXAMPLE_PRIV, out); - ec_uncompress_key(&secp256k1, EXAMPLE_PUB, out); - if (hal_gpio_get(GPIO_SMARTCARD_PRESENT) == GPIO_RESET) { pwr_shutdown(); }