Usage of gcry_pk_genkey()

Rüdiger Sonderfeld cplusplushelp@gmx.net
Mon, 29 Apr 2002 21:16:41 +0200


hi again,
I wrote a wrapper for the gcry_pk_genkey() function

int crypto_rsagenkey(GCRY_SEXP *key,int bits)
{
  int ret;
  GCRY_SEXP parms;
  gcry_sexp_build( &parms, NULL, "(genkey(rsa(nbits %d)))", bits);
  ret=gcry_pk_genkey( key,parms );
  gcry_sexp_release( parms );
  return ret;
}

void crypto_releasekey(GCRY_SEXP key)
{
  gcry_sexp_dump(key);
  gcry_sexp_release(key);
}

But if I use the crypto_rsagenkey() Wrapper function I recive this output

.+++++
DBG: overflow in prime generation
:....+++++
DBG: overflow in prime generation
:.........+++++
DBG: overflow in prime generation
:.....+++++
DBG: overflow in prime generation
:.+++++
DBG: overflow in prime generation
and so on until I stop the program

what is wrong with my wrapper function?