On Wed, Sep 8, 2010 at 16:28, James Smith <[email protected]> wrote:
> I tried but for some reason it's not working. I think it's the md5 digest. I
> thought this would be very simple.
>
What encoding is your java code using for the string, and what
encoding is your c++ code using for the string? Is your c++ code
digesting the trailing NULL the string is (most likely) terminated
with or not? Is Java using a trailing NULL, and if so, is it digesting
that?

> Where can I get an example for using Crypto++ and AES with md5? Something
> that would give me exactly what I need to implement a function for
> decryption of a message encrypted with the java method below.

You probably won't find one online, though the crypto++ source
distribution contains examples of using hashes and and samples of
using block ciphers. What your java function does is not generally
considered a good security practice, so it would be a bad idea to post
a sample that someone might copy and use in production code. If you
can, you should use a real PBKDF to generate your key.

The most recent draft of Special Publication 800-132[1] from the US
NIST has a good general explanation of how to use them, and crypto++
implements the function (family) they describe in this class:
http://www.cryptopp.com/docs/ref/class_p_k_c_s5___p_b_k_d_f2___h_m_a_c.html

Good luck.

Geoff

[1] 
http://csrc.nist.gov/publications/drafts/800-132/draft-sp800-132_june2010.pdf

-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.

Reply via email to