"Timothy J. Miller" <
tmiller@...> writes:
>I.e., if I did:
>
>data = <some data encrypted under a PBKDF2 derived key>
>ctx = cryptCreateContext(CRYPT_UNUSED, CRYPT_ALGO_3DES);
>s = cryptSetAttribute(ctx, CRYPT_CTXINFO_IV, iv, sizeof(iv));
>s = cryptSetAttribute(ctx, CRYPT_CTXINFO_KEYING_ITERATIONS, count);
>s = cryptSetAttributeString(ctx, CRYPT_CTXINFO_KEYING_SALT, salt, sizeof(salt));
>s = cryptSetAttributeString(ctx, CRYPT_CTXINFO_KEYING_VALUE, password, sizeof(password));
>s = cryptDecrypt(ctx, data, sizeof(data));
>
>Do I get the right plaintext? :)
Yes, provided the values you're setting are the same as what was set when the
data was encrypted, that should give you the correct plaintext.
(Note that there's an easier way to do this, just use password-based
enveloping and the only thing you need to worry about is the password/key).
Peter.
_______________________________________________
Cryptlib mailing list
Cryptlib@... via Mail:
cryptlib-request@...
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlibPosts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.