ZenGo-X / multi-party-ecdsa

Rust implementation of {t,n}-threshold ECDSA (elliptic curve digital signature algorithm).
GNU General Public License v3.0
966 stars 309 forks source link

Deprecate rust crypto to support m1 macs #149

Closed HRezaei closed 2 years ago

HRezaei commented 2 years ago

In the current version (master), Cargo build fails with an error like this, on M1 Mac's (Apple silicon chips):

= note: Undefined symbols for architecture arm64:
            “_rust_crypto_util_fixed_time_eq_asm”, referenced from:
                _$LT$crypto..aes_gcm..AesGcm$u20$as$u20$crypto..aead..AeadDecryptor$GT$::decrypt::hb979bb1f732ed3d2 in libcrypto-8dc36bae6f938f30.rlib(crypto-8dc36bae6f938f30.crypto.84e9466e-cgu.9.rcgu.o)
          ld: symbol(s) not found for architecture arm64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

We noticed the rust-crypto crate is deprecated. This removes the dependency to rust-crypto and uses RustCrypto crates instead. Also, there were some errors related to Rocket 0.4.2, for which we upgraded to the latest release (0.5.0-rc.1) based on this guide.

Thus this branch is now successfully built with arm64 architecture on Mac. It is also tested on Ubuntu 20.04.1 LTS 64bit.

survived commented 2 years ago

Thanks for PR, @Hrezaei! We're actually getting rid of rust-crypto and nightly rocket in #144 and gg20-examples branch. But we haven't updated gg18 examples yet, so this PR appears to be very relevant! I'll merge this PR after merging two PRs above

survived commented 2 years ago

Moved to #160