Skip to content

rust-libp2p related changes part 2#39

Closed
vmx wants to merge 3 commits into
masterfrom
blake2
Closed

rust-libp2p related changes part 2#39
vmx wants to merge 3 commits into
masterfrom
blake2

Conversation

@vmx

@vmx vmx commented Nov 8, 2019

Copy link
Copy Markdown
Member

This is a backport of rust-libp2p commit ad0807b3f3588f2a3f507d6e948932a476ca0753, which adds BLAKE2 support.

ebkalderon and others added 2 commits November 8, 2019 19:09
This commit is a backport of rust-libp2p commit [ad0807b3f3588f2a3f507d6e948932a476ca0753].

[ad0807b3f3588f2a3f507d6e948932a476ca0753]: libp2p/rust-libp2p@ad0807b

Original commit message:

---

Use unsigned-varints, add BLAKE2 support in multihash (#525)

* Add support for unsigned varints

* Depend on unsigned-varint 0.2 without default features

* Change hash code type from u8 to u64

* Fix hash codes and enum variants for BLAKE2 to fit the standard (see #524)

* Run cargo fmt on crate

* Expand hash_types test to include all variants

* Add support for BLAKE2b-512 and BLAKE2s-256

* Depend on blake2 crate 0.7 with no default features

* Update encode! macro for support for blake2 crate

* Update all tests to include BLAKE2b-512 and BLAKE2s-256

* Reduce hash code size from u64 to u16

* Fix typo in doc comment

* Bump tiny-keccak to version 1.4

* Remove unnecessary default-features = false in Cargo.toml
@vmx vmx requested a review from dignifiedquire November 8, 2019 18:21
Comment thread Cargo.toml
edition = "2018"

[dependencies]
blake2 = { version = "0.7", default-features = false }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use blake2b_simd and blake2s_simd instead. I know this changes what rust-libp2p does, but they are much better in terms of performance

@vmx

vmx commented Dec 20, 2019

Copy link
Copy Markdown
Member Author

Those changes got merged with #40.

@vmx vmx closed this Dec 20, 2019
@vmx vmx deleted the blake2 branch January 13, 2020 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants