aws / aws/aws-encryption-sdk-java

CiphertextType.deserialize should throw an error if it encounters an invalid type

Open
#118 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
240
Forks
125
PR merge metrics
No merged PRs in 30d

Description

Currently, if `CiphertextType.deserialize` is called with a byte containing anything other than a valid ciphertext type ID, it will return `null`. This seems like the wrong behavior to me.

https://github.com/aws/aws-encryption-sdk-java/blob/master/src/main/java/com/amazonaws/encryptionsdk/model/CiphertextType.java#L71-L75

Contributor guide

Open the contributing guide

Research direction

Start with src/main/java/com/amazonaws/encryptionsdk/model/CiphertextType.java, specifically CiphertextType.deserialize and the linked lines. Check the behavior for bytes that are not valid ciphertext type IDs; done means invalid input throws an error instead of returning null, with coverage for that behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
cryptography
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.