Include file(s)

18 views
Skip to first unread message

Jonathan Wood

unread,
Apr 23, 2021, 3:05:26 PM4/23/21
to Crypto++ Users
So, I'm seeing if I can compile the examples given at https://cryptopp.com/wiki/Advanced_Encryption_Standard. Unfortunately, those examples don't show any include statements. I included cryptlib.h but still have many symbols undefined.

Is there a master include file I can include so that I can compile that code?

Jeffrey Walton

unread,
Apr 23, 2021, 3:44:17 PM4/23/21
to Crypto++ Users List
> So, I'm seeing if I can compile the examples given at https://cryptopp.com/wiki/Advanced_Encryption_Standard. Unfortunately, those examples don't show any include statements. I included cryptlib.h but still have many symbols undefined.

Refresh your browser. The example was just updated.

> Is there a master include file I can include so that I can compile that code?

Typically you include cryptlib.h for the various interfaces. Then you
include specific headers, like rijndael.h for AES, modes.h for a mode
like CBC, hex.h for hex encoding, filters.h for
StreamTransformationFilter.

Jeff

Jonathan Wood

unread,
Apr 23, 2021, 4:20:16 PM4/23/21
to Crypto++ Users
Yes, I see it was updated now. I seem to be having a hard time though. Are there any examples that show 1) encrypting non-string data (BYTE*), and 2) encrypting using a password?

Thanks,

Jeffrey Walton

unread,
Apr 23, 2021, 11:54:38 PM4/23/21
to Crypto++ Users List
On Fri, Apr 23, 2021 at 4:20 PM Jonathan Wood <jw...@softcircuits.com> wrote:
>
> Yes, I see it was updated now. I seem to be having a hard time though. Are there any examples that show 1) encrypting non-string data (BYTE*), and 2) encrypting using a password?

For (1), a StringSource handles both char* and byte*. See
https://www.cryptopp.com/wiki/StringSource.

For (2), you generally want a KDF or password-based KDF. See
https://www.cryptopp.com/wiki/KeyDerivationFunction.

I think the state of the art for {PB}KDF is Krawczyk's HKDF. The HKDF
page shows you how to derive independent keys using HKDF. See
https://www.cryptopp.com/wiki/HKDF.

Going beyond simple key derivation and encryption, you can achieve
very good security with an Integrated Encryption Scheme (IES). IES is
IND-CCA2, which is a strong notion of security. See
https://www.cryptopp.com/wiki/Integrated_Encryption_Scheme.

Jeff
Reply all
Reply to author
Forward
0 new messages