Skip to content

Algorithm has a possible bug #1

Description

@bombasticbob

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions