Document potential information leakage from GCM preserving exact length of plaintext
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.1k
- Forks
- 1.1k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 9
Description
AES-GCM has the property that the encrypted ciphertext has exactly the same length as the original plaintext (plus a fixed size 16-byte authentication tag). In some circumstances this information leakage can be a problem. For instance, if a field is selected from one of a small known set of options then the length may narrow down or even uniquely identity the item in question. Likewise, for poor quality passwords the length may narrow down the number of options allowing easier cracking.
Of course, in most of these cases the item being encrypted is of low-entropy and likely to be guessable anyway, but it is an issue that people often do not consider. A section in the README discussing this issue and potential workarounds (e.g., explicitly padding those fields to some minimum size before encrypting them) would help users to properly evaluate this threat for themselves.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the README and identify where encryption behavior and security considerations are documented. Add a section explaining that AES-GCM preserves plaintext length and describe the information leakage and padding workaround; the README should clearly help users evaluate this risk.
Written by the indexing model from the issue text.
Assessment
- Domain
- cryptography, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100