39 lines
1021 B
TOML
Raw Normal View History

[package]
name = "libp2p-noise"
description = "Cryptographic handshake protocol using the noise framework."
version = "0.27.0"
authors = ["Parity Technologies <admin@parity.io>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
edition = "2018"
[dependencies]
Spec-compliant noise handshake payloads (Step 1). (#1658) * Support spec-compliant reading of noise handshake payloads. See https://github.com/libp2p/rust-libp2p/issues/1631. This the first of a three-step process to addressing the issue. In this step, support for reading noise handshake payloads without an additional length prefix is added, falling back to attempting a decoding with length prefix on failure. Length prefixes are still sent in this step. Hence interoperability with other libp2p implementations is not yet achieved after with step. To achieve a better separation of handshake and transport I/O, the `NoiseFramed` type has been extracted from `NoiseOutput`. `NoiseFramed` is a `Sink` and `Stream` of length-delimited Noise protocol messages. This type is used in the handshake phase. Once a handshake completes the underlying Noise session transitions to transport mode and the `NoiseFramed` is wrapped in the `NoiseOutput` which provides a regular `AsyncRead` / `AsyncWrite` I/O resource on top of the framed encoding. No new buffers are introduced, they are just split between `NoiseFramed` and `NoiseOutput`. The second step involves removing the sending of the length prefix in a subsequent release. The third step involves removing the support for reading length-prefixed protobuf payloads. * Small cleanup. * Reuse frame decryption buffer. Since frames are consumed one-by-one, `NoiseFramed` can have a `BytesMut` decryption buffer, handing out immutable `Bytes` views for each decrypted message. Since each view gets fully consumed and dropped before the next frame is read, the `BytesMut` decryption buffer in `NoiseFramed` can always reuse the same buffer, only growing it as necessary. * Simplify. * Add missing inner poll_flush(). * Improve nested length detection. * Avoid unnecessary clearing of send buffers. Thus reducing the necessary zeroing of send buffers on resize, as per the previous behaviour. * Prepare release.
2020-07-17 12:27:30 +02:00
bytes = "0.5"
curve25519-dalek = "3.0.0"
futures = "0.3.1"
lazy_static = "1.2"
libp2p-core = { version = "0.25.0", path = "../../core" }
log = "0.4"
2020-01-23 11:06:11 +01:00
prost = "0.6.1"
2020-01-02 10:48:51 +01:00
rand = "0.7.2"
sha2 = "0.9.1"
static_assertions = "1"
x25519-dalek = "1.1.0"
Update the stable-futures branch to master (#1288) * Configurable multistream-select protocol. Add V1Lazy variant. (#1245) Make the multistream-select protocol (version) configurable on transport upgrades as well as for individual substreams. Add a "lazy" variant of multistream-select 1.0 that delays sending of negotiation protocol frames as much as possible but is only safe to use under additional assumptions that go beyond what is required by the multistream-select v1 specification. * Improve the code readability of the chat example (#1253) * Add bridged chats (#1252) * Try fix CI (#1261) * Print Rust version on CI * Don't print where not appropriate * Change caching strategy * Remove win32 build * Remove win32 from list * Update libsecp256k1 dep to 0.3.0 (#1258) * Update libsecp256k1 dep to 0.3.0 * Sign now cannot fail * Upgrade url and percent-encoding deps to 2.1.0 (#1267) * Upgrade percent-encoding dep to 2.1.0 * Upgrade url dep to 2.1.0 * Revert CIPHERS set to null (#1273) * Update dependency versions (#1265) * Update versions of many dependencies * Bump version of rand * Updates for changed APIs in rand, ring, and webpki * Replace references to `snow::Session` `Session` no longer exists in `snow` but the replacement is two structs `HandshakeState` and `TransportState` Something will have to be done to harmonize `NoiseOutput.session` * Add precise type for UnparsedPublicKey * Update data structures/functions to match new snow's API * Delete diff.diff Remove accidentally committed diff file * Remove commented lines in identity/rsa.rs * Bump libsecp256k1 to 0.3.1 * Implement /plaintext/2.0.0 (#1236) * WIP * plaintext/2.0.0 * Refactor protobuf related issues to compatible with the spec * Rename: new PlainTextConfig -> PlainText2Config * Keep plaintext/1.0.0 as PlainText1Config * Config contains pubkey * Rename: proposition -> exchange * Add PeerId to Exchange * Check the validity of the remote's `Exchange` * Tweak * Delete unused import * Add debug log * Delete unused field: public_key_encoded * Delete unused field: local * Delete unused field: exchange_bytes * The inner instance should not be public * identity::Publickey::Rsa is not available on wasm * Delete PeerId from Config as it should be generated from the pubkey * Catch up for #1240 * Tweak * Update protocols/plaintext/src/error.rs Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com> * Update protocols/plaintext/src/handshake.rs Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com> * Update protocols/plaintext/src/error.rs Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com> * Update protocols/plaintext/src/error.rs Co-Authored-By: Roman Borschel <romanb@users.noreply.github.com> * Update protocols/plaintext/src/error.rs Co-Authored-By: Roman Borschel <romanb@users.noreply.github.com> * Rename: pubkey -> local_public_key * Delete unused error * Rename: PeerIdValidationFailed -> InvalidPeerId * Fix: HandShake -> Handshake * Use bytes insteadof Publickey to avoid code duplication * Replace with ProtobufError * Merge HandshakeContext<()> into HandshakeContext<Local> * Improve the peer ID validation to simplify the handshake * Propagate Remote to allow extracting the PeerId from the Remote * Collapse the same kind of errors into the variant * [noise]: `sodiumoxide 0.2.5` (#1276) Fixes https://github.com/RustSec/advisory-db/pull/192 * examples/ipfs-kad.rs: Remove outdated reference to `without_init` (#1280) * CircleCI Test Fix (#1282) * Disabling "Docker Layer Caching" because it breaks one of the circleci checks * Bump to trigger CircleCI build * unbump * zeroize: Upgrade to v1.0 (#1284) v1.0 final release is out. Release notes: https://github.com/iqlusioninc/crates/pull/279 * *: Consolidate protobuf scripts and update to rust-protobuf 2.8.1 (#1275) * *: Consolidate protobuf generation scripts * *: Update to rust-protobuf 2.8.1 * *: Mark protobuf generated modules with '_proto' * examples: Add distributed key value store (#1281) * examples: Add distributed key value store This commit adds a basic distributed key value store supporting GET and PUT commands using Kademlia and mDNS. * examples/distributed-key-value-store: Fix typo * Simple Warning Cleanup (#1278) * Cleaning up warnings - removing unused `use` * Cleaning up warnings - unused tuple value * Cleaning up warnings - removing dead code * Cleaning up warnings - fixing deprecated name * Cleaning up warnings - removing dead code * Revert "Cleaning up warnings - removing dead code" This reverts commit f18a765e4bf240b0ed9294ec3ae5dab5c186b801. * Enable the std feature of ring (#1289)
2019-10-28 18:04:01 +01:00
zeroize = "1"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
Spec-compliant noise handshake payloads (Step 1). (#1658) * Support spec-compliant reading of noise handshake payloads. See https://github.com/libp2p/rust-libp2p/issues/1631. This the first of a three-step process to addressing the issue. In this step, support for reading noise handshake payloads without an additional length prefix is added, falling back to attempting a decoding with length prefix on failure. Length prefixes are still sent in this step. Hence interoperability with other libp2p implementations is not yet achieved after with step. To achieve a better separation of handshake and transport I/O, the `NoiseFramed` type has been extracted from `NoiseOutput`. `NoiseFramed` is a `Sink` and `Stream` of length-delimited Noise protocol messages. This type is used in the handshake phase. Once a handshake completes the underlying Noise session transitions to transport mode and the `NoiseFramed` is wrapped in the `NoiseOutput` which provides a regular `AsyncRead` / `AsyncWrite` I/O resource on top of the framed encoding. No new buffers are introduced, they are just split between `NoiseFramed` and `NoiseOutput`. The second step involves removing the sending of the length prefix in a subsequent release. The third step involves removing the support for reading length-prefixed protobuf payloads. * Small cleanup. * Reuse frame decryption buffer. Since frames are consumed one-by-one, `NoiseFramed` can have a `BytesMut` decryption buffer, handing out immutable `Bytes` views for each decrypted message. Since each view gets fully consumed and dropped before the next frame is read, the `BytesMut` decryption buffer in `NoiseFramed` can always reuse the same buffer, only growing it as necessary. * Simplify. * Add missing inner poll_flush(). * Improve nested length detection. * Avoid unnecessary clearing of send buffers. Thus reducing the necessary zeroing of send buffers on resize, as per the previous behaviour. * Prepare release.
2020-07-17 12:27:30 +02:00
snow = { version = "0.7.1", features = ["ring-resolver"], default-features = false }
[target.'cfg(target_arch = "wasm32")'.dependencies]
Spec-compliant noise handshake payloads (Step 1). (#1658) * Support spec-compliant reading of noise handshake payloads. See https://github.com/libp2p/rust-libp2p/issues/1631. This the first of a three-step process to addressing the issue. In this step, support for reading noise handshake payloads without an additional length prefix is added, falling back to attempting a decoding with length prefix on failure. Length prefixes are still sent in this step. Hence interoperability with other libp2p implementations is not yet achieved after with step. To achieve a better separation of handshake and transport I/O, the `NoiseFramed` type has been extracted from `NoiseOutput`. `NoiseFramed` is a `Sink` and `Stream` of length-delimited Noise protocol messages. This type is used in the handshake phase. Once a handshake completes the underlying Noise session transitions to transport mode and the `NoiseFramed` is wrapped in the `NoiseOutput` which provides a regular `AsyncRead` / `AsyncWrite` I/O resource on top of the framed encoding. No new buffers are introduced, they are just split between `NoiseFramed` and `NoiseOutput`. The second step involves removing the sending of the length prefix in a subsequent release. The third step involves removing the support for reading length-prefixed protobuf payloads. * Small cleanup. * Reuse frame decryption buffer. Since frames are consumed one-by-one, `NoiseFramed` can have a `BytesMut` decryption buffer, handing out immutable `Bytes` views for each decrypted message. Since each view gets fully consumed and dropped before the next frame is read, the `BytesMut` decryption buffer in `NoiseFramed` can always reuse the same buffer, only growing it as necessary. * Simplify. * Add missing inner poll_flush(). * Improve nested length detection. * Avoid unnecessary clearing of send buffers. Thus reducing the necessary zeroing of send buffers on resize, as per the previous behaviour. * Prepare release.
2020-07-17 12:27:30 +02:00
snow = { version = "0.7.1", features = ["default-resolver"], default-features = false }
[dev-dependencies]
env_logger = "0.8.1"
libp2p-tcp = { path = "../../transports/tcp", features = ["async-std"] }
Cherry-pick commits from master to stable-futures (#1296) * Implement Debug for (ed25519|secp256k1)::(Keypair|SecretKey) (#1285) * Fix possible arithmetic overflow in libp2p-kad. (#1291) When the number of active queries exceeds the (internal) JOBS_MAX_QUERIES limit, which is only supposed to bound the number of concurrent queries relating to background jobs, an arithmetic overflow occurs. This is fixed by using saturating subtraction. * protocols/plaintext: Add example on how to upgrade with PlainTextConfig1 (#1286) * [mdns] - Support for long mDNS names (Bug #1232) (#1287) * Dead code -- commenting out with a note referencing future implementation * Adding "std" feature so that cargo can build in other directories (notably `misc/mdns`, so that I could run these tests) * Permitting `PeerID` to be built from an `Identity` multihash * The length limit for DNS labels is 63 characters, as per RFC1035 * Allocates the vector with capacity for the service name plus additional QNAME encoding bytes * Added support for encoding/decoding peer IDs with an encoded length greater than 63 characters * Removing "std" from ring features Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com> * Retaining MAX_INLINE_KEY_LENGTH with comment about future usage * `segment_peer_id` consumes `peer_id` ... plus an early return for IDs that don't need to be segmented * Fixing logic * Bump most dependencies (#1268) * Bump most dependencies This actually builds 😊. * Bump all dependencies Includes the excellent work of @rschulman in #1265. * Remove use of ed25519-dalek fork * Monomorphize more dependencies * Add compatibility hack for rand Cargo allows a crate to depend on multiple versions of another, but `cargo-web` panics in that situation. Use a wrapper crate to work around the panic. * Use @tomaka’s idea for using a newer `rand` instead of my own ugly hack. * Switch to Parity master as its dependency-bumping PR has been merged. * Update some depenendencies again * Remove unwraps and `#[allow(deprecated)]`. * Remove spurious changes to dependencies Bumping minor or patch versions is not needed, and increases likelyhood of merge conflicts. * Remove some redundant Cargo.toml changes * Replace a retry loop with an expect `ed25519::SecretKey::from_bytes` will never fail for 32-byte inputs. * Revert changes that don’t belong in this PR * Remove using void to bypass ICE (#1295) * Publish 0.13.0 (#1294)
2019-11-06 16:09:15 +01:00
quickcheck = "0.9.0"
2020-06-22 11:41:28 +02:00
sodiumoxide = "0.2.5"
[build-dependencies]
prost-build = "0.6"