On Saturday, June 27, 2020 at 4:14:51 PM UTC-4, DjVortex wrote:
>
> I would need to calculate SHA3 hashes for a small project, and it would be 
> extremely useful if I could simply take the sha3.h file and the few .cpp 
> files that it requires into the project, rather than the entire crypto++ 
> library. So I thought that I would just extract these few files and add 
> them to my project.
>
> Little did I know the endless swamp I would be getting myself into.
>
> After adding sha3.cpp to the project not very surprisingly I got a big 
> bunch of linker errors due to undefined references. To be expected. Seeing 
> what the missing symbols were I added keccak.cpp. And then keccak_core.cpp. 
> And then cryptlib.cpp. And then misc.cpp. And then filters.cpp. And then...
>
> Something like an hour and 50 added .cpp files later, rather than the 
> number of "undefined reference to" errors having become smaller, to my 
> dismay it was only growing larger, and larger, and larger, and larger. Not 
> even half of the .cpp files looked like they had absolutely anything to do 
> with the SHA3 or Keccak algorithms.
>
> Some of the "undefined reference to" errors were completely *impossible* 
> to figure out because they mention symbol names that do not appear 
> *anywhere* in the entire project. Grep all the files with the symbol name, 
> and zero results. Some of the "undefined reference to" errors refer to 
> names that *only* appear in .cpp files that I'm already compiling into the 
> project.
>
> After about an hour trying to get it to compile, and with the list of 
> "undefined reference to" errors only becoming larger rather than smaller, I 
> gave up. This is physically impossible. I don't think I have the days 
> required to wade through the 199 .cpp files to try to find out which ones 
> are necessary to compile into the project merely to calculate some SHA3 
> hashes. (Especially since most probably like 90% of them aren't even used 
> to calculate the hash in question, I assume.)
>
> Maybe I'll just implement SHA3 myself as a single simple source file. Any 
> resources for the exact algorithm? For some reason it seems really hard to 
> find it online. (Although it would have been nice to be able to compare the 
> result to what crypto++ produces to test its validity. But oh well, I 
> suppose I'll probably have to figure out something else.)
>

If you are looking for high performance SHA-3 only, then check out Andy 
Polyakov's Cryptogams. Andy provides stand-alone algorithm implementations 
you can integrate into your application.

Andy's GitHub is at https://github.com/dot-asm/cryptogams.

Cryptogams is a little lite on documentation. I wrote some up a few years 
ago at https://wiki.openssl.org/index.php/Cryptogams_AES and 
https://wiki.openssl.org/index.php/Cryptogams_SHA.

Jeff

-- 
You received this message because you are subscribed to "Crypto++ Users". More 
information about Crypto++ and this group is available at 
http://www.cryptopp.com and 
http://groups.google.com/forum/#!forum/cryptopp-users.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cryptopp-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/cryptopp-users/edf34cdd-382f-43cb-9219-de33a3dd66dbo%40googlegroups.com.

Reply via email to