Git Product home page Git Product logo

Comments (13)

str4d avatar str4d commented on June 23, 2024 3

The fix has been backported as bitvec 0.18.4, so you should now be able to cargo update to address this.

from elliptic-curves.

tarcieri avatar tarcieri commented on June 23, 2024 1

Yes, we're now pulling in bitvec by way of the ff crate.

This is actually a superfluous dependency (at least at present). I opened this issue about making bitvec an optional dependency of ff:

zkcrypto/ff#42

from elliptic-curves.

alistair23 avatar alistair23 commented on June 23, 2024 1

Just an update, this seems to be fixed with a PR for Radium: ferrilab/radium#4

from elliptic-curves.

alistair23 avatar alistair23 commented on June 23, 2024

The current v0.4.1 release doesn't have the dependency, so it must be a change between v0.5.0 ad v0.6.0 of elliptic-curve.

This is probably the commit that causes the requirement on atomics: RustCrypto/traits@59e67e0

It would be great if signing and other operations could be supported without atomics via a feature flag.

from elliptic-curves.

alistair23 avatar alistair23 commented on June 23, 2024

That would be great!

from elliptic-curves.

alistair23 avatar alistair23 commented on June 23, 2024

Otherwise I don't think signing is possible, I just keep getting this error when trying to call try_sign_recoverable_prehashed():

error[E0599]: no method named `try_sign_recoverable_prehashed` found for struct `ecdsa::signer::Signer<p256::NistP256>` in the current scope
   --> examples-features/ctap.rs:410:30
    |
410 |             let sig = signer.try_sign_recoverable_prehashed(data, None).unwrap();
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `ecdsa::signer::Signer<p256::NistP256>`

error: aborting due to 2 previous errors; 6 warnings emitted

from elliptic-curves.

tarcieri avatar tarcieri commented on June 23, 2024

@alistair23 that method doesn't exist in the p256 crate (it's a private, inherent method in the k256 crate alone).

Here's a usage example:

https://docs.rs/p256/0.5.0-rc/p256/ecdsa/index.html#signingverification-example

from elliptic-curves.

alistair23 avatar alistair23 commented on June 23, 2024

Thanks @tarcieri, unfortunately the new sign() function depends on arithmetic which requires atomics.

from elliptic-curves.

tarcieri avatar tarcieri commented on June 23, 2024

Yeah, you need the ecdsa feature enabled in order to create signatures, which depends on arithmetic.

There's not that much that can be done about that immediately. I'd say stay on p256 0.4 until either ferrilab/radium#4 is merged and bitvec updated, and/or zkcrypto/ff#42 is merged and we can disable the bitvec dependency.

from elliptic-curves.

alistair23 avatar alistair23 commented on June 23, 2024

Hopefully one (or both) of those will be merged soon. Until then it looks like only sign_with_rng() is available, which doesn't appear to work without std.

from elliptic-curves.

tarcieri avatar tarcieri commented on June 23, 2024

@alistair23 sign_with_rng doesn't need std. If you're seeing std linkage, it's probably because some other dependency of yours is activating the std feature of rand_core.

However, sign_with_rng also needs the ecdsa feature (and with it arithmetic) and is documented as such:

https://docs.rs/p256/0.5.0-rc/p256/ecdsa/type.SigningKey.html

This is supported on crate features ecdsa-core and ecdsa only.

from elliptic-curves.

alistair23 avatar alistair23 commented on June 23, 2024

This has been fixed: ferrilab/radium#3

Do you mind updating the crate dependencies?

from elliptic-curves.

tarcieri avatar tarcieri commented on June 23, 2024

Unfortunately it’s a deep transitive dependency. Looks like bitvec needs to update to radium v0.5 then ff needs to update to a new release of bitvec. After that group needs to upgrade ff, and then elliptic-curve can update ff and group.

from elliptic-curves.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.