Comments (1)
The issue is that the size of P384 keys must be 48 bytes.
The zero byte at the beginning is due to the ANS1 encoding of octet strings. Look at this link
To get the right value, use the asn1 parser:
$ openssl ec -in key.pem | openssl asn1parse
read EC key
writing EC key
0:d=0 hl=3 l= 164 cons: SEQUENCE
3:d=1 hl=2 l= 1 prim: INTEGER :01
6:d=1 hl=2 l= 48 prim: OCTET STRING [HEX DUMP]:E3247D99980FEB85A041DFAFF11DA95081F1FD9DF9CBCBD21237BD9131B79EB084FF24A5E2BA462677E234998F69483F
56:d=1 hl=2 l= 7 cons: cont [ 0 ]
58:d=2 hl=2 l= 5 prim: OBJECT :secp384r1
65:d=1 hl=2 l= 100 cons: cont [ 1 ]
67:d=2 hl=2 l= 98 prim: BIT STRING
More specifically:
$ openssl ec -in key.pem | openssl asn1parse -offset 6 -item ASN1_OCTET_STRING
read EC key
writing EC key
ASN1_OCTET_STRING:
0000 - e3 24 7d 99 98 0f eb 85-a0 41 df af f1 1d a9 50 .$}......A.....P
0010 - 81 f1 fd 9d f9 cb cb d2-12 37 bd 91 31 b7 9e b0 .........7..1...
0020 - 84 ff 24 a5 e2 ba 46 26-77 e2 34 99 8f 69 48 3f ..$...F&w.4..iH?
from circl.
Related Issues (20)
- go plugin not compiling HOT 3
- OPRF - Export Public Key HOT 3
- Add Ascon-80pq to cipher\ascon HOT 2
- cipher/ascon: go routine safe? HOT 1
- Add Validate() function to kem.PublicKey and kem.PrivateKey interfaces
- enhancement request: implement KDF (SDHI and/or Naor-Reingold) HOT 4
- Add KEM combiner which is IND-CCA2 robust HOT 5
- Compatibility with npmjs.com/package/dilithium-crystals HOT 5
- [QUESTION]: is blindsign package post-quantum secure ? HOT 4
- Bytes() and SetBytes() are not match in BLS12381 G1 and G2 HOT 3
- repo: consider add govulncheck to CI job
- enhancement request: Implement McCallum-Relyea exchange HOT 1
- oprf: Update latest test vectors
- blindrsa: update test vectors to match RFC9474 HOT 1
- add disclaimer and warning to README about Kyber patent
- Unusual Behavior: Successful Signature Verification After Altering Private Key HOT 4
- Why were the patch versions for CVE-2023-1732 released so late? HOT 2
- does KyberSlash affect this verison of Kyber? HOT 3
- ML-DSA? 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 circl.