MGF_INPUT_XX_BYTE and offset for dynamic formats?
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- C
- Stars
- 13.6k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
I'm encountering some hashes of which the output is cut / truncated, sometimes at an offset (so not the first but the last bytes are used). Questions:
- Is it possible to add e.g. MGF_INPUT_8_BYTE , MGF_INPUT_10_BYTE, MGF_INPUT_15_BYTE to the dynamic formats, similar to the current MGF_INPUT_20_BYTE?
- It it possible to add a mechanism to use an offset e.g. MGF_INPUT_16_BYTE && MSG_INPUT_OFFSET_4_BYTE to use a 16 byte hash and match it with the final dynamic crypt[4:19] instead of [0:15]?
Thanks!
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 by locating the dynamic-format implementation and the existing MGF_INPUT_20_BYTE handling. Trace how dynamic formats select and compare digest bytes, then determine how support for additional lengths and an offset would fit; done means both requested forms work with matching truncated or offset hashes and have coverage for those cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- cryptography, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100