Comments (7)
ZCash encoding is now available as an option, if and only if the modulus has 3 spare bits available in its most significant byte. So a 381-bit modulus has 3 spare bits, whereas a 383 bit modulus has only one. To activate, manually set ALLOW_ALT_COMPRESS to true. This flag may be found in the config_curve.* file, or in ecp.*
G2 coordinate component ordering has been switched in all cases.
Probably needs a bit more testing..
from core.
If each curve gets its own bespoke compression format, then we are heading for chaos. And just to save one byte! And the determination of sign is here based on the MSB of y, whereas using the LSB (Least Significant Bit) is more common. Indeed the Hash-To-Curve draft standard just removed MSB as an option, and here it is back again! And for y_1=a+ib and y_2=c+id \in F_{p^2} which is "lexicographically largest"? Not immediately clear to me.
Having said that it will not be hard to do. IF the curve has 3 spare bits and IF MSB sign is selected (BIG_ENDIAN_SIGN), then we can offer it as an option.
from core.
As a poor minion who has to deal with whatever the spec says (and other implementations produce) would certainly appreciate that :-)
from core.
Is it actually the MSB? Since p
isn’t a power of two, aren’t there possible y coordinates (close to the middle of the range) that are negations of each other, but where the MSB is both 0? Maybe that’s the reason why they refer to a (lexicographic) order instead.
from core.
Yes, you are right. I was using MSB rather loosely..
from core.
Oh, and just before someone else stumbled over this: The ZCash encoding also encodes the components of a G2 point in the other order (first b
then a
)
from core.
Yes, just noticed that. Strange and rather non-intuitive (to me anyway). But there are no standards for this as far as I am aware, so I am happy to go along..
from core.
Related Issues (20)
- JS library doesn't compile HOT 1
- BLS: bug in Rust implementation? HOT 3
- ECP::muln() bug? HOT 2
- Bug with BIG.mod in Java? HOT 2
- ECP2 multiply by FP in golang? HOT 15
- G2mul for ECP? (Golang) HOT 3
- golang: Signature Recover function using FP, ECP
- core/python could be structured more like a Python module HOT 2
- Javascript ecp2 toBytes functions gives not the same bytes as in the Java implementation HOT 5
- FP256BN Plus and math.MaxInt64
- feature request: addition of AES-CTR (and optionally, SIV-AES) HOT 2
- Reporting security issues HOT 2
- BLS12-381 Signature Aggregation HOT 3
- Is `ECP::mapit` a good random oracle? HOT 4
- secp256r1 HOT 2
- Support go modules HOT 3
- Pairing Example with JS
- select indepentent generator with node js HOT 1
- Attack against M-PIN HOT 4
- core/java: ECP compression HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from core.