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

Test feistel implementation is a valid permutation #1193

Closed
nicola opened this issue Jun 30, 2020 · 1 comment · Fixed by #1195
Closed

Test feistel implementation is a valid permutation #1193

nicola opened this issue Jun 30, 2020 · 1 comment · Fixed by #1195
Assignees
Labels
launch-critical P1 Medium priority

Comments

@nicola
Copy link
Contributor

nicola commented Jun 30, 2020

Description

We want to make sure that the current Feistel implementation has no bugs.

Acceptance criteria

A test that checks if feistel is a valid permutation which tests a permutation of 2^30 nodes.

Risks + pitfalls

Where to begin

@porcuquine
Copy link
Collaborator

porcuquine commented Jun 30, 2020

@keyvank I've assigned this to you.

I think the idea here is:

  • create an array with sequential values. of size 2^30.
  • iterate over the array, replacing initializing each element with its corresponding permuted index (make sure to use same keys every time).
  • check to make sure all the original values indices are still represented, each exactly once.

If that isn't true, then we're not really permuting. If it is true, make sure you actually did something and are not just checking the original values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
launch-critical P1 Medium priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants