The elliptic curve secp256k1 is defined as
$y^2 = x^3 + 7$. The prime for the field is set to:
p = 115792089237316195423570985008687907853269984665640564039457584007908834671663
So now, one should be able to calculate the order by using the Schoof's Algorithm. There is a Python implementation provided here: https://github.com/pdinges/python-schoof
However, it seems to be too time consuming to calculate the order for large primes. Furthermore, the implementation seems not to be capable to calculate it for such a large prime.
root@78774381cc80:/home/python-schoof# python3 reduced_computation_schoof.py 17 0 7
Counting points of y^2 = x^3 + 0x + 7 over GF<17>: 18
root@78774381cc80:/home/python-schoof# python3 reduced_computation_schoof.py 115792089237316195423570985008687907853269984665640564039457584007908834671663 0 7
Counting points of y^2 = x^3 + 0x + 7 over GF<115792089237316195423570985008687907853269984665640564039457584007908834671663>: Traceback (most recent call last):
File "reduced_computation_schoof.py", line 268, in <module>
runner.run()
File "/home/python-schoof/support/running.py", line 498, in run
result = self.__algorithm( *item, output=self.__output)
File "reduced_computation_schoof.py", line 258, in reduced_computation_schoof_algorithm
order = p + 1 - frobenius_trace( EllipticCurve( FiniteField(p), A, B ) )
File "reduced_computation_schoof.py", line 55, in frobenius_trace
len(search_range),
OverflowError: Python int too large to convert to C ssize_t
Does someone know it was calculated and how to reproduce it? Is there a better implementation of the Schoof's Algorithm for such large numbers?