DaGenix / rust-crypto

A (mostly) pure-Rust implementation of various cryptographic algorithms.
Apache License 2.0
1.38k stars 296 forks source link

Add DH and RSA #106

Open DaGenix opened 10 years ago

DaGenix commented 10 years ago

I'm working on a Diffie-Hellman implementation and an RSA implementation. Progress is quite slow, though. If someone else is working on this as well, please let me know so that we can combine our efforts, or, if you have more time to dedicate to it, I can work on something else.

Thanks!

mtahmed commented 9 years ago

I can help out with DH. If there's a working branch for DH, I can contribute to it.

DaGenix commented 9 years ago

Thanks for the offer! Right now, though, I don't have anything that's in a state that is ready to be contributed to. My current strategy is to port tomsfastmatch (https://github.com/libtom/tomsfastmath) to use for (hopefully) fast modular exponentiation, but I haven't made a whole lot of progress yet due to a lack of time. If I get things to a state where its possible for others to contribute, I'll post a branch and update this thread.

calvinmetcalf commented 9 years ago

for both of these things the blocker is a good big number lib with the Montgomery reduction is key (for rsa another blocker is you have to deal with asn1 encoding).

DaGenix commented 9 years ago

I'm making (slow) progress on my port of tomsfastmath. I still don't have anything worth posting, but, i'm getting close to getting modular exponentiation to work, I think. Once I have something thats somewhat near readable, I'll update this and post what I have.

suhr commented 9 years ago

Any changes here?

DaGenix commented 9 years ago

On my end? Not really. I've been quite busy at work over the last few months and its hard to program 8 - 10 hours during the day and then jump into more programming at night.

I have a kinda working port of tomsfastmatch into Rust in a semi-workable state. I haven't pushed the code yet since both the code the commit history is extremely messy. If someone is exceptionally interested, what I have right now is at https://github.com/DaGenix/rust-crypto-working/tree/dh in the file src/bignum/mod.rs.

This issue has been open for quite a while. As I said, my time is limited so I don't want to discourage someone else from tackling the problem - if someone else is interested in working on this problem as well, it would be nice to try to coordinate here. What I can do, is to try to get this code cleaned up a little bit and at least put into a reasonable working branch, but, that will probably take me a few days.