crypto

package
v0.16.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

README

Crypto Package

| Important: Kryptology package Original development by Coinbase - now maintained internally at Sonr.

Go Reference

Coinbase's advanced cryptography library used for Sonr's internal cryptographic operations.

Usage

Use the latest version of this library:

go get github.com/sonrhq/sonr/pkg/crypto

Pin a specific release of this library:

go get github.com/sonrhq/sonr/pkg/crypto@v0.8.6

Components

The following is the list of primitives and protocols that are implemented in this repository.

Curves

The curve abstraction code can be found at crypto/core/curves/curve.go

The curves that implement this abstraction are as follows.

Protocols

The generic protocol interface crypto/core/protocol/protocol.go. This abstraction is currently only used in DKLs18 implementation.

Contributing

  • 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

References

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSignatureData

func NewSignatureData(msgHash []byte, publicKey string, r, s *big.Int) (string, error)

func SignCompact

func SignCompact(curve *btcec.KoblitzCurve, r, s *big.Int, publicKey btcec.PublicKey, hash []byte, isCompressedKey bool) ([]byte, error)

SignCompact Calculate the signature string according to R and S

func SignToString

func SignToString(sign []byte) string

Types

This section is empty.

Directories

Path Synopsis
Package accumulator implements the cryptographic accumulator as described in https://eprint.iacr.org/2020/777.pdf It also implements the zero knowledge proof of knowledge protocol described in section 7 of the paper.
Package accumulator implements the cryptographic accumulator as described in https://eprint.iacr.org/2020/777.pdf It also implements the zero knowledge proof of knowledge protocol described in section 7 of the paper.
Package bulletproof implements the zero knowledge protocol bulletproofs as defined in https://eprint.iacr.org/2017/1066.pdf
Package bulletproof implements the zero knowledge protocol bulletproofs as defined in https://eprint.iacr.org/2017/1066.pdf
Package core contains a set of primitives, including but not limited to various elliptic curves, hashes, and commitment schemes.
Package core contains a set of primitives, including but not limited to various elliptic curves, hashes, and commitment schemes.
dkg
ot
Package paillier contains Paillier's cryptosystem (1999) [P99].
Package paillier contains Paillier's cryptosystem (1999) [P99].
Package sharing is an implementation of shamir secret sharing and implements the following papers.
Package sharing is an implementation of shamir secret sharing and implements the following papers.
signatures
tecdsa
Package ted25519 implements the Ed25519 signature algorithm.
Package ted25519 implements the Ed25519 signature algorithm.
zkp

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL