Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sgiath/secp256k1
Elixir wrapper for Bitcoin Core secp256k1 library
https://github.com/sgiath/secp256k1
bitcoin cryptography elixir secp256k1
Last synced: 3 months ago
JSON representation
Elixir wrapper for Bitcoin Core secp256k1 library
- Host: GitHub
- URL: https://github.com/sgiath/secp256k1
- Owner: Sgiath
- License: other
- Created: 2023-01-16T10:25:00.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-29T20:52:38.000Z (about 1 year ago)
- Last Synced: 2024-10-14T19:04:07.280Z (3 months ago)
- Topics: bitcoin, cryptography, elixir, secp256k1
- Language: Elixir
- Homepage: https://sgiath.dev/libraries#secp256k1
- Size: 89.8 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Secp256k1 library
[![Hex.pm](https://img.shields.io/hexpm/v/lib_secp256k1.svg?style=flat&color=blue)](https://hex.pm/packages/lib_secp256k1)
[![Docs](https://img.shields.io/badge/api-docs-green.svg?style=flat)](https://hexdocs.pm/lib_secp256k1)Elixir bindings for [secp256k1](https://github.com/bitcoin-core/secp256k1) library
## Installation
The package can be installed by adding `lib_secp256k1` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:lib_secp256k1, "~> 0.4.1"},
]
end
```During the compilation the C library is cloned and build from source. If you are having problem
compiling the library please refer to the original repository.The C code wrapping the library is also build during the compilation. I only tested it on Linux
machine so if you are having problem compiling it on Mac or Windows it is most likely related to
that. Please fill an issue but I don't have other systems available to me so don't expect me to
fix it anytime soon (contributions are welcome though :) ).## Features
- [x] generate secure random seckey
- [x] derive pubkey and serialize it in compressed, uncompressed or xonly format
- [x] generate and validate ECDSA signatures
- [x] generate and validate Schnorr signatures
- [x] compute Diffie-Hellman secret