can I use your script with real values? I couldn't find a way.
In short, the attacker influences the selection of the nonce in such a way that a portion of a secret can be derived from each signature.
The secret to be leaked can be anything, but it is just a random value in the example code:
secret_to_leak = randscalar()
The nonce,
k, is computed by multiplying a small portion,
si, of the secret,
S, by a value,
b, known only to the attacker. Since
b is known by the attacker and
si is a small value, k and
si can be recovered.
k =
si *
b obfuscates the fact that
k is not random.
So how can I find the value of b? Trial and error method for example? Is b an integer?