Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using libsecp256k1 rather than trezor-crypto? #1

Open
apoelstra opened this issue Jan 4, 2021 · 5 comments
Open

using libsecp256k1 rather than trezor-crypto? #1

apoelstra opened this issue Jan 4, 2021 · 5 comments

Comments

@apoelstra
Copy link

Hi,

I wonder if this project has considered using libsecp256k1 rather than trezor-crypto? libsecp is entirely constant-time, uses no dynamic memory allocations (except when constructing a precomputation context, but you can do this in a fixed slab of memory if you want), has significantly more review cycles than any other cryptography library focused on secp256k1 EC crypto. It is focused purely on Bitcoin and Bitcoin applications and is used by Bitcoin Core.

If there are pain points related to using our library in an embedded context we'd like to hear about them -- over the last 18 months we've fixed a number of issues that had complicated the embedded development story, including making it possible to compile without any libc and simplifying the process of building the library without autotools (although the latter lacks documentation.).

Andrew

@FoundationKen
Copy link
Contributor

Hi Andrew! Thanks for taking the time to look into this.

I'll add this to my list of issues to investigate. A quick look suggests that we could probably replace the few places in the code where we do signing without much trouble (just map the calls through from MicroPython to C).

I'll need to spend some time reviewing the libsecp256k1 code and compare it with trezor to see what else might be possible.

I definitely appreciate you being open to changes to support embedded development (I also saw you were open to improvements for use in embedded/nostd use cases in your Rust library, which is great).

Cheers!

@EvanWinget
Copy link

Hey Ken - just wanted to add a user’s perspective on this. I’m more confident in hardware wallets that use libsecp256k1, and I’m assuming that others feel similarly. Bitbox has been using it for 5+ years and coldcard recently adopted it in firmware 4.0.0.

Passport seems like it’s off to a great start and the QR scanning is a huge UX improvement for PSBTs!

@FoundationKen
Copy link
Contributor

FoundationKen commented Jul 7, 2021 via email

@EvanWinget
Copy link

Glad to hear it, Ken! Thanks for the response and the awesome product!

@jonathancross
Copy link

@FoundationKen Where can we follow progress on this?

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

No branches or pull requests

4 participants