Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mohanson/cryptography-python
secp256k1 in pure Python
https://github.com/mohanson/cryptography-python
Last synced: about 2 months ago
JSON representation
secp256k1 in pure Python
- Host: GitHub
- URL: https://github.com/mohanson/cryptography-python
- Owner: mohanson
- Created: 2022-10-09T09:49:41.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-09T09:24:21.000Z (9 months ago)
- Last Synced: 2024-04-09T10:35:36.815Z (9 months ago)
- Language: Python
- Size: 43 KB
- Stars: 14
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## cryptography-python
This is a tutorial project about cryptography in python. Follow the steps and you will fully understand the magic of elliptic curves from scratch.
- Each file can be run independently!
- There are detailed paper references in the comments of the codeBased on this project, I implemented the SDKs of three famous blockchain projects: BTC, ETH and CKB.
- : Early stage of the project.
- : Almost fully supported.
- : Almost fully supported.## secp256k1
paper:
- `secp256k1.py`: implement finite field and secp256k1 curve.
- `secp256k1_generate_public_key.py`: calculate bitcoin public key from private key.
- `secp256k1_sign.py`: signature messages and verify it.
- `secp256k1_extract_private_key.py`: extract the private key by two signatures that use the same k.
- `secp256k1_jacobian`: jacobian projective space.## polynomial arith
- `polynomial_numpy.py`: polynomial operation by numpy.
- `polynomial.py`: polynomial operation by hand writting python.## bn128
- `bn128.py`: bn128 curve, implements [eip-196](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-196.md), [eip-197](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-197.md).
- `bn128_ethereum_api.py`: bn128 pairing testsuite.