-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bitcoin-core] Add differential cryptography fuzzer #5717
[bitcoin-core] Add differential cryptography fuzzer #5717
Conversation
Does cryptofuzz support msan? Eventually we should build with that sanitizer enabled: #5699 (comment) |
Yes this works with MSAN. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Will merge when requested.
Needs rebase |
Thanks! |
The fuzzer is built for and run on both 64 bit and 32 bit. I suppose this makes invoking
OK. This is already the case: the MemorySanitizer build is built without assembly, the other sanitizers are built with assembly.
OK, I'll remove it.
3 * 3 * 2 = 18 different configuration options. It is possible to build 18 different binaries, but I think that the CPU time allotted to this project by OSS-Fuzz will be divided across 18 targets, which may impede fuzzer progress compared to just one or a few targets. Perhaps there is a good middle ground we can decide on? |
--ecmult-window and --ecmult-gen-precision don't interact really; the first is used only for variable-time functions, while the latter is for constant-time ones (roughly). I don't think there is any API call that is affected by both. That means just 3 combinations (e.g. both small, both default, both large) should be sufficient. |
Still needs rebase or merge with master? |
Should be good to merge now @jonathanmetzman |
@MarcoFalke @sipa I don't receive bug reports for this project. Please reach out if there's a crash that you can't diagnose. |
Please don't merge this yet..
This PR incorporates the changes submitted in #5716 so no merge conflicts should arise if this one is merged later..
At @MarcoFalke's request I'm submitting a separate PR for this, so it can be commented on separately by the Bitcoin Core devs.
This PR builds an extra fuzz target based using Cryptofuzz which tests the following:
Bitcoin Core
src/crypto
primitives:libsecp256k1-specific:
Botan and Trezor firmware are used as oracles (e.g. used for comparing the output of Bitcoin/secp256k1 against).
@sipa Do you have any suggestions as for additional secp256k1 compilation flags? E.g. particular
--with-ecmult-window
or--with-ecmult-gen-precision
settings that would be useful to test?