Comments (4)
You mean test vectors containing plaintext longer than 256 or 512 bytes?
It sounds like a good idea.
@bleichen what do you think?
from wycheproof.
First, I'm a bit surprised that using 512 byte blocks with AVX2 intrinsics would give optimal performance. I wouldn't expect larger than 256 byte blocks here.
Adding a few longer test vectors can be done. Though the question that remains is whether this
is effective. One likely source for problem is the poly1305 computation, which can easily suffer
from overflow problems if parallelized carelessly. To generate test vectors that check the poly1305
computation for overflows, I generated a large number of keys and selected those keys where the
poly1305 subkeys were extreme. This assumes that Horner's method is used. Hence it is likely that overflows in a parallel poly1305 implementation would currently remain undetected.
I'd guess that test vectors for poly1305 alone, with extreme sub keys could help.
Another source for errors are incremental updates. E.g. this paper has some results:
https://eprint.iacr.org/2017/891.pdf
Flaws can occur at just a few specific input sizes. Not sure what specific input sizes
are most problematic for parallelized implementations.
from wycheproof.
I meant to say ChaCha20 rather than ChaCha20-Poly1305, so that might have confused the issue.
See here for an implementation that has an optimized path for >512 bytes:
I hope, on that basis alone, the case for larger test vectors is self explanatory?
I found I had to create larger test vectors in order to catch AVX2 implementation bugs in my own implementation. I have no experience in what makes a good test vector hence why I opened this issue.
from wycheproof.
from wycheproof.
Related Issues (20)
- Duplicate symbol appears in alphabet for FF1 base85 test file HOT 7
- Tag in Ascon-80pq test vector is incorrect HOT 1
- ECDSA: Add recovery ID to test cases HOT 11
- 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
- Zero-length KWP keys should set 'invalid' result HOT 4
- A few KW tests in v1 folder marked "acceptable" violate spec for minimum plaintext length 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 wycheproof.