Give more descriptive error messages to encrypt() and decrypt()

Open
#423 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust
Domain
cryptography

Research direction

Start by locating the Rust implementations of encrypt() and decrypt() and their error definitions. Reproduce the 2048-bit-key case with ciphertext longer than 256 bytes, then inspect existing tests for error assertions. Done means oversized ciphertext and other relevant failures report an actionable cause instead of only Err value: Decryption.

Written by the indexing model from the issue text.

Description

For example when using a 2048 bits key and call decrypt() on a ciphertext that more than 256 bytes long, we get a generic error message that says Err value: Decryption a more appropriate message would also tell that the cipher text is too long for this key.

Thank you.

Dominant language
Rust
Stars
673
Forks
190
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from RustCrypto/RSA

All issues in RustCrypto/RSA

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.