// generate random permutation P2
Permutation p2 = new Permutation(n, random);
// compute public matrix G=S*G'*P2
GF2Matrix g = (GF2Matrix)matrixSandInverse[0].rightMultiply(gPrime);
g = (GF2Matrix)g.rightMultiply(p2);
// generate keys
McEliecePublicKeyParameters pubKey = new McEliecePublicKeyParameters(OID, n, t, g, mcElieceParams.getParameters());
McEliecePrivateKeyParameters privKey = new McEliecePrivateKeyParameters(OID, n, k,