/* Global assumption:
E<e> := GF(2,6);
V6 := VectorSpace(GF(2), 6);
V24 := VectorSpace(GF(2), 24); */

Encode := function(a, W)
	local lambda, k;

	lambda := MatrixLambdaRSC(64, 4, 12);	
	k := KeyScheduleStep3(W, 1);
	a := a + k;
	for nround in [1..15] do
		k := KeyScheduleStep3(W, nround + 1);
		a := TypicalRound(a, lambda, k);
	end for;

	return a;
end function;