Jacek Sieka a1560b915e
Cleanups, bump stint/stew (#13)
* prefer stew/staticfor
* cleanup pragmas
* unroll a few more things

These simplifications also bring a nice little 10-15% perf boost:

```
arnetheduck@praeceps:~/status/nimbus-eth1/vendor/nim-bncurve$
/home/arnetheduck/status/nimbus-eth1/vendor/nim-bncurve/benchmarks/bench
G1 Jacobian add: 578 ns
G1 toAffine: 3067 ns
G2 Jacobian add: 3141 ns
G2 toAffine: 3772 ns
G1 Jacobian mul: 191442 ns
G2 Jacobian mul: 819047 ns
Pairing: 2111668 ns
arnetheduck@praeceps:~/status/nimbus-eth1/vendor/nim-bncurve$
/home/arnetheduck/status/nimbus-eth1/vendor/nim-bncurve/benchmarks/bench
G1 Jacobian add: 497 ns
G1 toAffine: 2774 ns
G2 Jacobian add: 2701 ns
G2 toAffine: 3461 ns
G1 Jacobian mul: 147267 ns
G2 Jacobian mul: 633992 ns
Pairing: 1816686 ns
```
2024-12-11 12:12:35 +01:00
2024-12-11 12:12:35 +01:00
2024-12-11 12:12:35 +01:00
2018-09-27 13:35:59 +03:00
2024-12-11 12:12:35 +01:00
2018-09-27 13:35:59 +03:00
2018-09-27 13:35:59 +03:00
2022-04-08 09:04:30 +07:00

BNCurve

License: Apache License: MIT Stability: experimental Github action

Introduction

This pure Nim implementation of Barreto-Naehrig pairing-friendly elliptic curve.

This is a pairing cryptography library written in pure Nim. It makes use of the Barreto-Naehrig (BN) curve construction from [BCTV2015] to provide two cyclic groups G1 and G2, with an efficient bilinear pairing:

e: G1 × G2 → GT

This code is adaptation of bn library.

Security warnings

This library, like other pairing cryptography libraries implementing this construction, is not resistant to side-channel attacks.

Installation

Add to your .nimble file:

requires "https://github.com/status-im/nim-bncurve"

or install it via

nimble install https://github.com/status-im/nim-bncurve

Build and test

nimble install https://github.com/status-im/nim-bncurve
nimble test

License

Licensed and distributed under either of

or

at your option. This file may not be copied, modified, or distributed except according to those terms.

Description
Nim Barreto-Naehrig pairing-friendly elliptic curve implementation
Readme
Languages
Nim 100%