mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 22:38:08 +00:00
fix tools and gui
This commit is contained in:
parent
0590192536
commit
6f66162e93
@ -4,8 +4,14 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
TARGET = gui
|
||||
TEMPLATE = app
|
||||
|
||||
SOURCES += ../bip32.c ../bip39.c ../sha2.c ../pbkdf2.c ../hmac.c ../rand.c ../bignum.c ../ecdsa.c ../ripemd160.c ../base58.c ../secp256k1.c ../nist256p1.c mainwindow.cpp main.cpp
|
||||
SOURCES += ../bip32.c ../bip39.c ../sha2.c ../pbkdf2.c ../hmac.c ../rand.c ../bignum.c ../ecdsa.c ../ripemd160.c ../base58.c ../secp256k1.c ../nist256p1.c ../curves.c ../ed25519-donna/ed25519.c mainwindow.cpp main.cpp
|
||||
|
||||
HEADERS += mainwindow.h ../bip32.h ../bip39.h
|
||||
|
||||
FORMS += mainwindow.ui
|
||||
|
||||
INCLUDEPATH += ..
|
||||
INCLUDEPATH += ../ed25519-donna
|
||||
|
||||
DEFINES += ED25519_CUSTOMRANDOM=1
|
||||
DEFINES += ED25519_CUSTOMHASH=1
|
||||
|
@ -5,6 +5,7 @@ extern "C" {
|
||||
#include "../bip32.h"
|
||||
#include "../bip39.h"
|
||||
#include "../ecdsa.h"
|
||||
#include "../curves.h"
|
||||
}
|
||||
|
||||
bool root_set = false;
|
||||
@ -35,7 +36,7 @@ void MainWindow::on_buttonLoad_clicked()
|
||||
}
|
||||
uint8_t seed[64];
|
||||
mnemonic_to_seed(ui->editMnemonic->text().toLocal8Bit().data(), ui->editPassphrase->text().toLocal8Bit().data(), seed, 0);
|
||||
hdnode_from_seed(seed, 64, &root);
|
||||
hdnode_from_seed(seed, 64, SECP256K1_NAME, &root);
|
||||
root_set = true;
|
||||
ui->spinAccount->setValue(1);
|
||||
on_spinAccount_valueChanged(1);
|
||||
|
@ -25,7 +25,7 @@ CFLAGS += $(OPTFLAGS) \
|
||||
|
||||
all: xpubaddrgen mktable bip39bruteforce
|
||||
|
||||
OBJS = ../bip32.o ../bip39.o ../ecdsa.o ../sha2.o ../bignum.o ../base58.o ../secp256k1.o ../nist256p1.o ../ripemd160.o ../hmac.o ../rand.o ../pbkdf2.o
|
||||
OBJS = ../bip32.o ../bip39.o ../ecdsa.o ../sha2.o ../bignum.o ../base58.o ../secp256k1.o ../nist256p1.o ../ripemd160.o ../hmac.o ../rand.o ../pbkdf2.o ../curves.o ../ed25519-donna/ed25519.o
|
||||
|
||||
%.o: %.c %.h options.h
|
||||
$(CC) $(CFLAGS) -o $@ -c $<
|
||||
|
@ -1,9 +1,10 @@
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <string.h>
|
||||
#include <bip39.h>
|
||||
#include <bip32.h>
|
||||
#include <ecdsa.h>
|
||||
#include "bip39.h"
|
||||
#include "bip32.h"
|
||||
#include "ecdsa.h"
|
||||
#include "curves.h"
|
||||
|
||||
char passphrase[256];
|
||||
uint8_t seed[512 / 8];
|
||||
@ -47,7 +48,7 @@ int main(int argc, char **argv)
|
||||
count++;
|
||||
passphrase[len - 1] = 0;
|
||||
mnemonic_to_seed(mnemonic, passphrase, seed, NULL);
|
||||
hdnode_from_seed(seed, 512 / 8, &node);
|
||||
hdnode_from_seed(seed, 512 / 8, SECP256K1_NAME, &node);
|
||||
hdnode_private_ckd_prime(&node, 44);
|
||||
hdnode_private_ckd_prime(&node, 0);
|
||||
hdnode_private_ckd_prime(&node, 0);
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include "bignum.h"
|
||||
#include "ecdsa.h"
|
||||
#include "rand.h"
|
||||
#include "bip32.h"
|
||||
|
||||
/*
|
||||
* This program prints the contents of the ecdsa_curve.cp array.
|
||||
@ -16,7 +17,7 @@ int main(int argc, char **argv) {
|
||||
return 1;
|
||||
}
|
||||
const char *name = argv[1];
|
||||
const ecdsa_curve *curve = get_curve_by_name(name);
|
||||
const curve_info *curve = get_curve_by_name(name);
|
||||
if (curve == 0) {
|
||||
printf("Unknown curve '%s'\n", name);
|
||||
return 1;
|
||||
|
@ -2,8 +2,8 @@
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include <inttypes.h>
|
||||
#include <bip32.h>
|
||||
#include <ecdsa.h>
|
||||
#include "bip32.h"
|
||||
#include "ecdsa.h"
|
||||
|
||||
void process_job(uint32_t jobid, const char *xpub, uint32_t change, uint32_t from, uint32_t to)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user