hello, the problem with SHA-3 and HMAC is that Keccak (SHA-3) isn't an iterated block cipher or a similar construction as nearly all other ciphers are. You have now 2 options: Calculating HMAC_K(X)=H(K||X) by hand where you need it or defining a template sepcialization for the SHA3 class for HMAC and changing the way how HMAC is calulated there.
Relevant stackoverflow topic: https://crypto.stackexchange.com/questions/17735/is-hmac-needed-for-a-sha-3-based-mac Source code for specialization to follow soon. BR JPM Am Samstag, 16. August 2014 17:46:17 UTC+2 schrieb Frank Spears: > > hello, > > i tried to use the new SHA-3 hash function that is available in Crypto++ > version 5.6.2, through the following code: > > CryptoPP::HMAC <CryptoPP::SHA3_512> sha; > > this compiles just fine. however, when i run the program, it crashes with > the following exception: > > terminate called after throwing an instance of 'CryptoPP::InvalidArgument' > what(): HMAC: can only be used with a block-based hash function > > is there a way around this? as far as i know, SHA-3 should be good enough > to be used as HMAC. > > thanks in advance for replying! > > Frank Spears. > -- -- 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. --- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
