Ejemplo n.º 1
0
        private static MaMaPe GetMMP(GF2Matrix H, IRandom SecRnd)
        {
            int         n    = H.ColumnCount;
            GF2Matrix   s    = null;
            Permutation p    = new Permutation(n, SecRnd);
            GF2Matrix   hp   = (GF2Matrix)H.RightMultiply(p);
            GF2Matrix   sInv = hp.LeftSubMatrix();

            if ((s = InvertMatrix(sInv)) == null)
            {
                return(null);
            }

            GF2Matrix shp = (GF2Matrix)s.RightMultiply(hp);
            GF2Matrix m   = shp.RightSubMatrix();

            return(new MaMaPe(sInv, m, p));
        }