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));
 

Peter-Michael

--

Peter-Michael Hager - acm senior - HAGER-ELECTRONICS GmbH - Germany


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to