SecureRandom    k = new SecureRandom() { public void nextBytes(byte[] bytes) { byte[] vals = new BigInteger("1542725565216523985789236956265265265235675811949404040041").toByteArray();  System.arraycopy(vals, vals.length-bytes.length, bytes, 0, bytes.length); } };
byte[] kData = BigIntegers.asUnsignedByteArray(new BigInteger("1542725565216523985789236956265265265235675811949404040041"));  SecureRandom    k = new FixedSecureRandom(kData);
    private void testECDSA191bitBinary()    {        BigInteger r = new BigInteger("87194383164871543355722284926904419997237591535066528048");        BigInteger s = new BigInteger("308992691965804947361541664549085895292153777025772063598");            SecureRandom    k = new SecureRandom()        {            public void nextBytes(byte[] bytes)            {                byte[] vals = new BigInteger("1542725565216523985789236956265265265235675811949404040041").toByteArray();                    System.arraycopy(vals, vals.length-bytes.length, bytes, 0, bytes.length);            }        };        ECCurve.F2m curve = new ECCurve.F2m(            191, // m            9, //k            new BigInteger("2866537B676752636A68F56554E12640276B649EF7526267", 16), // a            new BigInteger("2E45EF571F00786F67B0081B9495A3D95462F5DE0AA185EC", 16)); // b            ECDomainParameters params = new ECDomainParameters(            curve,            curve.decodePoint(Hex.decode("0436B3DAF8A23206F9C4F299D7B21A9C369137F2C84AE1AA0D765BE73433B3F95E332932E70EA245CA2418EA0EF98018FB")), // G            new BigInteger("1569275433846670190958947355803350458831205595451630533029"), // n            BigInteger.valueOf(2)); // h            ECPrivateKeyParameters priKey = new ECPrivateKeyParameters(            new BigInteger("1275552191113212300012030439187146164646146646466749494799"), // d            params);            ECDSASigner ecdsa = new ECDSASigner();        ParametersWithRandom param = new ParametersWithRandom(priKey, k);            ecdsa.init(true, param);            byte[] message = new BigInteger("968236873715988614170569073515315707566766479517").toByteArray();        BigInteger[] sig = ecdsa.generateSignature(message);            if (!r.equals(sig[0]))        {            fail("r component wrong." + System.getProperty("line.separator")                + " expecting: " + r + System.getProperty("line.separator")                + " got      : " + sig[0]);        }            if (!s.equals(sig[1]))        {            fail("s component wrong." + System.getProperty("line.separator")                + " expecting: " + s + System.getProperty("line.separator")                + " got      : " + sig[1]);        }            // Verify the signature        ECPublicKeyParameters pubKey = new ECPublicKeyParameters(            curve.decodePoint(Hex.decode("045DE37E756BD55D72E3768CB396FFEB962614DEA4CE28A2E755C0E0E02F5FB132CAF416EF85B229BBB8E1352003125BA1")), // Q            params);        ecdsa.init(false, pubKey);        if (!ecdsa.verifySignature(message, sig[0], sig[1]))        {            fail("signature fails");        }    }