Skip to content

Replace rust-crypto with RustCrypto#1573

Merged
quentinlesceller merged 3 commits into
mimblewimble:masterfrom
quentinlesceller:rand
Sep 25, 2018
Merged

Replace rust-crypto with RustCrypto#1573
quentinlesceller merged 3 commits into
mimblewimble:masterfrom
quentinlesceller:rand

Conversation

@quentinlesceller

@quentinlesceller quentinlesceller commented Sep 21, 2018

Copy link
Copy Markdown
Member

@garyyu

garyyu commented Sep 24, 2018

Copy link
Copy Markdown
Contributor

Indeed, it could be a problem with rust-crypto since its last update was 2 years ago and the last merged PR was 7th Sep. 2016.

But looks like there's no better choice so far.

The RustCrypt crate seems quite new, I'm afraid it could be still buggy, just my feeling.

I see rust-bitcoin project is also still using rust-crypto:

https://github.com/rust-bitcoin/rust-bitcoin/blob/master/Cargo.toml#L26

I'm not against this replacement, just want to inform these info 😃

@garyyu

garyyu commented Sep 24, 2018

Copy link
Copy Markdown
Contributor

I have a bad idea: we clone rust-crypto into mimblewimble and start maintain it by ourselves, since this crate is quite important for Grin.

Anybody second me?

@sesam

sesam commented Sep 24, 2018

Copy link
Copy Markdown
Contributor

@garyyu there should another branch in the new crypto lib repo where all the new stuff is, and that's likely what we should use. IIRC

@garyyu

garyyu commented Sep 24, 2018

Copy link
Copy Markdown
Contributor

@sesam

there should another branch in the new crypto lib repo where all the new stuff is

What do you mean the new crypto lib repo?

@sesam

sesam commented Sep 24, 2018 via email

Copy link
Copy Markdown
Contributor

@quentinlesceller

Copy link
Copy Markdown
Member Author

It's just that rust-crypto relies on old dependencies and is unmaintained since two years.
Whereas https://crates.io/crates/sha2 is two years old (so not that new) and relies on modern dependencies.

@mcdallas

Copy link
Copy Markdown
Contributor

I have a bad idea: we clone rust-crypto into mimblewimble and start maintain it by ourselves, since this crate is quite important for Grin.

Anybody second me?

I think the idea is to migrate to https://github.com/rust-bitcoin/bitcoin_hashes once it's ready (according to this)

@antiochp

Copy link
Copy Markdown
Member

@mcdallas good catch - I knew we'd discussed something as a replacement but couldn't remember where/what it was...

@garyyu

garyyu commented Sep 25, 2018

Copy link
Copy Markdown
Contributor

So, we'd better open an issue and leave it there to remind us this https://github.com/rust-bitcoin/bitcoin_hashes .

But I feel this bitcoin_hashes is not at progress state, and the once it's ready could become a dream and wake for nothing?

Again, nobody second me to clone rust-crypto to mimblewimble? 😄

@quentinlesceller

Copy link
Copy Markdown
Member Author

I don't see the issue with using RustCrypto/Hashes/HMac instead of rust-crypto. And I don't see why bitcoin_hashes would be better a better replacement (except maybe less dependencies).

@sesam

sesam commented Sep 25, 2018 via email

Copy link
Copy Markdown
Contributor

@apoelstra

Copy link
Copy Markdown

I just need @TheBlueMatt (nudge, nudge) to merge the open PRs on bitcoin_hashes, then I think it will be done and in maintenance mode.

@knocte

knocte commented Sep 25, 2018

Copy link
Copy Markdown

It's just that rust-crypto relies on old dependencies and is unmaintained since two years.
Whereas https://crates.io/crates/sha2 is two years old (so not that new) and relies on modern dependencies.

This reasoning should be written in the commit message, not only in the PR history.

@ignopeverell

Copy link
Copy Markdown
Contributor

@garyyu that's a lot of risky code to maintain when we only use a fraction of it.

This PR is a net improvement, possibly with more improvements to come. So let's merge.

@quentinlesceller quentinlesceller merged commit e55c3d2 into mimblewimble:master Sep 25, 2018
@quentinlesceller quentinlesceller deleted the rand branch September 25, 2018 20:24
@mcdallas mcdallas mentioned this pull request Nov 8, 2018
Makaric pushed a commit to Makaric/bitgrin that referenced this pull request May 16, 2026
* Replace rust-crypto with RustCrypto
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.

8 participants