I hereby claim:
- I am alxiong on github.
- I am alexxiong97 (https://keybase.io/alexxiong97) on keybase.
- I have a public key ASAbph-GOODq3RMWsDvNBYTvUIHGdMAEj3V1ShQDGm9uOAo
To claim this, I am signing this object:
package main | |
import ( | |
// "crypto/rand" | |
"fmt" | |
"github.com/cloudflare/bn256" | |
// "io" | |
"math/big" | |
) |
pragma solidity ^0.5.7; | |
/// @title LibPrecompiled - A wrapper around precomplied contracts for EC op | |
/// @notice This contract try to abstract away calling of precompiled native | |
/// contract to make using EC operations on BN_256 curve easier | |
contract LibPrecompiled { | |
// details see: https://cryptojedi.org/papers/dclxvi-20100714.pdf | |
// exact parameters: https://gist.github.com/AlexXiong97/217f42ee4d0dedc6182b182134caeed9 |
I hereby claim:
To claim this, I am signing this object:
use ark_bls12_381::Fr as BlsScalar; | |
use ark_ff::{FpParameters, PrimeField}; | |
// The number of bits that can be reliably stored for BlsScalar. (Should equal | |
// SELF::MODULUS_BITS - 1) | |
const BLS_SCALAR_BIT_CAPACITY: u32 = <BlsScalar as PrimeField>::Params::CAPACITY; | |
// 31 bytes a chunk | |
const BLS_SCALAR_BYTE_CAPACITY: usize = BLS_SCALAR_BIT_CAPACITY as usize / 8; | |
/// Two-way, deterministic, infalliable conversion between arbitrary bytes (of |
Top personal takeaways are: