mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-09 06:50:58 +00:00
2c38929d03
This should make side-channel attacks much more difficult. However, 1. Timing of bn_inverse, which is used in point_add depends on input. 2. Timing of reading secp256k1_cp may depend on input due to cache. 3. The conditions in point_add are not timing attack safe. However point_add is always a straight addition, never double or some other special case. In the long run, I would like to use a specialized point_add using Jacobian representation plus a randomization when converting the first point to Jacobian representation. The Jacobian representation would also make the procedure a bit faster. |
||
---|---|---|
gui | ||
tools | ||
.gitignore | ||
aes_modes.c | ||
aes.h | ||
aescrypt.c | ||
aeskey.c | ||
aesopt.h | ||
aestab.c | ||
aestab.h | ||
AUTHORS | ||
base58.c | ||
base58.h | ||
bignum.c | ||
bignum.h | ||
bip32.c | ||
bip32.h | ||
bip39_english.h | ||
bip39.c | ||
bip39.h | ||
c.pxd | ||
CMakeLists.txt | ||
ecdsa.c | ||
ecdsa.h | ||
hmac.c | ||
hmac.h | ||
LICENSE | ||
Makefile | ||
MANIFEST.in | ||
options.h | ||
pbkdf2.c | ||
pbkdf2.h | ||
rand.c | ||
rand.h | ||
README.md | ||
ripemd160.c | ||
ripemd160.h | ||
secp256k1.c | ||
secp256k1.h | ||
setup.py | ||
sha2.c | ||
sha2.h | ||
test-openssl.c | ||
test.py | ||
tests.c | ||
TrezorCrypto.pyx |
trezor-crypto
Heavily optimized cryptography algorithms for embedded devices.
These include:
- AES/Rijndael encryption/decryption
- Big Number (256 bit) Arithmetics
- BIP32 Hierarchical Deterministic Wallets
- BIP39 Mnemonic code
- ECDSA signing/verifying (only hardcoded secp256k1 curve, uses RFC6979 for deterministic signatures)
- ECDSA public key derivation + Base58 address representation
- HMAC-SHA256 and HMAC-SHA512
- PBKDF2
- 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.