Skip to content

Commit

Permalink
feat(net): add Framed ECIES implementation (#80)
Browse files Browse the repository at this point in the history
* feat(net): add ecies crate

* cargo fmt

* add hex-literal and proptest to dev-dependencies

 * adds std feature to reth-rlp

* document util

* document more

* chore: allow missing docs in ecies/algorith.rs

* feat(ecies): improve error handling

remove anyhow and strictly type all errors

* refactor(ecies): movem ingress/egress to lib.rs

* chore(ecies): allow missing docs in mac

* chore(ecies): cleanup utils

* refactor(ecies): move ECIES Codec to separate file

* refactor(ecies): rename proto to stream

* add test scaffold

* implement server/client read/write test

* chore: clippy / fmt

Co-authored-by: Georgios Konstantopoulos <[email protected]>
  • Loading branch information
Rjected and gakonst committed Oct 16, 2022
1 parent 07a83b1 commit 5dfe5ac
Show file tree
Hide file tree
Showing 10 changed files with 1,541 additions and 3 deletions.
201 changes: 198 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ members = [
"crates/executor",
"crates/interfaces",
"crates/net/p2p",
"crates/net/ecies",
"crates/net/eth-wire",
"crates/net/rpc",
"crates/net/rpc-api",
Expand Down
43 changes: 43 additions & 0 deletions crates/net/ecies/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[package]
name = "reth-ecies"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/foundry-rs/reth"
readme = "README.md"

[dependencies]
reth-rlp = { path = "../../common/rlp", features = ["derive", "ethereum-types", "std"] }
reth-primitives = { path = "../../primitives" }

futures = "0.3.24"
thiserror = "1.0.37"
tokio = { version = "1.21.2", features = ["full"] }
tokio-stream = "0.1.11"
tokio-util = { version = "0.7.4", features = ["codec"] }

educe = "0.4.19"
hex = "0.4.3"
tracing = "0.1.37"

# HeaderBytes
generic-array = "0.14.6"
typenum = "1.15.0"
byteorder = "1.4.3"
bytes = "1.2.1"

# crypto
rand = "0.8.5"
ctr = "0.9.2"
digest = "0.10.5"
secp256k1 = { version = "0.24.0", features = ["global-context", "rand-std", "recovery"] }
sha2 = "0.10.6"
sha3 = "0.10.5"
aes = "0.8.1"
hmac = "0.12.1"
block-padding = "0.3.2"
cipher = { version = "0.4.3", features = ["block-padding"] }

[dev-dependencies]
hex-literal = "0.3.4"
proptest = "1.0.0"
Loading

0 comments on commit 5dfe5ac

Please sign in to comment.