Skip to content

rust-crypto dependency removal#85

Merged
tomaka merged 7 commits into
paritytech:masterfrom
cheme:RustCrypto2
May 3, 2019
Merged

rust-crypto dependency removal#85
tomaka merged 7 commits into
paritytech:masterfrom
cheme:RustCrypto2

Conversation

@cheme
Copy link
Copy Markdown
Collaborator

@cheme cheme commented Nov 30, 2018

This PR superseed #14 , is part of #80 split. Related to #84 .

It covers 'rust-crypto' crate removal.

'RustCrypto' crate is used :

  • for some hashing function (not really a new dependency for parity eth)
  • aes ecb
  • aes ctr
    The change to ctr is probably the more impacting for parity-ethereum.

I could also adopt a conservative approach and restore old unmaintained AES rust-crypto implementation and put RustCrypto in an alternative implementation crate.

Also worth remembering that we can enable aes-ni while building with RUSTFLAGS="-C target-feature=+aes,+sse2,+ssse3", for improved performances :

aes_ctr/10000           time:   [3.5767 us 3.5778 us 3.5789 us]                           
                        change: [-98.174% -98.174% -98.173%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 3 outliers among 100 measurements (3.00%)
  3 (3.00%) high mild
aes_ctr/100000          time:   [36.707 us 36.740 us 36.778 us]                            
                        change: [-98.091% -98.089% -98.087%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 14 outliers among 100 measurements (14.00%)

Comment thread parity-crypto/src/hmac.rs Outdated

#[cfg(test)]
#[macro_export]
macro_rules! tests_hmac {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like we don't need this macro now?

Also by the way, you can create a separate test file and use mod with path attribute to include it multiple times. That should make everyone's formatter much happier.

Copy link
Copy Markdown
Collaborator Author

@cheme cheme Dec 3, 2018

Choose a reason for hiding this comment

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

Thanks for the 'path' suggestion, it will be so much cleaner.

@tomaka
Copy link
Copy Markdown
Contributor

tomaka commented Apr 29, 2019

Could we revive this PR? It probably needs some master merging.

@cheme
Copy link
Copy Markdown
Collaborator Author

cheme commented Apr 29, 2019

no problem, will be updating that this afternoon 👍

Comment thread parity-crypto/src/aes.rs Outdated
Co-Authored-By: cheme <emericchevalier.pro@gmail.com>
@tomaka
Copy link
Copy Markdown
Contributor

tomaka commented May 2, 2019

I don't know if anyone is watching this PR.
We have two positive reviews, so if anyone wants to review this as well, please express yourself here, otherwise I suggest we merge this in 24 hours.

@tomaka tomaka merged commit e118891 into paritytech:master May 3, 2019
ordian added a commit that referenced this pull request May 6, 2019
* master:
  Bump fixed-hash to 0.3.2 (#134)
  Use EntropyRng instead of OsRng (#130)
  Bump parity-crypto to 0.3.1 (#132)
  rust-crypto dependency removal (#85)
  Use newly stablized TryFrom trait for primitive-types (#127)
  change dependencies of `keccak-hash`and `trie-standardmap` (#111)
  bring appveyor back (#118)
  Extract `should_replace` from Scoring and supply pooled txs from same sender (#116)
ordian added a commit that referenced this pull request May 6, 2019
* master:
  Bump fixed-hash to 0.3.2 (#134)
  Use EntropyRng instead of OsRng (#130)
  Bump parity-crypto to 0.3.1 (#132)
  rust-crypto dependency removal (#85)
  Use newly stablized TryFrom trait for primitive-types (#127)
ordian added a commit that referenced this pull request May 7, 2019
* master:
  uint: faster mul by u64 (#125)
  fix rocksdb block cache size (#122)
  uint: convert benchmarks to criterion  (#123)
  Bump fixed-hash to 0.3.2 (#134)
  Use EntropyRng instead of OsRng (#130)
  Bump parity-crypto to 0.3.1 (#132)
  rust-crypto dependency removal (#85)
  Use newly stablized TryFrom trait for primitive-types (#127)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants