private static PublicKey getNamedCurveEcPublicKey() throws Exception {
        // These are the parameters for the BitCoin curve (secp256k1). See
        // https://en.bitcoin.it/wiki/Secp256k1.
        final BigInteger p = new BigInteger("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F", 16);
        final BigInteger a = BigInteger.valueOf(0);
        final BigInteger b = BigInteger.valueOf(7);
        final BigInteger x = new BigInteger("79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798", 16);
        final BigInteger y = new BigInteger("483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8", 16);
        final BigInteger order = new BigInteger("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141", 16);
        final int cofactor = 1;

        final ECParameterSpec spec = new ECParameterSpec(new EllipticCurve(new ECFieldFp(p), a, b), new ECPoint(x, y), order, cofactor);

        // $ openssl ecparam -name secp256k1 -genkey > key.pem
        // $ openssl ec -text -noout < key.pem
        final BigInteger Px = new BigInteger("2d45572747a625db5fd23b30f97044a682f2d42d31959295043c1fa0034c8ed3", 16);
        final BigInteger Py = new BigInteger("4d330f52e4bba00145a331041c8bbcf300c4fbfdf3d63d8de7608155b2793808", 16);

        final KeyFactory factory = KeyFactory.getInstance("EC");
        ECPublicKeySpec keySpec = new ECPublicKeySpec(new ECPoint(Px, Py), spec);
        return factory.generatePublic(keySpec);
    }
A possible signature using SHA256withDSA of Vector2Data. Note that DSS is
randomized, so this won't be the exact signature you'll get out of
another signing operation unless you use a fixed RNG.
common/src/test/java/org/conscrypt/java/security/SignatureTest.java