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

mce: remove check that allows bit-flipping attack

This commit is contained in:
Mirek Kratochvil 2012-07-18 11:19:24 +02:00
parent 21b3ef85d1
commit 06bd504c9b

@ -86,12 +86,6 @@ int privkey::decrypt (const bvector&in, bvector&out)
if (!evaluate_error_locator_trace (loc, ev, fld) )
return 1; //if decoding somehow failed, fail as well.
// check the error vector, it should have exactly t == deg (g) errors
if ( (int) ev.hamming_weight() != g.degree() )
return 1;
//TODO cryptoanalysis suggests omitting this check for preventing
//bit-flipping attack
//correct the errors
canonical.add (ev);