Please check my work but I think that if you know k is being incremented then you can simply calculate the private key.
All of the variables and terminology in this post are from
https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_AlgorithmGiven two different messages with two different signatures we have:
First message and signature (m, r, s)
Second message and signature (m', r', s')
From each message we can derive the z value (hash of the message) so:
First message and signature (m, r, s, z)
Second message and signature (m', r', s', z')
Therefore: ks = z + rd
A and k's' = z' + r'd
ATherefore: (sk - z)/r = (s'k' - z')/r'
But in this case k' = k + 1 so:
(sk - z)/r = (s'(k + 1) - z')/r'
So all you have to do is solve for k. All the other values: s, z, r, s', z', and r' are all known.
(sk - z)/r = (s'(k + 1) - z')/r'
rr'[(sk - z)/r] = rr'[(s'(k + 1) - z')/r']
r'(sk - z) = r(s'(k + 1) - z')
r'sk - r'z = rs'(k + 1) - rz'
r'sk - r'z = rs'k + rs' - rz'
r'sk - rs'k = r'z + rs' - rz'
k(r's - rs') = r'z + rs' - rz'
k = (r'z + rs' - rz') / (r's - rs') all mod operations, of course.
Once you know k you can simply calculate the private key, d
AAlso note that any scheme where k' = k + n is vulnerable, n does not have to be just one.