Jeffrey Walton | 1 Dec 2007 06:50
Picon

Cryptlib Link Suggestion from the Linker


Hi All/Wei,

When I link against the library (5.5.2, but it was present in 5.5.1
also) using Visual Stuio 8.0, I receive the following:

"cryptlib.lib(cryptlib.obj) : MSIL .netmodule or module compiled with
/GL found; restarting link with /LTCG; add /LTCG to the link command
line to improve linker performance"

The restart of the linker is a bit painful since it is so slow. When I
turned off Whole Program Optimaztions, I received different errors
(not warnings).

I think I tracked this down to class algparams, which is using a
smartptr class. The smartptr class is using std::algorithm. From
similar on the web, it appears Microsoft built std::algorithm
incorrectly (using a managed switch).

Is there any way to work around this issue by tweaking SmartPtr.h?

Jeff

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

(Continue reading)

Wei Dai | 1 Dec 2007 09:19

Re: Cryptlib Link Suggestion from the Linker


What happens when you turn off Whole Program Optimizations, both for 
Crypto++ and your own application?

--------------------------------------------------
From: "Jeffrey Walton" <noloader <at> gmail.com>
Sent: Friday, November 30, 2007 9:50 PM
To: "Crypto++" <cryptopp-users <at> googlegroups.com>
Subject: Cryptlib Link Suggestion from the Linker

>
> Hi All/Wei,
>
> When I link against the library (5.5.2, but it was present in 5.5.1
> also) using Visual Stuio 8.0, I receive the following:
>
> "cryptlib.lib(cryptlib.obj) : MSIL .netmodule or module compiled with
> /GL found; restarting link with /LTCG; add /LTCG to the link command
> line to improve linker performance"
>
> The restart of the linker is a bit painful since it is so slow. When I
> turned off Whole Program Optimaztions, I received different errors
> (not warnings).
>
> I think I tracked this down to class algparams, which is using a
> smartptr class. The smartptr class is using std::algorithm. From
> similar on the web, it appears Microsoft built std::algorithm
> incorrectly (using a managed switch).
>
> Is there any way to work around this issue by tweaking SmartPtr.h?
(Continue reading)

Jeffrey Walton | 1 Dec 2007 14:44
Picon

Re: Cryptlib Link Suggestion from the Linker


Hi Wei,

That was it. Sometimes I can't see the forest through the trees.

Jeff

On 12/1/07, Wei Dai <weidai <at> weidai.com> wrote:

> > "cryptlib.lib(cryptlib.obj) : MSIL .netmodule or module compiled with
> > /GL found; restarting link with /LTCG; add /LTCG to the link command
> > line to improve linker performance"
>
> What happens when you turn off Whole Program Optimizations, both for
> Crypto++ and your own application?
>
[SNIP]

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

Jeffrey Walton | 3 Dec 2007 03:08
Picon

AES in ECB Mode


Hi All,

I believe this is a valid combination of cipher/mode [1,2,3], so I'm not sure
what I am doing wrong. I know there are better choices than ECB - this is an
educational exercise. I also realize ECB does not use an IV, but I
can't compile with just a key.

CryptoPP::ECB_Mode< CryptoPP::AES >::Encryption
  Encryptor( key, sizeof(key), iv );
and
  Encryptor( key, sizeof(key) );

throws an exception in AlgParams:
CryptoPP::AlgorithmParametersBase::ParameterNotUsed

Any help would be appreciated.

Jeff

[1] http://csrc.nist.gov/groups/ST/toolkit/BCM/index.html
[2] http://www.ietf.org/rfc/rfc3826.txt
[3] http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf

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

(Continue reading)

Geoff Beier | 3 Dec 2007 04:14
Picon

Re: AES in ECB Mode


Hi Jeff,

> I believe this is a valid combination of cipher/mode [1,2,3], so I'm not sure
> what I am doing wrong. I know there are better choices than ECB - this is an
> educational exercise. I also realize ECB does not use an IV, but I
> can't compile with just a key.
>
> CryptoPP::ECB_Mode< CryptoPP::AES >::Encryption
>   Encryptor( key, sizeof(key), iv );
> and
>   Encryptor( key, sizeof(key) );
>
> throws an exception in AlgParams:
> CryptoPP::AlgorithmParametersBase::ParameterNotUsed
>

It seems to work fine with just a key for me, and I see the exception
(as I would expect, since, as you note, ECB does not use an IV) when I
call the constructor with an IV.

Here's code that compiles and behaves as expected:
http://pastebin.com/f27e36bc2

How is yours different?

Geoff

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
(Continue reading)

Jeffrey Walton | 3 Dec 2007 05:11
Picon

Re: AES in ECB Mode


Hi Geoff,

I'm not sure what I missed first time through, but it works as expected. Thanks.

Jeff

On 12/2/07, Geoff Beier <geoffbeier <at> gmail.com> wrote:
> Hi Jeff,
>
> > I believe this is a valid combination of cipher/mode [1,2,3], so I'm not sure
> > what I am doing wrong. I know there are better choices than ECB - this is an
> > educational exercise. I also realize ECB does not use an IV, but I
> > can't compile with just a key.
> >
> > CryptoPP::ECB_Mode< CryptoPP::AES >::Encryption
> >   Encryptor( key, sizeof(key), iv );
> > and
> >   Encryptor( key, sizeof(key) );
> >
> > throws an exception in AlgParams:
> > CryptoPP::AlgorithmParametersBase::ParameterNotUsed
> >
>
> It seems to work fine with just a key for me, and I see the exception
> (as I would expect, since, as you note, ECB does not use an IV) when I
> call the constructor with an IV.
>
> Here's code that compiles and behaves as expected:
> http://pastebin.com/f27e36bc2
(Continue reading)

Jeffrey Walton | 3 Dec 2007 05:13
Picon

Re: AES in ECB Mode


Hi All/Wei,

> Here's code that compiles and behaves as expected:
> http://pastebin.com/f27e36bc2
This is a nice tool. Does it require a memebrship of sorts? (Would the
Crypto++ list be able to use it free of charge?)

Jeff

On 12/2/07, Geoff Beier <geoffbeier <at> gmail.com> wrote:
> Hi Jeff,
>
[ SNIP]
>
> Here's code that compiles and behaves as expected:
> http://pastebin.com/f27e36bc2
>
> How is yours different?
>
> Geoff
>

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

(Continue reading)

Geoff Beier | 3 Dec 2007 05:34
Picon

Re: AES in ECB Mode


> > http://pastebin.com/f27e36bc2
> This is a nice tool. Does it require a memebrship of sorts? (Would the
> Crypto++ list be able to use it free of charge?)
>

It's free for anyone to use. Just visit http://pastebin.com/ and paste
away. You don't even have to register.There are several similar tools
around... that one's nice because it allows annotation, diffs, and you
can ask it to keep snippets "forever".

Geoff

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

Jeffrey Walton | 3 Dec 2007 09:45
Picon

Blowfish Minimum Key Size


Hi All/Wei,

Blowfish is reporting its minimum key size is 1 byte. From [1],
Schneier appears to imply it can be from 0 to 447 bits: "the key can
be any length up to 448 bits".. I take this to be [0,448).

Jeff

[1] http://www.schneier.com/paper-blowfish-fse.html

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

Wei Dai | 3 Dec 2007 09:55

Re: Blowfish Minimum Key Size


Jeff, the keying algorithm is not well defined if the key length is not at 
least 1 byte. If you look at the code, there's a "% keylength" operation.

--------------------------------------------------
From: "Jeffrey Walton" <noloader <at> gmail.com>
Sent: Monday, December 03, 2007 12:45 AM
To: "Crypto++" <cryptopp-users <at> googlegroups.com>
Subject: Blowfish Minimum Key Size

>
> Hi All/Wei,
>
> Blowfish is reporting its minimum key size is 1 byte. From [1],
> Schneier appears to imply it can be from 0 to 447 bits: "the key can
> be any length up to 448 bits".. I take this to be [0,448).
>
> Jeff
>
> [1] http://www.schneier.com/paper-blowfish-fse.html
>
> > 

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

(Continue reading)


Gmane