Skip to content

Conversation

patrick-ogrady
Copy link
Contributor

It can be useful to batch decrypt Ciphertext (and it must implement Hash to dedup ergonomically).

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds the Hash trait implementation to the Ciphertext struct to enable deduplication when batch decrypting ciphertexts. It also includes additional ordering traits and updates string formatting to use more modern Rust syntax.

  • Adds Hash, PartialOrd, and Ord trait derivations to Ciphertext<V: Variant>
  • Updates string formatting in fuzz tests to use newer Rust formatting syntax

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
cryptography/src/bls12381/tle.rs Adds Hash and ordering traits to Ciphertext struct
cryptography/fuzz/fuzz_targets/sha256_hasher.rs Updates format strings to use modern Rust syntax

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

// Test Debug and Display formatting
let debug_str = format!("{:?}", digest);
let display_str = format!("{}", digest);
let debug_str = format!("{digest:?}");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an unrelated change to appease the linter.

@patrick-ogrady patrick-ogrady merged commit bb428d2 into main Sep 5, 2025
39 checks passed
@patrick-ogrady patrick-ogrady deleted the ciphertext-hash branch September 5, 2025 19:51
Copy link

codecov bot commented Sep 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.03%. Comparing base (7506324) to head (4431ea3).
⚠️ Report is 1 commits behind head on main.

@@           Coverage Diff           @@
##             main    #1556   +/-   ##
=======================================
  Coverage   92.02%   92.03%           
=======================================
  Files         284      284           
  Lines       73163    73163           
=======================================
+ Hits        67329    67332    +3     
+ Misses       5834     5831    -3     
Files with missing lines Coverage Δ
cryptography/src/bls12381/tle.rs 94.65% <ø> (ø)

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7506324...4431ea3. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant