Skip to content

Commit

Permalink
Add SPDX license identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
rustaceanrob committed May 7, 2024
1 parent 86cbb76 commit eef9d68
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions protocol/src/chacha20poly1305.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

// ChaCha20 is used directly by the length cipher.
pub(crate) mod chacha20;
mod poly1305;
Expand Down
2 changes: 2 additions & 0 deletions protocol/src/chacha20poly1305/chacha20.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! The ChaCha20 stream cipher based on RFC7539.

/// The first four words (32-bit) of the ChaCha stream cipher state are constants.
Expand Down
2 changes: 2 additions & 0 deletions protocol/src/chacha20poly1305/poly1305.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! Poly1305 one-time authenticator from RFC7539.
//!
//! Implementation heavily inspired by [this implementation in C](https://github.com/floodyberry/poly1305-donna/blob/master/poly1305-donna-32.h)
Expand Down
2 changes: 2 additions & 0 deletions protocol/src/fschacha20poly1305.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use core::fmt;

use crate::chacha20poly1305::chacha20::ChaCha20;
Expand Down
2 changes: 2 additions & 0 deletions protocol/src/hkdf.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! HMAC-based Extract-and-Expand Key Derivation Function (HKDF).
//!
//! Implementation based on RFC5869, but the interface is scoped
Expand Down
2 changes: 2 additions & 0 deletions protocol/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! BIP 324 encrypted transport for exchanging Bitcoin P2P messages. Read more about the [specification](https://github.com/bitcoin/bips/blob/master/bip-0324.mediawiki).
#![no_std]

Expand Down
2 changes: 2 additions & 0 deletions protocol/tests/round_trips.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

#[test]
#[cfg(feature = "std")]
fn hello_world_happy_path() {
Expand Down
2 changes: 2 additions & 0 deletions proxy/src/bin/async.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use bip324::{Handshake, Role};
use bip324_proxy::{read_v1, read_v2, write_v1, write_v2};
use bitcoin::Network;
Expand Down
1 change: 1 addition & 0 deletions proxy/src/bin/v1.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
//! Simple V1 proxy to test hooking things up end to end.

use bip324_proxy::{read_v1, write_v1};
Expand Down
2 changes: 2 additions & 0 deletions proxy/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! Helper functions for bitcoin p2p proxies.
//!
//! The V1 and V2 p2p protocols have different header encodings, so a proxy has to do
Expand Down

0 comments on commit eef9d68

Please sign in to comment.