Hi, I update from 5.6.2。
Hi, I update from 5.6.2。I encrypted sometext ,using DefaultEncryptorWithMAC(5.6.2). When I decrypt using LegacyDecryptorWithMAC(6.1), a expection throwed: DataDecryptorWithMAC: MAC check failedIt seems DefaultDecryptorWithMAC(5.6.2) is not compatible with LegacyDecryptorWithMAC(6.1)。I notice that in "default.h" 255~256 linetypedef DataEncryptorWithMAC<LegacyBlockCipher,LegacyHashModule,DefaultMAC,LegacyParametersInfo> LegacyEncryptorWithMAC;typedef DataDecryptorWithMAC<LegacyBlockCipher,LegacyHashModule,DefaultMAC,LegacyParametersInfo> LegacyDecryptorWithMAC;They use DefaultMAC, rather than LegacyMAC, it seems like a bug.
On Monday, September 10, 2018 at 1:57:18 AM UTC-4, mark Gu wrote:Hi, I update from 5.6.2。I encrypted sometext ,using DefaultEncryptorWithMAC(5.6.2). When I decrypt using LegacyDecryptorWithMAC(6.1), a expection throwed: DataDecryptorWithMAC: MAC check failedIt seems DefaultDecryptorWithMAC(5.6.2) is not compatible with LegacyDecryptorWithMAC(6.1)。I notice that in "default.h" 255~256 linetypedef DataEncryptorWithMAC<LegacyBlockCipher,LegacyHashModule,DefaultMAC,LegacyParametersInfo> LegacyEncryptorWithMAC;typedef DataDecryptorWithMAC<LegacyBlockCipher,LegacyHashModule,DefaultMAC,LegacyParametersInfo> LegacyDecryptorWithMAC;They use DefaultMAC, rather than LegacyMAC, it seems like a bug.Thanks Mark.Yeah, that may be a problem. Looking at 5.6.2 the old encryptors used SHA1 (5.6.2 release: https://github.com/weidai11/cryptopp/blob/789f81f048c9).
On Monday, September 10, 2018 at 8:33:20 PM UTC-4, Jeffrey Walton wrote:
On Monday, September 10, 2018 at 1:57:18 AM UTC-4, mark Gu wrote:Hi, I update from 5.6.2。I encrypted sometext ,using DefaultEncryptorWithMAC(5.6.2). When I decrypt using LegacyDecryptorWithMAC(6.1), a expection throwed: DataDecryptorWithMAC: MAC check failedIt seems DefaultDecryptorWithMAC(5.6.2) is not compatible with LegacyDecryptorWithMAC(6.1)。I notice that in "default.h" 255~256 linetypedef DataEncryptorWithMAC<LegacyBlockCipher,LegacyHashModule,DefaultMAC,LegacyParametersInfo> LegacyEncryptorWithMAC;typedef DataDecryptorWithMAC<LegacyBlockCipher,LegacyHashModule,DefaultMAC,LegacyParametersInfo> LegacyDecryptorWithMAC;They use DefaultMAC, rather than LegacyMAC, it seems like a bug.