Ask Your Question
0

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

asked 2022-04-10 05:45:51 +0200

Gorge gravatar image

updated 2022-04-14 10:52:45 +0200

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.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2022-04-10 18:10:59 +0200

Max Alekseyev gravatar image

updated 2022-04-10 18:11:26 +0200

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.

edit flag offensive delete link more

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 ( 2022-04-10 18:40:04 +0200 )edit

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: 2022-04-10 05:45:51 +0200

Seen: 38 times

Last updated: Apr 10