Keys and Certificates creations
David Pierre <[email protected]> Tue, 5 Feb 2013 07:17:07 -0800 (PST)
| Newsgroups | gmane.comp.encryption.cryptlib |
|---|---|
| Message-ID | <[email protected]> |
Hi, After many tests, i got a client-server that satisfy me. I'm still looking for some new tests, and so I found problems (as usual). Since the beginning, on server part, I generate a key (RSA), then create a certificate with that key and do my TSL session with it. I wanted to change the key size and the used algorithm, and there problems begin. With RSA and DSA, my code works fine with key size 1024, 2048 and 4096. But when i try to generate a 512b key, I got an error on setAttribute : status = cryptSetAttribute( *cryptContext, CRYPT_CTXINFO_KEYSIZE, keySize / 8 ); It returns -3 error code. So I wonder 512b keys are forbidden in cryptlib, or am I doing it wrong ? Second point is about algorithm. I try to create keys with other algorithmes (El Gamal, ECDSA and ECDH), but without success. For El Gamal, the key generation works fine, but when i want to generate a certificate (simple certificate as described in manual p:147), I have a -26 error code on : status = cryptSetAttribute( cryptCertificate, CRYPT_CERTINFO_SUBJECTPUBLICKEYINFO, cryptContext ); And finally, with ECDSA and ECDH, I can't even create a key because : status = cryptCreateContext( cryptContext, CRYPT_UNUSED, CRYPT_ALGO_ECDSA ); Fails, with a -20 error code. I look for these issues in the manual, but they seem to be 3 different problems, and I don't see what could be wrong, could you help me on these cases ? -- View this message in context: http://old.nabble.com/Keys-and-Certificates-creations-tp34985397p34985397.html Sent from the Cryptlib mailing list archive at Nabble.com. _______________________________________________ Cryptlib mailing list [email protected] via Mail: [email protected] Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/ http://news.gmane.org/gmane.comp.encryption.cryptlib Posts from non-subscribed addresses are blocked to prevent spam, please subscribe in order to post messages.