vyper icon indicating copy to clipboard operation
vyper copied to clipboard

Add built-in cryptographic constants (e.g. `secp256k1` curve order)

Open pcaversaccio opened this issue 10 months ago • 2 comments

It would be useful to have certain cryptographic constants as built-in constants:

Example:

  • The order of the secp256k1 curve : 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141
  • The order of the secp256r1 curve : 0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551

Furthermore, we could add some important BLS constants for example. A good reference/database on these constants can be found here.

pcaversaccio avatar Apr 21 '24 08:04 pcaversaccio

New constants and stuff like this would be great for namespacing in the standard library e.g. from crypto.secp256k1 import CURVE_ORDER or something (containing other types and functions like .derive_public_key(Signature) -> PublicKey)

fubuloubu avatar Apr 22 '24 16:04 fubuloubu

It would be useful to have certain cryptographic constants as built-in constants:

Example:

  • The order of the secp256k1 curve : 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141
  • The order of the secp256r1 curve : 0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551

Furthermore, we could add some important BLS constants for example. A good reference/database on these constants can be found here.

mozz30-tech avatar May 23 '24 04:05 mozz30-tech