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

crypto-bigint #1

Open
tarcieri opened this issue Jun 24, 2021 · 18 comments
Open

crypto-bigint #1

tarcieri opened this issue Jun 24, 2021 · 18 comments

Comments

@tarcieri
Copy link

Hello!

I thought you might be interested in the crypto-bigint crate we've been working on as part of RustCrypto, which we are slowly beginning to use in our elliptic curve crates:

We're targeting Rust 1.51+ with it and aggressively trying to leverage both const generics and const fn as much as is possible on stable Rust.

We're targeting constant-time operation by default, with some secondary variable-time implementations explicitly called out as *_vartime.

I'm not sure we yet provide the functionality you need, or if the approach we're using (fixed-width, stack-allocated, no_std friendly big integers) actually maps well to this particular problem, but I thought I'd give it a mention.

If there's missing functionality you'd like to see implemented first, that's definitely something we'd like to know about:

https://github.com/RustCrypto/utils/issues/453

@mikelodder7
Copy link
Contributor

Cool, thanks for the heads up. I'll check it out. The first I notice is I need the ability to represent negative numbers which often affects how computations happen in groups of unknown order.

@mikelodder7
Copy link
Contributor

Crypto-bigint will be a nice addition for going to no-std environments and constant-time operations. Let me know how I can help.

@davfra
Copy link

davfra commented Dec 10, 2021

What is the current status on this?
Can you guesstimate the effort and/or steps needed to include crypto-bigint in unknown_order or comment on the obstacles?

@mikelodder7
Copy link
Contributor

There’s some methods missing from crypto-bigint I’m working to add then it will be quick

@davfra
Copy link

davfra commented Dec 10, 2021

Cool! Is there anything specific I could help with?

@mikelodder7
Copy link
Contributor

You stub it in for now and implement what can be done

@donkey-donkey
Copy link

hi, wondering if this will help with some of the no_std. trying to use this unknown_order presently and getting a std error from num-traits

@mikelodder7
Copy link
Contributor

I'm actually close to having crypto-bigint almost integrated. Expect it within a week or two

@donkey-donkey
Copy link

rad. super stoked on your timing. thanks

1 similar comment
@donkey-donkey
Copy link

rad. super stoked on your timing. thanks

@donkey-donkey
Copy link

checking in on this to see if there is anything that we can test? thanks

@mikelodder7
Copy link
Contributor

Just finishing some testing. I'll push what I have. Also doing some code cleanup

@donkey-donkey
Copy link

awesome stoked to try it out.
thanks.

@mikelodder7
Copy link
Contributor

Sorry I'm slow on this. Been traveling a ton and had zero time. Just a minor issue with serialization then I think I've got it

@mikelodder7
Copy link
Contributor

Published an RC candidate `unknown_order = "0.7.0-rc0". The one issue I'm having is when you try to serialize to json or toml or anything human readable I get

serializer is human readable, which requires the alloc crate feature.

Have you ever seen this @tarcieri with crypto-bigint?

@donkey-donkey
Copy link

hi. any updates. i noticed the repo is now with hyperledger. are you still working on it? thanks much.

@mikelodder7
Copy link
Contributor

Yes I've just been really busy. Take a look and see if you can figure out why the serialize bug happens. That's the only hinderance right now.

@mikelodder7
Copy link
Contributor

Addressed in #9

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