My technique might not be efficient but simple if considered

prime numbers fall either on "6k+1" /"6k-1" eg(5,7 fall as 6-1,6+1)
(17,19 fall as 18-1,18+1)

Now for length a suitable "k values " could be chosen and then test
for prime can be applied
Test for prime numbers is if the numbers if the numbers is indivisible
by the numbers starting from 0 to sqrt(number) then it is prime.

Also one should remember evry prime number falss on 6k+1/6k-1 but not
vice versa, hence the above test is necessary

Also there is another method, much more detailed ,complex and
implementable on the link below
http://www.freepatentsonline.com/7149763.html


On Nov 9, 11:45 am, Liu <[email protected]> wrote:
> Hi everyone,
>
> Can anyone give me some hint on how to generate a random prime number
> of a specified length? I know how to generate random numbers, but not
> sure specifically on random PRIME numbers? Thanks in advance.
>
> -Xiaohui

-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.

Reply via email to