-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
Description
I was wondering if this crate was the place for :
- support of is_prime etc. for BigInt and BigUint from the
numcrate using miller-rabin - a weak but working random prime BigUint generator based on the is_prime above
of course i'm not asking that out of the blue :) the fact is i'm trying to reimplement in rust , a client-side skype library in rust , and the original code generates public / private key of 512 bits using this very simple algorithm
def random_prime(low, high):
r = random.randint(low, high)
if r%2 == 0:
r+=1
while True:
if miller_rabin(r) == True:
break
r+=2
return r
so getting something similar for rust, would be of a great help , and as it's somethin i think not specific to skype, i was thinking it was a good idea to put it in an external crate
qtbeee, GrayJack and mb720