go-libp2p-core/crypto
Steven Allen 648dc3fba2
feat: harden encoding/decoding functions against panics (#243)
* feat: harden encoding/decoding functions against panics

Part of https://github.com/libp2p/go-libp2p/issues/1389

These kinds of functions:

1. Handle user input.
2. Often have out-of-bounds, null pointer, etc bugs.
3. Have completely isolated logic where local panics are unlikely to
   cause memory corruption elsewhere.

* test: add a panic catcher test
2022-04-18 12:40:37 -07:00
..
pb Signed envelopes & routing records (#73) 2020-02-10 14:53:24 -05:00
test_data Absorb go-libp2p abstractions and core types into this module (#1) 2019-05-22 18:31:11 +01:00
bench_test.go fix benchmark of key verifications (#190) 2021-03-30 16:14:00 -07:00
ecdsa_test.go generate ecdsa public key from an input public key (#219) 2021-12-01 23:24:12 -08:00
ecdsa.go feat: harden encoding/decoding functions against panics (#243) 2022-04-18 12:40:37 -07:00
ed25519_test.go remove deprecated Bytes method from the Key interface (#204) 2021-07-22 12:18:09 -07:00
ed25519.go feat: harden encoding/decoding functions against panics (#243) 2022-04-18 12:40:37 -07:00
fixture_test.go remove deprecated Bytes method from the Key interface (#204) 2021-07-22 12:18:09 -07:00
key_not_openssl.go sync: update CI config files (#209) 2021-08-22 08:55:33 -07:00
key_openssl.go feat: harden encoding/decoding functions against panics (#243) 2022-04-18 12:40:37 -07:00
key_test.go remove deprecated key stretching struct / function (#203) 2021-07-22 12:28:42 -07:00
key.go remove deprecated key stretching struct / function (#203) 2021-07-22 12:28:42 -07:00
openssl_common.go sync: update CI config files (#209) 2021-08-22 08:55:33 -07:00
rsa_common.go Rename constant for weak RSA key environment variable 2019-08-01 19:05:47 -04:00
rsa_go.go feat: harden encoding/decoding functions against panics (#243) 2022-04-18 12:40:37 -07:00
rsa_openssl.go sync: update CI config files (#209) 2021-08-22 08:55:33 -07:00
rsa_test.go remove deprecated Bytes method from the Key interface (#204) 2021-07-22 12:18:09 -07:00
secp256k1_test.go remove deprecated Bytes method from the Key interface (#204) 2021-07-22 12:18:09 -07:00
secp256k1.go feat: harden encoding/decoding functions against panics (#243) 2022-04-18 12:40:37 -07:00