Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move decrypt/encrypt functions to their own modules #1294

Merged
merged 3 commits into from
Sep 20, 2024

Conversation

akoshelev
Copy link
Collaborator

We will add secret sharing, so crypto module will grow in size. It makes sense to keep things in their own modules now.

It also does a bit of a refactoring to prepare to encrypt something that is not IpaPrivateData, but no new functionality is added by this change.

We will add secret sharing, so crypto module will grow in size. It makes sense to keep things in their own modules now.

It also does a bit of a refactoring to prepare to encrypt something that is not `IpaPrivateData`, but no new functionality is added by this change.
Copy link

codecov bot commented Sep 20, 2024

Codecov Report

Attention: Patch coverage is 97.88054% with 11 lines in your changes missing coverage. Please review.

Project coverage is 93.41%. Comparing base (6463de7) to head (f329272).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
ipa-core/src/cli/crypto/decrypt.rs 96.27% 7 Missing ⚠️
ipa-core/src/cli/crypto/encrypt.rs 97.88% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1294      +/-   ##
==========================================
+ Coverage   93.40%   93.41%   +0.01%     
==========================================
  Files         206      208       +2     
  Lines       33754    33798      +44     
==========================================
+ Hits        31528    31574      +46     
+ Misses       2226     2224       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

/// Keys that are used in crypto tests
#[derive(Clone)]
pub(super) struct TestKeys {
inner: [(IpaPublicKey, IpaPrivateKey); 3],
Copy link
Member

Choose a reason for hiding this comment

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

wouldn't keys be more descriptive than inner? maybe TestKeys.keys is too repetitive...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am probably abusing inner too much, I agree that keys is better if we add anything else inside after. I'll stick with key_pairs

let input_file = sample_data::write_csv(sample_data::test_ipa_data().take(10)).unwrap();

let output_dir = tempdir().unwrap();
let network_data = r#"
Copy link
Member

Choose a reason for hiding this comment

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

should this use the format! macro used below? I didn't know that existed when I wrote this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we could use it, but I thought for this test we don't need to inject the correct keys, so the benefit of using format! is not clear

@akoshelev akoshelev merged commit eef5f94 into private-attribution:main Sep 20, 2024
10 checks passed
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.

2 participants