S-Expression help

Garrett Kajmowicz gkajmowi@tbaytel.net
Mon, 2 Jun 2003 12:22:37 -0400


I'm currently attempting to write a crypto application use gcrypt.  At the 
moment I am working on attempting to generate an ElGamel key of size 2048 
bits.

For some reason I am *always* getting error 45 (GCRYERR_INV_ARG).  I have 
never worked with s-expressions before, and the 'manual' is less than 
helpful.

Code I am using:

        GcrySexp *keyExp=NULL;
        GcrySexp *keyParms=NULL;
        int retVal;

        std::string tempString;

        std::cout << "Initializing data structures\n";
        tempString = "(genkey(elg(nbits 2048)))";
        retVal=gcry_sexp_new (keyParms, tempString.c_str(),
		tempString.length(), 1);
        std::cout <<"Return Value: " << retVal << std::endl;

Please reply by e-mail - I have yet to figure out how to subscribe to this 
mailing list.

Thank you for your assistance.

Garrett Kajmowicz
gkajmowi@tbaytel.net