Comments (2)
It looks like your buffer for the compressed point is too small. It should be 33 bytes in this case (uECC_BYTES + 1).
Sent from my iPhone
On Feb 28, 2015, at 5:31 PM, Shannon Holland [email protected] wrote:
I'm working with the uECC_secp256r1 curve and am seeing a case where a public key that is compressed then decompressed no longer seems to be correct. The actual byte array is different and any attempts to verify with it will also fail.
For example, the original public key I'm currently using is:
00: 15 1d af e7 69 47 22 9c
08: 34 c1 6b 1b ff af 1b f5
10: 9a e2 ec 61 17 75 35 90
18: 43 5d 0e 3f 35 56 25 b5
20: 7c 27 f6 52 82 c5 64 a4
28: 28 df c1 8d 7f 8c 80 41
30: 45 33 cf 61 92 92 1d ba
38: 12 e6 b4 79 f2 29 6b 36This compresses to:
00: 02 15 1d af e7 69 47 22
08: 9c 34 c1 6b 1b ff af 1b
10: f5 9a e2 ec 61 17 75 35
18: 90 43 5d 0e 3f 35 56 25And then decompresses to:
00: 15 1d af e7 69 47 22 9c
08: 34 c1 6b 1b ff af 1b f5
10: 9a e2 ec 61 17 75 35 90
18: 43 5d 0e 3f 35 56 25 45
20: 95 76 37 3c 5b 38 6a dd
28: f8 e8 6a 83 4e 12 1c bb
30: d5 67 2e d7 61 65 c3 6b
38: 7a ce 9c 2a bc b8 b4 c8At this point attempts to verify with that key will fail.
Should I be able to compress/decompress keys generated with this curve? Thank you for any help!
—
Reply to this email directly or view it on GitHub.
from micro-ecc.
Ugh - I’m an idiot!
Thank you!
Shannon
On Feb 28, 2015, at 7:12 PM, Ken MacKay [email protected] wrote:
It looks like your buffer for the compressed point is too small. It should be 33 bytes in this case (uECC_BYTES + 1).
Sent from my iPhone
On Feb 28, 2015, at 5:31 PM, Shannon Holland [email protected] wrote:
I'm working with the uECC_secp256r1 curve and am seeing a case where a public key that is compressed then decompressed no longer seems to be correct. The actual byte array is different and any attempts to verify with it will also fail.
For example, the original public key I'm currently using is:
00: 15 1d af e7 69 47 22 9c
08: 34 c1 6b 1b ff af 1b f5
10: 9a e2 ec 61 17 75 35 90
18: 43 5d 0e 3f 35 56 25 b5
20: 7c 27 f6 52 82 c5 64 a4
28: 28 df c1 8d 7f 8c 80 41
30: 45 33 cf 61 92 92 1d ba
38: 12 e6 b4 79 f2 29 6b 36This compresses to:
00: 02 15 1d af e7 69 47 22
08: 9c 34 c1 6b 1b ff af 1b
10: f5 9a e2 ec 61 17 75 35
18: 90 43 5d 0e 3f 35 56 25And then decompresses to:
00: 15 1d af e7 69 47 22 9c
08: 34 c1 6b 1b ff af 1b f5
10: 9a e2 ec 61 17 75 35 90
18: 43 5d 0e 3f 35 56 25 45
20: 95 76 37 3c 5b 38 6a dd
28: f8 e8 6a 83 4e 12 1c bb
30: d5 67 2e d7 61 65 c3 6b
38: 7a ce 9c 2a bc b8 b4 c8At this point attempts to verify with that key will fail.
Should I be able to compress/decompress keys generated with this curve? Thank you for any help!
—
Reply to this email directly or view it on GitHub.—
Reply to this email directly or view it on GitHub #22 (comment).
from micro-ecc.
Related Issues (20)
- Questions about ECDSA HOT 2
- Contact for responsible disclosure HOT 2
- Check for identity element is missing during verification
- Question about the public private key generation using secp160r1
- how to set the RNG function? HOT 2
- HASH out value differnet on same file? HOT 6
- Hard fault on cortex M0+
- With latest IAR ARM Embedded workbench version 9.32 not able to compile this code HOT 2
- Earlyclobber inline asm input registers
- easy-ecc compatability?
- secp160r1 incorrect signatures on ARM Cortex M0 HOT 2
- Expression cannot be used as a function
- Point addition of same point
- Different results on different platforms
- mbedtls_ecdh_gen_public speed dosen't improve HOT 1
- not fast enought HOT 1
- GCC + `-Wpedantic` throws warning about `__int128`
- 16-bit Implementation (MSP430)
- Will micro-ecc support for openharmony in thre future?
- Public key uncompression issue for secp384r1
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 micro-ecc.