Comments (5)
Maybe as an additional comment. My goal was to produce a base64 string from the ECP2 object.
from core.
from core.
Hi Mike,
exactly. The internal format in hex is in both implementation the same and that is why I assume that both ECP2 objects are the same (or is it possible that the objects are not the same with the same internal hex representation?). Unfortunately, the JavaScript implementation (second array of decimals) of ECP2 gives me not the same byte array as the Java implementation it does (first array of decimals) when I call toBytes(). Do I miss something? I think it is not because of the 12*ctx.BIG.MODBYTES or maybe I didn't get the point.
From my point of view of my understanding the ECP2 implementation in JavaScript should give me the same result when I call toBytes() or is the internal hex representation not enough to check if both objects are the same?
My question is, could you help me to figure out the problem why I not getting the same byte array in both implementations? I am not sure if I missed something or if it exist a bug in the implementation (or similar).
I tried also if this is my fault because of the type of the array, but I don't get the correct bytes (decimals) when I use Uint8Array, Array or Int8Array.
My goal was to produce a base64 string from the byte array which is representing ("flattened") the ECP2 object in signed/unsigned decimals.
Not entirely sure what the point is here. The first array is an ECP2 instance, in its internal format, in hex. The second is the same data "flattened" into a single array of signed bytes in decimal. Which is what tobytes() should do. It should however be of size 4ctx.BIG.MODBYTES, not 12 - maybe that is the problem?? I couldn't relate the other arrays to these ones.. Mike
…
from core.
from core.
I found the issue. I did a mistake.
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
- 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.