# Where can I find Secp256k1 ECDSA test vectors?

Im currently implementing an ECDSA library based on curves like secp256k1. I would like to test it using some test vectors, like http://csrc.nist.gov/groups/STM/cavp/documents/dss/ecdsatestvectors.zip . Is there any place where I can get some vectors for testing encryption with that curve?

Example vector has this structure:

var testVectors = []struct {
msg    string
Qx, Qy string
r, s   string
ok     bool
}


and looks like this (for P224 curve):

{
"851e3100368a22478a0029353045ae40d1d8202ef4d6533cfdddafd8",
"205302ac69457dd345e86465afa72ee8c74ca97e2b0b999aec1f10c2",
"4450c2d38b697e990721aa2dbb56578d32b4f5aeb3b9072baa955ee0",
false,
},
{
"c8ce98e181770a7c9418c73c63d01494b8b80a41098c5ea50692c984",
"de5558c257ab4134e52c19d8db3b224a1899cbd08cc508ce8721d5e9",
"745db7af5a477e5046705c0a5eff1f52cb94a79d481f0c5a5e108ecd",
true,
},
`
-
DSA (and ECDSA) is not an encryption algorithm, but a signature algorithm. And this signature is not deterministic ... the best we could do is to give some example signatures which you could verify, or some sample random $k$ together with the signature created from this. – Paŭlo Ebermann Oct 1 '11 at 15:12
I already have a testing architecture in place from a library implementing curves like P224, but I can't find any external data to test my implementation against. It should work, I can successfully generate, sign and verify anything with it, but comparing it with someone else's implementation would be desirable. – ThePiachu Oct 1 '11 at 19:07
You could try and find as many corner cases as possible, regarding the input and internal random number generation. Then you could test against e.g. bouncy castle, which contains a ECDSA implementation as well as all the Secp curves (in the ASN.1 part of the source). – Maarten Bodewes Jan 2 '12 at 17:03

On the other hand, if you do not wish to force specific value for $k$ for testing or use deterministic variant of ECDSA signing (see RFC 6979), then you may be better of trying this: