You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-firmware/crypto
Andrew Kozlik 1e53a84cfc
chore(crypto): Zero-initialize stack variables in AES code.
4 weeks ago
..
aes chore(crypto): Zero-initialize stack variables in AES code. 4 weeks ago
chacha20poly1305 fix(crypto): add missing license to crypto/chacha20poly1305 2 years ago
ed25519-donna fix(crypto): add missing header for size_t 3 months ago
fuzzer refactor: Unify secp256k1_zkp usage. 10 months ago
gui build: add bip39_english.o where appropriate 2 years ago
monero fix(xmr): fix tx sending to an integrated address 2 years ago
tests test(crypto): Add AES-GCM tests. 4 weeks ago
tools fix(crypto): fix wrong input handling in mktable 2 years ago
.gitignore toplevel: reorganize .gitignore files 5 years ago
.gitmodules MONOREPO MERGE trezor-crypto 5 years ago
.gitrepo git subrepo pull crypto 5 years ago
AUTHORS MONOREPO MERGE trezor-crypto 5 years ago
CONTRIBUTORS crypto: add fuzz testing harnesses and documentation 4 years ago
LICENSE MONOREPO MERGE trezor-crypto 5 years ago
Makefile test(crypto): Add AES-GCM tests. 4 weeks ago
README.md revert(crypto): remove BCH Schnorr signatures 2 years ago
address.c feat(crypto): add thousands separator to bn_format 2 years ago
address.h feat(core,legacy): add support for Ethereum 64-bit chain_id 3 years ago
base32.c crypto: explicitly initialize variable length arrays 5 years ago
base32.h MONOREPO MERGE trezor-crypto 5 years ago
base58.c chore(crypto): remove graphene base58 functions as they are not used anywhere 2 years ago
base58.h chore(crypto): remove graphene base58 functions as they are not used anywhere 2 years ago
bignum.c fix(crypto): fix assertion 7 months ago
bignum.h feat(crypto): introduce bn_read_be_512 7 months ago
bip32.c refactor(crypto): Clean up ed25519_publickey_ext() API. 2 years ago
bip32.h feat(crypto): API for clearing internal caches 2 years ago
bip39.c fix(crypto): Fix bip39 out of bounds read. 2 years ago
bip39.h chore: rename BIP39_WORDS to BIP39_WORD_COUNT 2 years ago
bip39_english.c chore: rename BIP39_WORDS to BIP39_WORD_COUNT 2 years ago
blake2_common.h feat(crypto): add big endian support 3 years ago
blake2b.c crypto: explicitly initialize variables 5 years ago
blake2b.h MONOREPO MERGE trezor-crypto 5 years ago
blake2s.c crypto: explicitly initialize variables 5 years ago
blake2s.h MONOREPO MERGE trezor-crypto 5 years ago
blake256.c fix(crypto): Fix incorrect handling of empty input in blake256_Update(). 3 years ago
blake256.h all: remove extraneous whitespace 5 years ago
buffer.c feat(core/prodtest): Verify device certificate chain in CERTDEV WRITE. 5 months ago
buffer.h feat(core/prodtest): Verify device certificate chain in CERTDEV WRITE. 5 months ago
byte_order.h feat(crypto): add big endian support 3 years ago
cardano.c feat(crypto/cardano): implement Cardano Ledger derivation 3 years ago
cardano.h refactor(crypto): extract Cardano derivations to separate file 3 years ago
cash_addr.c crypto: explicitly initialize variables 5 years ago
cash_addr.h MONOREPO MERGE trezor-crypto 5 years ago
chacha_drbg.c feat(core): make chacha_drbg more robust 3 years ago
chacha_drbg.h feat(core): make chacha_drbg more robust 3 years ago
check_mem.h MONOREPO MERGE trezor-crypto 5 years ago
curves.c feat(crypto/cardano): implement Cardano Ledger derivation 3 years ago
curves.h feat(crypto/cardano): implement Cardano Ledger derivation 3 years ago
der.c feat(crypto): Use entire DER encoding in DER_ITEM. 5 months ago
der.h feat(core/prodtest): Check device certificate chain integrity using authority key identifier. 5 months ago
ecdsa.c feat(crypto): Use strict DER-decoding in ecdsa_sig_from_der(). 5 months ago
ecdsa.h refactor(core,crypto): make public key derivation functions return 3 years ago
ecdsa_internal.h refactor: Unify secp256k1_zkp usage. 10 months ago
groestl.c feat(crypto): Sanitize undefined behavior. 2 years ago
groestl.h ci: enable editorconfig checks, fix whitespace issues 4 years ago
groestl_internal.h fix(crypto): fix build on clang/arm64 3 years ago
hash_to_curve.c feat(crypto): implement hashing to curve 7 months ago
hash_to_curve.h feat(crypto): implement hashing to curve 7 months ago
hasher.c feat(crypto): Add TapSigHash to Hasher. 2 years ago
hasher.h feat(crypto): Add TapSigHash to Hasher. 2 years ago
hmac.c crypto: explicitly initialize variables 5 years ago
hmac.h MONOREPO MERGE trezor-crypto 5 years ago
hmac_drbg.c crypto: explicitly initialize variables 5 years ago
hmac_drbg.h crypto/hmac_drbg: Fix style. 5 years ago
memzero.c fix(crypto): update case of windows.h (#1560) 3 years ago
memzero.h MONOREPO MERGE trezor-crypto 5 years ago
nem.c feat(crypto): add thousands separator to bn_format 2 years ago
nem.h MONOREPO MERGE trezor-crypto 5 years ago
nist256p1.c crypto/bignum: change limb size to 29, add tests 4 years ago
nist256p1.h MONOREPO MERGE trezor-crypto 5 years ago
nist256p1.table crypto/bignum: change limb size to 29, add tests 4 years ago
options.h feat(crypto): Add basic DER decoding functions. 5 months ago
pbkdf2.c crypto: explicitly initialize variables 5 years ago
pbkdf2.h MONOREPO MERGE trezor-crypto 5 years ago
rand.c feat(core): Integrate Optiga into PIN verification. 7 months ago
rand.h feat(core): Integrate Optiga into PIN verification. 7 months ago
rc4.c MONOREPO MERGE trezor-crypto 5 years ago
rc4.h MONOREPO MERGE trezor-crypto 5 years ago
rfc6979.c fix(crypto): reduce digest in RFC6979 to match specification 2 years ago
rfc6979.h fix(crypto): reduce digest in RFC6979 to match specification 2 years ago
ripemd160.c crypto: explicitly initialize variables 5 years ago
ripemd160.h MONOREPO MERGE trezor-crypto 5 years ago
script.c crypto: explicitly initialize variables 5 years ago
script.h MONOREPO MERGE trezor-crypto 5 years ago
secp256k1.c crypto/bignum: change limb size to 29, add tests 4 years ago
secp256k1.h MONOREPO MERGE trezor-crypto 5 years ago
secp256k1.table crypto/bignum: change limb size to 29, add tests 4 years ago
segwit_addr.c chore(core): Use C implementation of Bech32 decode. 2 years ago
segwit_addr.h chore(core): Use C implementation of Bech32 decode. 2 years ago
setup.py MONOREPO MERGE trezor-crypto 5 years ago
sha2.c feat(crypto): Implement sha384_Raw(). 8 months ago
sha2.h feat(crypto): Implement sha384_Raw(). 8 months ago
sha3.c feat(crypto): Sanitize undefined behavior. 2 years ago
sha3.h MONOREPO MERGE trezor-crypto 5 years ago
shamir.c crypto: fix undefined behavior in shamir unbitslice (#1219) 4 years ago
shamir.h crypto/shamir: Add copyright. 5 years ago
slip39.c chore(crypto): refactor slip39 same way as bip39 12 months ago
slip39.h chore(crypto): refactor slip39 same way as bip39 12 months ago
slip39_english.c chore(crypto): refactor slip39 same way as bip39 12 months ago
slip39_wordlist.h chore(crypto): refactor slip39 same way as bip39 12 months ago
tls_prf.c feat(crypto): Implement TLS PRF with SHA-256. 8 months ago
tls_prf.h feat(crypto): Implement TLS PRF with SHA-256. 8 months ago
zkp_bip340.c refactor(crypto): remove code that is duplicated in secp256k1-zkp submodule 2 years ago
zkp_bip340.h feat(legacy): verify bip340 pubkeys used in p2tr addresses 2 years ago
zkp_context.c feat(crypto): remove -Wstrict-prototypes issues in zkp_context.c 2 years ago
zkp_context.h refactor(crypto): expose zkp_context_is_initialized 2 years ago
zkp_ecdsa.c feat(crypto): Support is_canonical parameter in zkp_ecdsa_sign_digest(). 10 months ago
zkp_ecdsa.h refactor(core,crypto): make public key derivation functions return 3 years ago

README.md

trezor-crypto

Build Status gitter

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 (supports secp256k1 and nist256p1 curves, uses RFC6979 for deterministic signatures)
  • ECDSA public key derivation
  • BIP340 Schnorr signature signing/verifying
  • Base32 (RFC4648 and custom alphabets)
  • Base58 address representation
  • Ed25519 signing/verifying (also SHA3 and Keccak variants)
  • ECDH using secp256k1, nist256p1 and Curve25519
  • HMAC-SHA256 and HMAC-SHA512
  • PBKDF2
  • RIPEMD-160
  • SHA1
  • SHA2-256/SHA2-512
  • SHA3/Keccak
  • BLAKE2s/BLAKE2b
  • Chacha20-Poly1305
  • unit tests (using Check - check.sf.net; in test_check.c)
  • tests against OpenSSL (in test_openssl.c)
  • integrated Wycheproof tests

Distibuted under MIT License.

Some parts of the library come from external sources: