You could also construct a system for a given plaintext ciphertext pair and then substitute the key in every equation. The resulting system should be trivial to solve and be != 1.
On Wednesday 02 May 2012, Zoresvit wrote: > I'm implementing a MQ polynomial system for GOST 28147-89 cipher. The idea > is similar to polynomial system construction in mq.SR for AES and *ctc.py* > for Courtois Toy Cipher by Martin Albrecht. And I'm wondering what is the > best way to test correctness of the system. > > What I've implemented so far: > > 1. replacing every variable by intermediate encryption bits to test the > correctness of each equation (system should result 0); > 2. extracting first round of the system, injecting plaintext and key > values and solving this one-round system. The resulting variables should > be equal to the ciphertext after the first round. > > Are these two tests enough for making sure the system is correct or are > there any better solutions to this? > > Thanks! Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://martinralbrecht.wordpress.com/ _jab: [email protected] -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
