Skip to content
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

Fuzzing methods #901

Merged
merged 4 commits into from
Jan 31, 2025
Merged

Fuzzing methods #901

merged 4 commits into from
Jan 31, 2025

Conversation

jaromil
Copy link
Member

@jaromil jaromil commented Jul 17, 2024

Add some handy functions to flip bits and bytes in random positions inside octets, or at beginning or end, using xor or random values.

@FilippoTrotter
Copy link
Collaborator

Based on the implementation of the Matasano challenge solutions, some others useful methods to have in Zenroom would be bitwise operations between octets, including AND, OR, and shift. Lua already implements these methods on integers, and it would be convenient to be able to do the same with zenroom.octet.

@matteo-cristino
Copy link
Collaborator

Please pay attention to indentation, in C it is tabs 8 spaces long

@FilippoTrotter FilippoTrotter marked this pull request as ready for review October 3, 2024 07:35
@jaromil
Copy link
Member Author

jaromil commented Oct 8, 2024

Waiting for @FilippoTrotter to complete it with deterministic state change checks: fuzzing should always change the contents of an octet and check the remote case in which random_bytes return same value or bitshift makes a full rotation.

jaromil and others added 3 commits January 31, 2025 18:03
refine fuzzer functions in separate source file

add random byte xor

TODO: change function names in

fuzz_(random|begin|end)_(byte|bit)
and optional suffix _xor

feat: add bitwise shift left and right for octets

feat: add octets bitwise operations: AND OR NOT

fix: octet or
fix: indentation

fix: fuzzing circular bit shifts

test: remove xor test from primitives

fix: add zen fuzzer to new build system

fix: make sure that fuzzing methods change the octets
@jaromil jaromil merged commit afc6232 into master Jan 31, 2025
27 checks passed
@jaromil jaromil deleted the fuzzing branch January 31, 2025 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants