packages feed

crypton-2.3.1 / cbits / tests / fuzz / README

Generated bytes fed to the code that parses what comes off the wire.Rounds one to ten asked prepared questions.  This one asks whether anythingbreaks on input nobody chose.  What is looked for is memory safety ratherthan wrong answers: these inputs are meant to be rejected, and the question ishow they are rejected.The harnesses are the places where bytes from elsewhere are taken apart:  ed25519  a public key and a signature, both the sender's to choose  decaf    point decoding, EdDSA public key decoding, Ed448 verification  p256     a point checked for being on the curve, then multiplied  aead     AES-GCM decryption, with the iv, aad and tag lengths from the wire  canary   the calibrationfuzz_canary reads one byte past a buffer when the input opens with fourparticular bytes.  Four is the point: one chance in 2^32 puts it out of reachof throwing random input at the harness, and well within reach of a fuzzerthat watches which comparisons it got past.  So a campaign that does notreport the canary is not exploring, and the silence of the others would meannothing.  Round five believed a ThreadSanitizer zero that meant nothing andround ten twice believed a scrubbing zero that meant nothing; this is cheaperthan learning it a third time.The corpus is seeded with inputs each harness accepts -- a signature thatverifies, the same with one bit of the message moved, a point that is on thecurve, a ciphertext that authenticates -- so that a campaign starts from thefar side of the checks rather than in front of them.  They were generated byrunning the primitives, and checked: the valid signature verifies, thetampered one does not, the point is on the curve.Where clang has no libFuzzer runtime -- Apple's does not -- run.sh replays thecorpus and a deterministic stream through standalone.c instead.  That says theharnesses build and run clean under the sanitizers.  It explores nothing, andit says so rather than reporting a pass.