<quote who="PMHager">
> denot...@libero.it wrote on Friday, April 30, 2010 9:30:
>>
>> I need to generate a BIGNUM C that is relatively prime
>> with a BIGNUM N    ( GCD(N,C)=1 )
>> is there a pre-built function in openssl library ??
>
>
> You can do it in a simple loop like
>
> do{
>   BN_generate_prime_ex(C,bits,0,NULL,NULL,NULL));
>   BN_gcd(gcd,N,C,ctx);
>   }while(!BN_is_one(gcd));
>

I am not sure but "BN_generate_prime_ex" sounds like its generates
(pseudo)primes. So you have with _very high_ probability gcd(C,N) = 1 for
all N..
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to