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

Algorithm has a possible bug #1

Open
bombasticbob opened this issue Jan 26, 2021 · 0 comments
Open

Algorithm has a possible bug #1

bombasticbob opened this issue Jan 26, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@bombasticbob
Copy link
Owner

In the case where the sort algorithm tries to sort duplicate entries while creating the dictionary, some operating systems and/or compiler versions may sort differently.

The algorithm should never generate duplicates in the dictionary. However it is theoretically possible that it may happen. If this should occur, then the random sequence generation is weak and will need to be modified to ensure that it never happens.

Regardless, if the encrypted output is decrypted on a different platform, it is possible that the key will no longer work, due to the manner in which the sorting has taken place.

The current random sequence generators have been specifically tweeked to prevent this from happening. However, as previously stated, it is still theoretically possible.

To prevent this from becoming a serious problem, there are a couple of possible remedies:

  • include a unique sequence number, to be part of the sort. The generated value plus the sequence number would be sorted consistently across all platforms.

  • include a warning in the output if matching values are ever found, to basically use a different key.

@bombasticbob bombasticbob added the bug Something isn't working label Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant