Thank you for the reply.
But i think this is the wrong turn.
Lets say i use the pubkey from puzzle 35 02f6a8148a62320e149cb15c544fe8a25ab483a0095d2280d03b8a00a7feada13d
And i let the program run and i want to reduce by 10->
it generates me 1024 keys.
one of the keys will be in range 25.
This works like a charm - >
The key 028490315e76ba204a01059765fadf4a4b5c73cc90e86dee99bc7f378a2b8f3e01 is found. -> Privkey 12bb484
i asked chatgpt to put in, what has been calculated and it added "Derived by subtracting 368 times G"
i dont think this is true..
what math do i have to apply, to get the correct privkey (4aed21170) now?
i can´t get it to work
Look at albertobsd's ecctools for help, it is a working reference implementation which you can use:
https://github.com/albertobsd/ecctools/blob/main/modmath.c and you can compile it and do math on public and private keys.
To divide a private key by some number, first you need to invert it => this means taking it to the power of n-2, which can be done with modular exponentation.
Then you have to multiply it by the divisor and do a modulus on the result.