Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Encrypt

8 views
Skip to first unread message

Alessio

unread,
May 17, 2007, 1:07:58 PM5/17/07
to
Hy all,

first af all, sorry for my english...

I'm trying to encrypt a plein text file with the same result obtained
using openssl.

1 - make a session key usign CryptGenKey(hProv, CALG_3DES_112,
CRYPT_EXPORTABLE, &hKey)
2 - import the current certificate public key with
CryptImportPublicKeyInfo
3 - export my session key with CryptExportKey obtaining a SIMPLEBLOB
4 - encrypt th pleintext with CryptEncrypt and the session key

Then I try to save in the output file the keyblob and the buffer
derived from CryptEncrypt, but the output file is not like the one
obtained using openssl rsautl -encrypt -in ... -out ... -inkey ...cer
-
certin -pkcs

I don't know what I'm doing wrong.

Thanks everybody

0 new messages