Comments (2)
Hi @afk11 thank you very much for your answer. All is clear now !
from secp256k1-php.
Hi
secp256k1 field elements are 32 bytes, so 64 bytes each in hex. However, the DER encoding of public keys includes an extra byte of prefix, indicating what form the key is.
there are 5 prefixes supported by bitcoin:
\x04 - an uncompressed key, (1 + 32 + 32 => 130 hex) prefix + x and y coordinate
\x02 + \x03 - compressed key, (1 + 32 => 66) prefix (including compression bit) and the x coordinate
\x06 + \x07 - hybrid compressed key, (1 + 32 => 66) prefix (including compression bit) and the x coordinate
The first three are commonly used in bitcoin. There may be protocols which omit the prefix because a specification dictates the full x+y point must be sent. But for this library, it is correct to include the prefix.
from secp256k1-php.
Related Issues (20)
- How to generate private key? HOT 2
- error HOT 1
- Building secp256k1-php with secp256k1 master fails to compile HOT 9
- PHP 7.2 doesn't work HOT 1
- Warning on secp256k1 make from current master and error on secp256k1-php make HOT 1
- 这个是什么问题啊 HOT 1
- secp256k1_ecdh.h No such file or directory HOT 2
- memleak in secp256k1_ec_pubkey_serialize HOT 7
- Installation Error HOT 1
- Add valgrind run to CI HOT 1
- secp256k1_ecdsa_sign: should support noncefp and ndata
- error callbacks
- PHP8 Install Error HOT 2
- Publish on PECL
- Unable to install secp256k1 on Windows PHP 7 HOT 1
- secp256k1_ecdsa_recoverable_signature_serialize_compact - fix API HOT 1
- secp256k1_ec_pubkey_serialize - fix API HOT 1
- Use zend_api macros to assign type hints - aka strict types HOT 1
- Automatically generate stubs HOT 1
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 secp256k1-php.