j414j / j414j/gocrypto

Add test cases for `Pad()` for edge cases

Open
#2 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

fa2c31dec2fbcb7a6d54e8f1d2e2730baadf8120 fixed an issue in which the padding method was failing where size of input block % 128 was being more than 112. This was resulting in wrong padding and thus incorrect hashes. It's likely there are similar other edge cases which are not tested. We need to add test cases for that.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by inspecting commit fa2c31dec2fbcb7a6d54e8f1d2e2730baadf8120 and the Pad() implementation to find the existing padding tests. Add cases covering the reported block-size boundary and similar edge cases, then run the Go test suite and verify that the resulting hashes are correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cryptography, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.