1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-01 20:08:26 +00:00

move declaration

This commit is contained in:
Pavol Rusnak 2013-10-08 21:07:53 +02:00
parent 52485b9008
commit 0fc4ad0976
3 changed files with 3 additions and 3 deletions

View File

@ -32,13 +32,10 @@
#define USE_RFC6979 1 #define USE_RFC6979 1
#endif #endif
// all functions use secp256k1 curve
int ecdsa_sign(const uint8_t *priv_key, const uint8_t *msg, uint32_t msg_len, uint8_t *sig); int ecdsa_sign(const uint8_t *priv_key, const uint8_t *msg, uint32_t msg_len, uint8_t *sig);
void ecdsa_get_public_key33(const uint8_t *priv_key, uint8_t *pub_key); void ecdsa_get_public_key33(const uint8_t *priv_key, uint8_t *pub_key);
void ecdsa_get_public_key65(const uint8_t *priv_key, uint8_t *pub_key); void ecdsa_get_public_key65(const uint8_t *priv_key, uint8_t *pub_key);
void ecdsa_get_address(const uint8_t *pub_key, char version, char *addr); void ecdsa_get_address(const uint8_t *pub_key, char version, char *addr);
int ecdsa_verify(const uint8_t *pub_key, const uint8_t *sig, const uint8_t *msg, uint32_t msg_len); int ecdsa_verify(const uint8_t *pub_key, const uint8_t *sig, const uint8_t *msg, uint32_t msg_len);
int generate_k_rfc6979(bignum256 *secret, const uint8_t *priv_key, const uint8_t *hash);
#endif #endif

1
sha2.h
View File

@ -32,6 +32,7 @@
#define __SHA2_H__ #define __SHA2_H__
#include <stdint.h> #include <stdint.h>
#include <stddef.h>
#define SHA256_BLOCK_LENGTH 64 #define SHA256_BLOCK_LENGTH 64
#define SHA256_DIGEST_LENGTH 32 #define SHA256_DIGEST_LENGTH 32

View File

@ -173,6 +173,8 @@ START_TEST(test_bip32_vector_2)
} }
END_TEST END_TEST
int generate_k_rfc6979(bignum256 *secret, const uint8_t *priv_key, const uint8_t *hash);
START_TEST(test_rfc6979) START_TEST(test_rfc6979)
{ {
int res; int res;