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

Regression or incorrect usage? #18

Closed
richs27 opened this issue Aug 12, 2021 · 4 comments
Closed

Regression or incorrect usage? #18

richs27 opened this issue Aug 12, 2021 · 4 comments
Assignees

Comments

@richs27
Copy link

richs27 commented Aug 12, 2021

Hi Marcus,

I've spent some time recently working with a number of 5 input, 2 output Sboxes and have noted what are in this use case, significant differences in gate counts between two versions of sboxgates.

Using a version I git checked out on 4th July 2019, with the following sbox.txt:
3 1 0 2 2 3 3 0 1 3 2 1 0 0 1 2 3 1 0 3 3 2 0 2 0 0 1 2 2 1 3 1
and using the command:
../sboxgates -l -i 1000 -b sbox.txt
I get 193 2-008-0000-01* results.

If I run the same command with the latest version, the lowest gate count I can acheive is 2-010.

Other sbox descriptions, 5in 2out, show one gate lower results, again with the older version.

Is this just a reflection of heuristic differences between the versions or am I not using the tool optimally? In the first example, nothing I tried with the latest version would generate any two output result below gates.

Also, is there any "rule of thumb" around the number of iterations one should use?

Thanks.

@dansarie
Copy link
Owner

Thanks for reporting this! It could very well be a bug, I'll investigate and see what I find. Unfortunately, I'm a bit busy with other work at the moment, so it may take some time.

Also, is there any "rule of thumb" around the number of iterations one should use?

A higher number of iterations makes it likelier to find smaller representations. However, the computation time can increase significantly - especially for large S-boxes. In short, pick a number of iterations that give you a running time you are ok with.

@richs27
Copy link
Author

richs27 commented Aug 16, 2021

Thanks. Also, the command I'm using above is missing an "mpirun" at the beginning.

@dansarie dansarie self-assigned this Aug 17, 2021
@richs27
Copy link
Author

richs27 commented Aug 20, 2021

I 've just checked through your commit history and found that the "-n" option was added later than the July 4 2019 date most of the files in the early checkout, are dated and it's available in this version.

Is there a way of finding out the version I have?

@dansarie
Copy link
Owner

Other than looking at the git history of your local repo or comparing files manually to previous commits, I don't think there's a way to tell which version you have.

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

No branches or pull requests

2 participants