Pairing-based cryptography for Go
Go C
Latest commit d8dc625 Aug 25, 2016 @Nik-U Bump Travis CI to Go 1.7
Permalink
Failed to load latest commit information.
.travis.yml Bump Travis CI to Go 1.7 Aug 26, 2016
AUTHORS Ported integration tests. Packaged for release Feb 4, 2015
COPYING Ported integration tests. Packaged for release Feb 4, 2015
COPYING.LESSER Ported integration tests. Packaged for release Feb 4, 2015
INSTALL Documentation fixes Feb 14, 2015
README.md Removed POSIX requirement; support Win,BSD,Darwin Feb 6, 2015
c.go Reformat copyright blocks Feb 5, 2015
doc.go Documentation fixes Feb 14, 2015
doc_bls_test.go Reformat copyright blocks Feb 5, 2015
doc_test.go Reformat copyright blocks Feb 5, 2015
element.go Updated to support Go 1.6 (new pointer rules for cgo) Aug 16, 2016
element_arith.go Updated to support Go 1.6 (new pointer rules for cgo) Aug 16, 2016
element_arith_simple.go Reformat copyright blocks Feb 5, 2015
element_fmt.go Removed POSIX requirement; support Win,BSD,Darwin Feb 6, 2015
element_io.go Updated to support Go 1.6 (new pointer rules for cgo) Aug 16, 2016
element_misc.go Reformat copyright blocks Feb 5, 2015
errors.go Reformat copyright blocks Feb 5, 2015
generation.go Updated to support Go 1.6 (new pointer rules for cgo) Aug 16, 2016
gmp_big.go Updated to support Go 1.6 (new pointer rules for cgo) Aug 16, 2016
memstream.h Removed POSIX requirement; support Win,BSD,Darwin Feb 6, 2015
memstream_bsdlike.go Removed POSIX requirement; support Win,BSD,Darwin Feb 6, 2015
memstream_other.go Removed POSIX requirement; support Win,BSD,Darwin Feb 6, 2015
memstream_posix.go Removed POSIX requirement; support Win,BSD,Darwin Feb 6, 2015
pairing.go Updated to support Go 1.6 (new pointer rules for cgo) Aug 16, 2016
params.go Updated to support Go 1.6 (new pointer rules for cgo) Aug 16, 2016
pbc_test.go Updated to support Go 1.6 (new pointer rules for cgo) Aug 16, 2016
rand_hook.c Reformat copyright blocks Feb 5, 2015
utils.go Updated to support Go 1.6 (new pointer rules for cgo) Aug 16, 2016

README.md

The PBC Go Wrapper Build Status GoDoc

Package pbc provides structures for building pairing-based cryptosystems. It is a wrapper around the Pairing-Based Cryptography (PBC) Library authored by Ben Lynn (https://crypto.stanford.edu/pbc/).

This wrapper provides access to all PBC functions. It supports generation of various types of elliptic curves and pairings, element initialization, I/O, and arithmetic. These features can be used to quickly build pairing-based or conventional cryptosystems.

The PBC library is designed to be extremely fast. Internally, it uses GMP for arbitrary-precision arithmetic. It also includes a wide variety of optimizations that make pairing-based cryptography highly efficient. To improve performance, PBC does not perform type checking to ensure that operations actually make sense. The Go wrapper provides the ability to add compatibility checks to most operations, or to use unchecked elements to maximize performance.

Since this library provides low-level access to pairing primitives, it is very easy to accidentally construct insecure systems. This library is intended to be used by cryptographers or to implement well-analyzed cryptosystems.

Features

  • 5 different pairing types
  • Pairing generation
  • Parameter export and import
  • Element type checking
  • Fast element arithmetic and pairing
  • Element randomization
  • Element export and import
  • Automatic garbage collection
  • Integration with fmt
  • Integration with math/big

Dependencies

This package must be compiled using cgo. It also requires the installation of GMP and PBC. During the build process, this package will attempt to include gmp.h and pbc/pbc.h, and then dynamically link to GMP and PBC. Installation on Windows requires the use of MinGW.

Documentation

For additional installation instructions and documentation, see https://godoc.org/github.com/Nik-U/pbc