On Friday, February 13, 2015 at 12:18:06 PM UTC-5, 雷骜 wrote:
>
> Hi everyone:
>
> I'm new in Crypto++
>
> Recently I'm focusing on AES and ECIES decryption. I wonder if there has 
> some way I can know if decryption receives the correct result? 
> (In sign and verify, it returns a bool variable so that I know if the 
> signature is correct, but in decryption schemes it don't has this kind of 
> things)
>

For AES, you will need to either (1) use an authenticated encryption mode 
or (2) add a MAC to a confidentiality mode. For (1), use EAX, GCM or CCM 
mode. For (2) use CBC mode for confidentiality and an HMAC or CMAC for 
authenticity.

References for (1) are at http://www.cryptopp.com/wiki/EAX_Mode, 
http://www.cryptopp.com/wiki/GCM_Mode and 
http://www.cryptopp.com/wiki/CCM_Mode.

References for (2) are trickier because they require you to combine the 
primitives. See http://www.cryptopp.com/wiki/Authenticated_Encryption for 
starters.

For ECIES, you don't need to do anything. The system has an authentication 
tag built into the system. See 
http://www.cryptopp.com/wiki/Elliptic_Curve_Integrated_Encryption_Scheme.

In the cases of using an authenticated encryption mode or ECIES, the 
library will throw an exception if the authentication tag detects tampering.

-- 
-- 
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.

Reply via email to