mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-08-03 04:18:17 +00:00
renamed to trezor-crypto, modified readme
This commit is contained in:
parent
9205c0d952
commit
47cb0fefce
27
README
27
README
@ -1,15 +1,18 @@
|
|||||||
MicroECDSA
|
trezor-crypto
|
||||||
==========
|
=============
|
||||||
|
|
||||||
Heavily optimized ECDSA (secp256k1) signer for embedded devices.
|
Heavily optimized cryptography algorithms for embedded devices.
|
||||||
|
|
||||||
|
These include:
|
||||||
|
- Big Number (256 bit) Arithmetics
|
||||||
|
- BIP32 Hierarchical Deterministic Wallets
|
||||||
|
- Blowfish encrypt/decrypt
|
||||||
|
- ECDSA signer/verifier (only secp256k1 curve)
|
||||||
|
- ECDSA public key derivation and Base58 address representation
|
||||||
|
- HMAC-SHA256 and HMAC-SHA512
|
||||||
|
- RIPEMD-160
|
||||||
|
- SHA256/SHA512
|
||||||
|
- unit tests (using Check - check.sf.net; in tests.c)
|
||||||
|
- tests against OpenSSL (in test-openssl.c)
|
||||||
|
|
||||||
Distibuted under MIT License.
|
Distibuted under MIT License.
|
||||||
|
|
||||||
Notes
|
|
||||||
-----
|
|
||||||
|
|
||||||
a) the signer only understands secp256k1 elliptic curve
|
|
||||||
|
|
||||||
b) unit tests using Check (check.sf.net) are in tests.c
|
|
||||||
|
|
||||||
c) tests against OpenSSL are in test-openssl.c
|
|
||||||
|
@ -76,7 +76,7 @@ int main()
|
|||||||
|
|
||||||
// use our ECDSA signer to sign the message with the key
|
// use our ECDSA signer to sign the message with the key
|
||||||
if (ecdsa_sign(priv_key, msg, msg_len, sig) != 0) {
|
if (ecdsa_sign(priv_key, msg, msg_len, sig) != 0) {
|
||||||
printf("MicroECDSA signing failed\n");
|
printf("trezor-crypto signing failed\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,11 +86,11 @@ int main()
|
|||||||
|
|
||||||
// use our ECDSA verifier to verify the message signature
|
// use our ECDSA verifier to verify the message signature
|
||||||
if (ecdsa_verify(pub_key65, sig, msg, msg_len) != 0) {
|
if (ecdsa_verify(pub_key65, sig, msg, msg_len) != 0) {
|
||||||
printf("MicroECDSA verification failed (pub_key_len = 65)\n");
|
printf("trezor-crypto verification failed (pub_key_len = 65)\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (ecdsa_verify(pub_key33, sig, msg, msg_len) != 0) {
|
if (ecdsa_verify(pub_key33, sig, msg, msg_len) != 0) {
|
||||||
printf("MicroECDSA verification failed (pub_key_len = 33)\n");
|
printf("trezor-crypto verification failed (pub_key_len = 33)\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
tests.c
2
tests.c
@ -298,7 +298,7 @@ END_TEST
|
|||||||
// define test suite and cases
|
// define test suite and cases
|
||||||
Suite *test_suite(void)
|
Suite *test_suite(void)
|
||||||
{
|
{
|
||||||
Suite *s = suite_create("MicroECDSA");
|
Suite *s = suite_create("trezor-crypto");
|
||||||
TCase *tc;
|
TCase *tc;
|
||||||
|
|
||||||
tc = tcase_create("bip32");
|
tc = tcase_create("bip32");
|
||||||
|
Loading…
Reference in New Issue
Block a user