Giter Club home page Giter Club logo

bls12's People

Contributors

dis2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bls12's Issues

Enforce size when unmarshalling uncompressed points

Currently you can in certain scenarios unmarshal an uncompressed point of the incorrect size.
One such an example on G1 is the point which marshals to (in uncompressed form):
[15 133 139 158 48 39 204 194 85 143 234 84 72 108 17 55 40 63 225 173 59 232 133 119 242 104 119 78 193 154 199 76 209 47 128 145 34 95 166 62 1 52 93 176 49 82 172 198 11 1 91 45 211 233 89 158 15 160 59 146 255 231 183 95 222 238 59 140 51 54 4 31 113 164 45 217 126 151 112 149 141 130 230 190 165 117 138 186 110 58 55 140 228 77 232 155]

If the first byte of that is removed, it will still unmarshal even though it is of the wrong size according to the specification for bls12-381 serialization. (https://github.com/ebfull/pairing/tree/master/src/bls12_381)

Could it be checked that the size of what is being unmarshalled matches the compressed or uncompressed size exactly?

Error when running tests

When I try running a test case, I get the following error:

# github.com/dis2/bls12
/usr/bin/ld: $WORK/github.com/dis2/bls12/_obj/add.o: relocation R_X86_64_32S against `.data' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: $WORK/github.com/dis2/bls12/_obj/mul.o: relocation R_X86_64_32S against `.data' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: $WORK/github.com/dis2/bls12/_obj/rdc.o: relocation R_X86_64_32S against `.data' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status

Go version: 1.9.1

Add Copying to G1, G2, GT

Since the operations in this library are mutative, could a method to copy elements in each group be added?

Otherwise to copy points upstream, one has to Marshal and Unmarshal upstream to copy an element, which is unnecessarily costly.

Error occurs in Ubuntu

github.com/dis2/bls12

/usr/bin/x86_64-linux-gnu-ld: $WORK/b058/_x011.o: relocation R_X86_64_32S against .data' can not be used when making a PIE object; recompile with -fPIC /usr/bin/x86_64-linux-gnu-ld: $WORK/b058/_x012.o: relocation R_X86_64_32S against .data' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: $WORK/b058/_x013.o: relocation R_X86_64_32S against `.data' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Process exiting with code: 1

By the way, it's ok in MS Window.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.