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

Use a Bloom filter to prevent and or discourage sending the same secret more than once #21

Open
Gunni opened this issue Sep 11, 2024 · 0 comments

Comments

@Gunni
Copy link
Contributor

Gunni commented Sep 11, 2024

An already sent secret SHOULD be considered compromised if the first link was broken for unknown reasons.

Re-sending a secret, even if it was successfully received the first time, increases the risk of accidental exposure or interception.

  1. User enters secret

  2. Secret is hashed and checked against the bloom filter

    • If not in bloom filter:

      • Update bloom filter with new hash
      • UX unchanged
    • If in bloom filter and rejecting is allowed:

      • Reject secret
    • If in bloom filter and rejecting is not allowed:

      • Inform the user that they should not send a secret more than once
      • Provide a "Continue Anyway" option
      • UX Continues

Note: A Bloom filter with a 1% false positive rate requires only about 800 bytes of memory. If necessary, this can be increased to 1 MB for virtually no error rate.

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

1 participant