q9f/secp256k1.cr
a native library implementing secp256k1 purely for the crystal language.
18 Releases
Latest: 4y ago
lib secp256k1.cr v0.5.0v0.5.0Latest
📋 Changes
- the entire gem has been completely refactored and optimized. instead of listing all the changes, it's worth taking a look at the docs: https://q9f.github.io/secp256k1.cr/
- the only logic change is that signatures are now deterministic as per rfc-6979: https://datatracker.ietf.org/doc/html/rfc6979
- old signatures remain valid, though.
- new signatures also encode a recovery id in `v`.
- ethereum and bitcoin accounts have been demoted to _examples_ as they should be handled in external libraries. they live in their own namespace now and should be considered educational material.
- docs: publish for 0.5 by @q9f in https://github.com/q9f/secp256k1.cr/pull/60
- lib: add an ethereum example implementation by @q9f in https://github.com/q9f/secp256k1.cr/pull/59
- lib: add an bitcoin example implementation by @q9f in https://github.com/q9f/secp256k1.cr/pull/58
- + 8 more
lib secp256k1.cr v0.3.6v0.3.6
📋 Changes
- ci: fix github workflows #45
- docs: regenerate crystal documentation #46
- shards: update supported crystal version to v1.1.1 #47
lib secp256k1.cr v0.3.5v0.3.5
📋 Changes
- Shards: bump crystal to v0.36.1 (#44)
lib secp256k1.cr v0.3.4v0.3.4
📋 Changes
- Shards: bump crystal version to 0.35.1 (#43)
lib secp256k1.cr v0.3.3v0.3.3
📋 Changes
- Hash: Fix deprecated warnings (crystal 0.35) (#41)
- Shards: bump crystal version to 0.35.0 (#42)
lib secp256k1.cr v0.3.2v0.3.2
📋 Changes
- ensure crystal 0.34 compatibility (#40)
lib secp256k1.cr v0.3.1v0.3.1
📋 Changes
- update crystal version to 0.33.0 #39
lib secp256k1.cr v0.3.0v0.3.0
📋 Changes
- `EC_Point` is now `ECPoint`
- `ECDSA_Signature` is now `ECDSASignature`
- all hashing functions ending with `_string` are renamed now overloadable with `String`
- changes to code style (#34)
- add stats to nightly workflows (#36)
- overload hashing functions with strings (#37)
- update contributors (#38)
lib secp256k1.cr v0.2.2v0.2.2
📋 Changes
- `Secp256k1::Keypair`
- `Secp256k1::Bitcoin::Account`
- `Secp256k1::Ethereum::Account`
- `Secp256k1::Ethereum::Enode`
- add devp2p enode support #31
- add mini_is_valid? #29
lib secp256k1.cr v0.2.1v0.2.1
📋 Changes
- mini-private keys now use BASE-56 instead of BASE-57. that does not affect existing mini-private keys.
- added `Secp256k1::Bitcoin.wif_from_private_uncompressed` wrapper for uncompressed wif
- renamed `Secp256k1::Bitcoin.wif_compressed_from_private` to `.wif_from_private_compressed`
- private keys are handled as `BigInt` instead of a `String` literals wherever possible, e.g., `Secp256k1::Bitcoin.address_from_private` or `Secp256k1::Ethereum.address_from_private`
- constants: renamed `EC_PARAM_PRIME` to `EC_PRIME_P`
- replaced `BASE_57` in favor of `BASE_56` by removing the `o` from the alphabet as recommended by the Bitcoin Wiki.
- binary hashing operations now directly operate on `Bytes` instead of `String` literals, e.g., `Secp256k1::Hash.sha3`, `.sha256`, `.keccak256`, `.ripemd160`
- added `Secp256k1::Hash.ripemd160_string` for RIPEMD-160 hashes on `String` literals to complement `.sha3_string`, `.sha256_string`, and `.keccak256_string`
- + 3 more
lib secp256k1.cr v0.2.0v0.2.0
📋 Changes
- `Secp256k1`: necessary constants and data structures
- `Secp256k1::Core`: the entire core mathematics behind the elliptic curve cryptography
- `Secp256k1::Util`: all tools for the handling of private-public key-pairs
- `Secp256k1::Hash`: implementation of various hashing algorithms for convenience
- `Secp256k1::Signature`: allows for signing messages and verifying signatures
- `Secp256k1::Bitcoin`: for the generation of bitcoin addresses
- `Secp256k1::Ethereum`: for the generation of ethereum addresses
- add docs to readme (#26)
- + 3 more
lib secp256k1.cr v0.1.6v0.1.6
📋 Changes
- allow to sign and verify messages #20
lib secp256k1.cr v0.1.5v0.1.5
📋 Changes
- allow for wif to address #19
lib secp256k1.cr v0.1.4v0.1.4
📋 Changes
- try: add an example program #14
- add support for mini private keys #16
- add support for wallet import format #18
lib secp256k1.cr v0.1.3v0.1.3
📋 Changes
- add cryptographic hashing functions #9
- add bitcoin and ethereum address modules #9
- allow for export of unprefixed uncompressed keys for ethereum #9
- add tests for hashes on bytes #9
- implement eip-55 test cases #9
- bind mpz_powm_sec from libgmp #11
lib secp256k1.cr v0.1.2v0.1.2
📋 Changes
- allow for converting between different public key formats #7
- add a known private key to tests #7
- raise if it tries to decode compressed keys as mod_exp overflows #7
lib secp256k1.cr v0.1.1v0.1.1
📋 Changes
- use proper integer division #6
- ensure private keys are within the ec field size #6
- disallow ec multiplication with invalid private keys #6
lib secp256k1.cr v0.1.0v0.1.0
📋 Changes
- the constants describing the elliptic curve #1
- the four `Secp256k1::` key functions for `ec_mul`, `ec_add`, `ec_double`, and `ec_mod_inv` #1
- utilities to generate private and public keys #1
- tests for the secp256k1 module #1
- a struct for `EC_Point` #1
- github actions checking format and spec #2
- a meaningful readme #3
