ibe: Avoid copies of bn256.{G1,G2,GT} objects

While the golang.org/x/crypto/bn256 implementation is amenable
to these object copies, other implementations such as
github.com/asimshankar/bn256 are not.

The motivation for this change was so that we experiment with switching
to the pairing implementation backed by
https://www.cryptojedi.org/crypto/#dclxvi

Without this patch, switching to github.com/asimshankar/bn256 causes
SIGSEGVs as copying the Go-objects might mess up the state in C.

For the curious: This change by itself shows no change in the
benchmarks, but switching to https://www.cryptojedi.org/crypto/#dclxvi
shows a considerable improvement on my amd64 machine:
BenchmarkExtractBB1-6  33ms   1ms (16x speedup)
BenchmarkEncryptBB-6   41ms   5ms (7x speedup)
BenchmarkDecryptBB-6   96ms   5ms (16x speedup)

Change-Id: I3409e2df62980c974f3917ef30e8422bfc4a8b37
2 files changed
tree: f154c7580b574b1237e5c5f819da70241fed7a59
  1. cmd/
  2. cmdline/
  3. dbutil/
  4. envvar/
  5. host/
  6. ibe/
  7. metadata/
  8. netconfig/
  9. netstate/
  10. set/
  11. textutil/
  12. timing/
  13. toposort/
  14. vlog/
  15. .gitignore
  16. .godepcop
  17. AUTHORS
  18. CONTRIBUTING.md
  19. CONTRIBUTORS
  20. LICENSE
  21. PATENTS
  22. README.md
  23. VERSION
README.md

This repository contains general purpose libraries used by the Vanadium project. TEST