Bug in Crypto++ 5.5.0

5 views
Skip to first unread message

anno

unread,
Apr 5, 2009, 9:53:09 AM4/5/09
to Crypto++ Users
hallo everybody,

I think there is an bug in Crypto++.

Yesterdy I tried to compile new crypto++ version 5.6.0 with mysys core
(gcc 3.4.5) and I got an error message within compiling the library.

Here is my error message:

$ make
g++ -DNDEBUG -g -O2 -pipe -c rijndael.cpp
rijndael.cpp:75:21: malloca.h: No such file or directory
rijndael.cpp: In member function `virtual size_t
CryptoPP::Rijndael::Enc::AdvancedProcessBlocks(const byte*, const
byte*, byte*, size_t, CryptoPP::word32) const':
rijndael.cpp:945: error: `alloca' was not declared in this scope
make: *** [rijndael.o] Error 1

In this code area:

do {
space = (byte *)alloca(255+sizeof(Locals));
space += (256-(size_t)space%256)%256;
}
while (AliasedWithTable(space, space+sizeof(Locals)));

Well gcc can not find this "alloca" function in the code.

best regards anno

Mouse

unread,
Apr 5, 2009, 10:03:52 AM4/5/09
to anno, Crypto++ Users
Yes I think this added Enc::AdvancedProcessBlock() function has rough
edges. You pointed out one of them, I've stumbled upon another
(insufficient screening of the compilation flags -
CRYPTOPP_DISABLE_ASM in particular, thus forcing the user of the
library to need how exactly the library was compiled - it was not the
case with prior versions).

And for you - locate the "malloca.h" file in your system and make sure
that rijndael.cpp includes it from the location where it is.

As for Wei Dai - perhaps you'd like to reconsider this
Enc::ADvancedProcessBlock() construction, as it seems to have broken
portability at least on Mac platform.
--
Regards,
Uri

anno

unread,
Apr 5, 2009, 11:29:37 AM4/5/09
to Crypto++ Users
where can I download this malloc.h file?

On 5 Apr., 16:03, Mouse <mouse...@gmail.com> wrote:
> Yes I think this added Enc::AdvancedProcessBlock() function has rough
> edges. You pointed out one of them, I've stumbled upon another
> (insufficient screening of the compilation flags -
> CRYPTOPP_DISABLE_ASM in particular, thus forcing the user of the
> library to need how exactly the library was compiled - it was not the
> case with prior versions).
>
> And for you - locate the "malloca.h" file in your system and make sure
> that rijndael.cpp includes it from the location where it is.
>
> As for Wei Dai - perhaps you'd like to reconsider this
> Enc::ADvancedProcessBlock() construction, as it seems to have broken
> portability at least on Mac platform.
>

Wei Dai

unread,
Apr 5, 2009, 3:58:54 PM4/5/09
to anno, Crypto++ Users
Anno, you can just add a #include <malloc.h> to the top of rijndael.cpp.
I've also checked a fix into SVN (r463).

--------------------------------------------------
From: "anno" <jenni...@freenet.de>
Sent: Sunday, April 05, 2009 8:29 AM
To: "Crypto++ Users" <cryptop...@googlegroups.com>
Subject: Re: Bug in Crypto++ 5.5.0

anno

unread,
Apr 5, 2009, 5:40:06 PM4/5/09
to Crypto++ Users
ok thank you very much.

On 5 Apr., 21:58, "Wei Dai" <wei...@weidai.com> wrote:
> Anno, you can just add a #include <malloc.h> to the top of rijndael.cpp.
> I've also checked a fix into SVN (r463).
>
> --------------------------------------------------
> From: "anno" <jenni.lu...@freenet.de>
Reply all
Reply to author
Forward
0 new messages