Comments (6)
secp256k1_ecdsa_verify()
(defined in include/secp256k1.h
, line 381) is the verify function, see the comment in the header file.
The function secp256k1_ecdsa_verify()
is used in keys/pubkey.cpp
, secp256k1/src/bench_verify.c
and a test file. In keys/pubkey.cpp
the function CPubKey::Verify
uses the secp256k1 verify function. This might be altered to a brainpool verify function.
The Verify
function of the class CPubKey
is used in the class TransactionSignatureChecker
in function VerifySignature
in the file script/interpreter.cpp
, which are thus reasons to believe that this is indeed correct. Notice that the Verify
function is also used in structs/alert.cpp
, protocol/handshake.cpp
, protocol/multichainblock.cpp
, core/init.cpp
and keys/key.cpp
.
from polling-station-app.
A public key is stored in the class CPubKey
. This class is defined in pubkey.h
and implemented in pubkey.cpp
. The class, contains a private variable called vch
, which represents the public key and is a array of chars of length 65. This must be altered to at least 80 bytes for passports produced after 9 March 2014, and might even needs to be bigger for passports prior 9 March 2014. Note that the passport produced prior 9 March 2014 might use a different curve than BrainpoolP320r1, see this, page 11.
The static method GetLen()
calculates the length of the public key by looking at the first byte. In sep256k1 curves, public keys can have different lengths. We need to alter GetLen()
so it returns the brainpoolP320r1 public key size. Don't know if we can look at first byte and determine the size of the public key.
The Verify()
function expects two arguments: a hash and a DER signature. The hash is probably a sha256 hash. In a comment double SHA-256 is mentioned.
Besides this, we might need to alter key.c
, which holds a private key. This because of the genesis block?
from polling-station-app.
Small script to verify a passport active authentication signature using crypto++:
https://gist.github.com/landgenoot/6f9a58876ea0f03a48b9485159ad7869
from polling-station-app.
Seems that vchDefaultKey
, in the file wallet/wallet.cpp
line 3435, is not fully valid in pubkey-use-brainpool branch, opposite in what happens in the master branch where vchDefaultKey
is fully valid. Looking in to this now
from polling-station-app.
Signing and verifying now works with brainpoolP320r1. The hash to be signed is also split up in four different parts and are signed/verified separate. Next step is to clean up the code and create a transaction from a passport.
from polling-station-app.
See pr digital-voting-pass/e-passport-chain#2
from polling-station-app.
Related Issues (20)
- Create nice readme and check licence HOT 3
- Slow travis build
- App opens mainactivity when a new block is generated or new connection
- Fix NFC in API23
- About page in app HOT 2
- Pixel polishing HOT 8
- Reject transaction if it does not appear in the next block HOT 1
- Create better traineddata
- Translate app to Dutch and review English strings
- Returning to mainactivity from OCR scanner by pressing back button is very slow HOT 1
- Create option to turn on flash in scanner HOT 2
- Test PassportTransactionFormatter
- Add tutorial about how to create assets on multichain in the readme
- Fix android code lint warnings
- Peers HOT 1
- Report HOT 1
- use ro.ttf font everywhere HOT 1
- Illegal derived key error in blockchain init HOT 3
- ePassportChain
- Presentation 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 polling-station-app.