Secret key of length >16 doesn't work
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 85/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Domain
- security
Research direction
Find the ImageSteganography class and locate the convertKeyTo128bit method. Change the substring index from 15 to 16. Verify the fix by running any existing tests related to encryption or key handling, or create a simple test with a secret key longer than 16 characters.
Written by the indexing model from the issue text.
Description
Describe the bug
If the user passes secret key of length >16 to ImageSteganography constructor the convertKeyTo128bit method won't convert it properly.
Instead of:
result = result.substring(0, 16);
it has:
result = result.substring(0, 15);
And the encryption step fails then.
Possible solution without the pull request
It is easy to fix in the library, but if it won't be fixed here is an easy workaround:
- Create class ImageSteganographyV2 which extends ImageSteganography
- Copy the whole code(since ImageSteganography doesn't open access to fields)
- Fix the bug by changing 15 to 16 in "result = result.substring(0, 15);"
- Create ImageSteganography instances using new class. For example:
ImageSteganography imageSteganography = new ImageSteganographyV2(message, secretKey, originalImage);
Everything else can stay the same
- Dominant language
- Java
- Stars
- 160
- Forks
- 66
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
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.
More from aagarwal1012/Image-Steganography-Library-Android
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Decode doesn't work Open
Difficulty 4/5 3-5 days Newbie friendliness 20/100
-
不支持透明的图形 Open
Difficulty 4/5 3-5 days Newbie friendliness 10/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
aagarwal1012/Image-Steganography-Library-Android#1 · 12 comments ·
All issues in aagarwal1012/Image-Steganography-Library-Android
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100