1
0
mirror of https://github.com/biergaizi/codecrypt synced 2024-06-30 02:43:06 +00:00

mce: decryption size check

This commit is contained in:
Mirek Kratochvil 2012-05-22 22:06:50 +02:00
parent 31ef38bfa7
commit 2436593054

@ -64,6 +64,8 @@ int pubkey::encrypt (const bvector& in, bvector&out, prng&rng)
int privkey::decrypt (const bvector&in, bvector&out)
{
if (in.size() != cipher_size() ) return 2;
//remove the P permutation
bvector not_permuted;
Pinv.permute (in, not_permuted);