Skip to content
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
4 changes: 2 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ _default:
# Test feature flag matrix compatability.
@_test-features:
# Build and test with all features, no features, and some combinations if required.
cargo +{{STABLE_TOOLCHAIN}} test --package bip324 --lib --all-features
cargo +{{STABLE_TOOLCHAIN}} test --package bip324 --lib --no-default-features
cargo +{{STABLE_TOOLCHAIN}} test --package bip324 --lib --tests --all-features
cargo +{{STABLE_TOOLCHAIN}} test --package bip324 --lib --tests --no-default-features

# Check code with MSRV compiler.
@_test-msrv:
Expand Down
1 change: 1 addition & 0 deletions protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ chacha20-poly1305 = { version = "0.1.1", default-features = false }
# bitcoind version 26.0 includes support for BIP-324's V2 protocol, but it is disabled by default.
bitcoind = { package = "corepc-node", version = "0.7.1", default-features = false, features = ["26_0","download"] }
hex = { package = "hex-conservative", version = "0.2.0" }
tokio = { version = "1", features = ["io-util", "net", "rt-multi-thread", "macros"] }
13 changes: 6 additions & 7 deletions protocol/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
# Protocol
# BIP-324 Protocol

A BIP-324 library to establish and communicate over an encrypted channel.

The library is designed with a bare `no_std` and "Sans I/O" interface to keep it as agnostic as possible to application runtimes, but higher level interfaces are exposed for ease of use.
The library is designed with a bare `no_std` and *Sans I/O* interface to keep it as agnostic as possible to application runtimes, but higher level interfaces are exposed for ease of use.

The `tokio` feature includes the high-level `AsyncProcotol` type which helps create and manage an encrypted channel.

The lower-level `CipherSession` and `Handshake` types can be directly used by applications which require more control. The handshake performs the one-and-a-half round trip dance between the peers in order to generate secret materials and verify a channel. A successful handshake results in a cipher session which performs the encrypt and decrypt operations for the lifetime of the channel.
* **High-level I/O** - `io::Protocol` (sync) and `futures::Protocol` (async) handle the complete encrypted connection lifecycle including handshake, writes, and reads.
* **Low-level components** - For applications requiring more control, `Handshake` is a type-safe state machine for the handshake protocol and `CipherSession` manages encryption/decryption after the handshake.

## Feature Flags

* `std` -- Standard library dependencies for I/O, memory allocation, and random number generators.
* `tokio` -- High level I/O wrappers for asynchronous tokio runtime.
* `std` - Standard library dependencies for I/O, memory allocation, and random number generators.
* `tokio` - High level I/O wrappers for the asynchronous tokio runtime.

## Minimum Supported Rust Version (MSRV)

Expand Down
Loading