Comments (2)
I'm considering to add files with IEEE P1363 encoded signatures. These are fixed length encodings of r and s. There is also the webcrypto format which is similar.
I'm unsure whether raw r and s makes sense. The question is to find the boundaries in this case.
Libraries that allow arbitrary inputs (e.g. stuff written in javascript or python) are difficult to test in this way. For example a few years ago I found a ridiculous implementation in python, where any signatures
were easily forged by setting r=1 and s=0.5
The library would verify the signatures somewhat like this:
First check 0<r<q and 0<s<q, which of course passes.
Then compute the modular inverse of s. Because of lack of checks it would result in s^-1 mod q == 0.
Compute u1 = h(msg) * s^-1 mod q (hence get u1 = 0)
Compute u2 = r * s^-1 mod q (hence get u2=0)
Compute v = g^u1 y^u2 mod p mod q (and get v = 1)
and finally verify v == r.
If the signatures are in a specific encoding then such examples can be tested if the encoding allows
such input (e.g. ASN does) or leave them out if the encoding does not support such things.
Generally the goal is to have test vectors that are close to the input formats that are actually used.
from wycheproof.
Test vectors with P1363 encoded signatures were added.
Please reopen this ticket if you need more help or want to discuss this further.
from wycheproof.
Related Issues (20)
- Please update ecdh.md
- X448 vectors? HOT 5
- Test case P-384/P-521 bug from golang HOT 5
- Distinguish ECDSA malleability? HOT 12
- Fix Bazel Dependency HOT 1
- ChaCha20-Poly1305 large test vectors HOT 4
- When will you have an update on this project? HOT 1
- x448_test.json contains 57-byte public keys? HOT 1
- ind_cpa_test_schema.json: unused tagSize field HOT 1
- License Citation and Using Wycheproof Tests
- For more security spongycastle -> bouncycastle
- Add testcases for nettle ECDSA vulnerability
- Update public GitHub repo with latest version available
- OpenJDK tests no longer run on latest JDK versions HOT 1
- How to run Javascript tests?
- Minor feature request: unify JWK representations in JSON test vectors
- Make use of github actions
- No RsassaPkcs1Generate tests in testvectors_v1
- Support for ChaCha20 testvectors? HOT 9
- DsaTest.testTiming() could use a warmup HOT 3
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 wycheproof.