Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to chacha20-poly1305 crate #89

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 67 additions & 51 deletions Cargo.lock

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

5 changes: 3 additions & 2 deletions protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ rust-version = "1.63.0"
default = ["std"]
async = ["std", "futures/std"]
tokio = ["std", "tokio/io-util"]
std = ["alloc", "bitcoin/std", "rand/std", "rand/std_rng"]
alloc = []
std = ["alloc", "bitcoin/std", "chacha20-poly1305/std", "rand/std", "rand/std_rng"]
alloc = ["chacha20-poly1305/alloc"]

[dependencies]
futures = { version = "0.3.30", default-features = false, optional = true }
# Must be under 1.39.0 due to MSRV 1.63.0 requirement.
tokio = { version = ">=1.37.0, <1.39.0", default-features = false, optional = true }
rand = { version = "0.8.0", default-features = false }
bitcoin = { version = "0.32.4", default-features = false }
chacha20-poly1305 = { version = "0.1.1", default-features = false }

[dev-dependencies]
hex = { package = "hex-conservative", version = "0.2.0" }
Expand Down
2 changes: 0 additions & 2 deletions protocol/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ BIP324 elects to use the ChaCha20Poly1305 Authenticated Encryption with Addition

Poly1305 is a purpose-built MAC, as opposed to something like an HMAC using SHA256 which leverages an existing hash scheme to build a message authentication code. Purpose-built introduces new complexity, but also allows for increased performance.

ChaCha20 and Poly1305 are both implemented in this crate to keep dependencies to a minimum.

## Development

The implementation is tested against vectors from the BIP324 reference and a number of additional library tests.
Expand Down
Loading
Loading