Sonr's advanced cryptography library, forked from Coinbase's Kryptology
Use the latest version of this library:
go get github.com/sonr-io/crypto
Pin a specific version of this library:
go get github.com/sonr-io/[email protected]
Documentation can be found at the Sonr developer portal.
To access the documentation of the local version, run godoc -http=:6060
and open
the following URL in your browser:
http://localhost:6060/pkg/github.com/sonr-io/crypto/
Prerequisites: golang 1.22+
, make
# Set up Go environment for private repositories
export GOPRIVATE=git.sonr.io
export GONOPROXY=git.sonr.io
export GONOSUMDB=git.sonr.io
# Clone and build
git clone https://github.com/sonr-io/crypto.git && cd crypto && make
The following is the list of primitives and protocols that are implemented in this repository.
The curve abstraction code can be found at pkg/core/curves/curve.go
The curves that implement this abstraction are as follows:
The generic protocol interface pkg/core/protocol/protocol.go
.
This abstraction is currently only used in DKLs18 implementation.
- Cryptographic Accumulators
- Bulletproof
- Oblivious Transfer
- Threshold ECDSA Signature
- Threshold Schnorr Signature
- Paillier encryption system
- Secret Sharing Schemes
- Verifiable encryption
- ZKP Schnorr
Sonr has actively maintained and enhanced this library with the following improvements:
- Updated to support Go 1.22+
- Fixed dependency issues and modernized package imports
- Enhanced performance for cryptographic operations
- Added additional curve support for blockchain compatibility
- Improved documentation and examples
- Integration with Sonr's wallet infrastructure
This cryptography library serves as the foundation for the Sonr Go Wallet SDK, providing the cryptographic primitives needed for secure wallet operations across multiple blockchains.
Contributions to the Sonr cryptography library are welcome. Please follow these guidelines:
- Versioning:
vMajor.Minor.Patch
- Major revision indicates breaking API change or significant new features
- Minor revision indicates no API breaking changes and may include significant new features or documentation
- Patch indicates no API breaking changes and may include only fixes
- [GG20] One Round Threshold ECDSA with Identifiable Abort.
- [EL20] Eliding RSA Group Membership Checks.
- [P99] Public-Key Cryptosystems Based on Composite Degree Residuosity Classes.
This library is licensed under the Apache License 2.0.