Skip to content

Commit cac6368

Browse files
committed
fix: consistent documentation usage of "BIP-324"
1 parent 219c7b1 commit cac6368

File tree

10 files changed

+19
-19
lines changed

10 files changed

+19
-19
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# BIP324 Encrypted Transport Protocol
1+
# BIP-324 Encrypted Transport Protocol
22

3-
[BIP324](https://github.com/bitcoin/bips/blob/master/bip-0324.mediawiki) describes the V2 encrypted communication protocol for the bitcoin P2P network.
3+
[BIP-324](https://github.com/bitcoin/bips/blob/master/bip-0324.mediawiki) describes the V2 encrypted communication protocol for the bitcoin P2P network.
44

55
## Motivation
66

@@ -10,9 +10,9 @@ Bitcoin's original P2P protocol, "V1", was designed without any encryption. Even
1010
* Plaintext message tampering, without detection, is trivial for a man in the middle (MitM) attacker.
1111
* Nefarious actors may associate metadata, such as IP addresses and transaction origins, without explicitly having to connect directly to peers.
1212

13-
BIP 324 - "V2" - encrypted communication protects against the above issues increasing the privacy and censorship-resistance of the bitcoin ecosystem. Any applications communicating with bitcoin nodes, including light clients, should make use of the V2 protocol.
13+
BIP-324 - "V2" - encrypted communication protects against the above issues increasing the privacy and censorship-resistance of the bitcoin ecosystem. Any applications communicating with bitcoin nodes, including light clients, should make use of the V2 protocol.
1414

1515
## Packages
1616

17-
* `protocol` - Exports the `BIP324` client library.
17+
* `protocol` - Exports the `bip324` client library.
1818
* `proxy` - A small side-car application to enable V2 communication for V1-only applications.

protocol/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ bitcoin_hashes = { version ="0.15.0", default-features = false }
2727
chacha20-poly1305 = { version = "0.1.1", default-features = false }
2828

2929
[dev-dependencies]
30-
# bitcoind version 26.0 includes support for BIP324's V2 protocol, but it is disabled by default.
30+
# bitcoind version 26.0 includes support for BIP-324's V2 protocol, but it is disabled by default.
3131
bitcoind = { package = "corepc-node", version = "0.7.1", default-features = false, features = ["26_0","download"] }
3232
hex = { package = "hex-conservative", version = "0.2.0" }

protocol/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Protocol
22

3-
A BIP324 library to establish and communicate over an encrypted channel.
3+
A BIP-324 library to establish and communicate over an encrypted channel.
44

55
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.
66

protocol/doc/DESIGN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ With Bob's public key, Alice derives the shared secret and ensures the decrypted
88

99
## ChaCha20Poly1305
1010

11-
BIP324 elects to use the ChaCha20Poly1305 Authenticated Encryption with Addition Data (AEAD) algorithm under the hood. This is a combination of the ChaCha20 stream cipher and the Poly1305 message authentication code (MAC). In this context, "authentication" refers to the encrypted message's integrity, not to the identity of either party communicating.
11+
BIP-324 elects to use the ChaCha20Poly1305 Authenticated Encryption with Addition Data (AEAD) algorithm under the hood. This is a combination of the ChaCha20 stream cipher and the Poly1305 message authentication code (MAC). In this context, "authentication" refers to the encrypted message's integrity, not to the identity of either party communicating.
1212

1313
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.

protocol/src/fschacha20poly1305.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: CC0-1.0
22

33
//! Wrap ciphers with automatic re-keying in order to provide [forward secrecy](https://eprint.iacr.org/2001/035.pdf) within a session.
4-
//! Logic is covered by the BIP324 test vectors.
4+
//! Logic is covered by the BIP-324 test vectors.
55
//!
66
//! ## Performance Considerations
77
//!
@@ -51,7 +51,7 @@ impl std::error::Error for Error {
5151
/// A wrapper over ChaCha20Poly1305 AEAD stream cipher which handles automatically changing
5252
/// nonces and re-keying, providing forward secrecy within the session.
5353
///
54-
/// FSChaCha20Poly1305 is used for message packets in BIP324.
54+
/// FSChaCha20Poly1305 is used for message packets in BIP-324.
5555
#[derive(Clone)]
5656
pub struct FSChaCha20Poly1305 {
5757
key: Key,
@@ -138,7 +138,7 @@ impl FSChaCha20Poly1305 {
138138
/// A wrapper over ChaCha20 (unauthenticated) stream cipher which handles automatically changing
139139
/// nonces and re-keying, providing forward secrecy within the session.
140140
///
141-
/// FSChaCha20 is used for lengths in BIP324. Should be noted that the lengths are still
141+
/// FSChaCha20 is used for lengths in BIP-324. Should be noted that the lengths are still
142142
/// implicitly authenticated by the message packets.
143143
#[derive(Clone)]
144144
pub struct FSChaCha20 {

protocol/src/io.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ impl AsyncProtocolWriter {
444444
}
445445
}
446446

447-
/// Perform a BIP324 handshake and return ready-to-use session components.
447+
/// Perform a BIP-324 handshake and return ready-to-use session components.
448448
///
449449
/// This function handles the complete handshake process and returns the
450450
/// cryptographic ciphers and a session reader prepared for encrypted communication.

protocol/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: CC0-1.0
22

3-
//! BIP324 encrypted transport for exchanging bitcoin P2P *messages*. Much like TLS, a connection begins by exchanging ephemeral
3+
//! BIP-324 encrypted transport for exchanging bitcoin P2P *messages*. Much like TLS, a connection begins by exchanging ephemeral
44
//! elliptic curve public keys and performing a Diffie-Hellman handshake. Thereafter, each participant derives shared session secrets, and may
55
//! freely exchange encrypted packets.
66
//!
@@ -558,7 +558,7 @@ impl OutboundCipher {
558558
}
559559
}
560560

561-
/// Manages cipher state for a BIP324 encrypted connection.
561+
/// Manages cipher state for a BIP-324 encrypted connection.
562562
#[derive(Clone)]
563563
pub struct CipherSession {
564564
/// A unique identifier for the communication session.
@@ -877,7 +877,7 @@ mod tests {
877877
.unwrap();
878878
}
879879

880-
// The rest are sourced from [the BIP324 test vectors](https://github.com/bitcoin/bips/blob/master/bip-0324/packet_encoding_test_vectors.csv).
880+
// The rest are sourced from [the BIP-324 test vectors](https://github.com/bitcoin/bips/blob/master/bip-0324/packet_encoding_test_vectors.csv).
881881

882882
#[test]
883883
fn test_vector_1() {

protocol/src/serde.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
//! Serialize and deserialize V2 messages over the wire.
44
//!
5-
//! A subset of commands are represented with a single byte in V2 instead of the 12-byte ASCII encoding like V1. Message ID mappings are defined in [BIP324](https://github.com/bitcoin/bips/blob/master/bip-0324.mediawiki#user-content-v2_Bitcoin_P2P_message_structure).
5+
//! A subset of commands are represented with a single byte in V2 instead of the 12-byte ASCII encoding like V1. Message ID mappings are defined in [BIP-324](https://github.com/bitcoin/bips/blob/master/bip-0324.mediawiki#user-content-v2_Bitcoin_P2P_message_structure).
66
77
use core::fmt;
88

protocol/tests/round_trips.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ fn regtest_handshake() {
267267
receiver: from_and_recv.clone(),
268268
sender: from_and_recv,
269269
nonce: 1,
270-
user_agent: "BIP324 Client".to_string(),
270+
user_agent: "BIP-324 Client".to_string(),
271271
start_height: 0,
272272
relay: false,
273273
};
@@ -313,7 +313,7 @@ fn regtest_handshake_std() {
313313
let stream = TcpStream::connect(bitcoind.params.p2p_socket.unwrap()).unwrap();
314314

315315
// Initialize high-level protocol with handshake using the new into_bip324 method
316-
println!("Starting BIP324 handshake using into_bip324");
316+
println!("Starting BIP-324 handshake using into_bip324");
317317
let mut protocol = stream
318318
.into_bip324(
319319
bip324::Network::Regtest,
@@ -339,7 +339,7 @@ fn regtest_handshake_std() {
339339
receiver: from_and_recv.clone(),
340340
sender: from_and_recv,
341341
nonce: 1,
342-
user_agent: "BIP324 Client".to_string(),
342+
user_agent: "BIP-324 Client".to_string(),
343343
start_height: 0,
344344
relay: false,
345345
};

proxy/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "bip324-proxy"
33
version = "0.4.0"
44
edition = "2021"
55
license = "CC0-1.0"
6-
description = "BIP324 proxy enabling v1-only clients to use the v2 Bitcoin P2P Protocol"
6+
description = "BIP-324 proxy enabling v1-only clients to use the v2 bitcoin p2p protocol"
77
repository = "https://github.com/rust-bitcoin/bip324"
88
readme = "README.md"
99

0 commit comments

Comments
 (0)