First time here? Check out the FAQ!

Ask Your Question
0

How to find modulo(%) of secp256k1 publick key ?

asked 3 years ago

Gorge gravatar image

updated 3 years ago

FrédéricC gravatar image

How to find modulo(%) of secp256k1 publick key ? Or modulo of publick key belong to enother curve ?

Any methods are welcome.

Best Regards.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 3 years ago

Max Alekseyev gravatar image

updated 3 years ago

I'm not completely sure what is "modulo(%)" of a public key, but my best guess is that you ask about the order of the points on the elliptic curve. It is returned by the method .order(). For secp256k1 it can be obtained as

p = ZZ('0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F')
E = EllipticCurve( GF(p), [0, 7] )
n = E.order()
print('decimal representation:', n)
print('hexadecimal representation:', n.hex())

This matches the curve parameters given on page 9 in Standards for an efficient cryptography.

Preview: (hide)
link

Comments

I thant get modulo from publick key, like normal modul for ex 1026 MOD 64 is : 2

How to find modulo for 2 publick keys for example ? Publickkey1 MOD Publickkey2 = ? or PublicKey MOD Scalar = ?

Thank you

Gorge gravatar imageGorge ( 3 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 3 years ago

Seen: 791 times

Last updated: Apr 10 '22