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

Use custom (de)serialization for SessionStaticKey into bytes #63

Merged
merged 2 commits into from
Jun 22, 2023

Conversation

derekpierre
Copy link
Member

@derekpierre derekpierre commented Jun 20, 2023

Type of PR:

  • Bugfix
  • Feature
  • Documentation
  • Other

Required reviews:

  • 1
  • 2
  • 3

What this does:
SessionStaticKey protocol objects had varied lengths due to serialization to vector of integers instead of bytestrings. This fixes that.

Issues fixed/closed:

  • Fixes #...

Why it's needed:

Explain how this PR fits in the greater context of the NuCypher Network.
E.g., if this PR address a nucypher/productdev issue, let reviewers know!

Notes for reviewers:

What should reviewers focus on?
Is there a particular commit/function/section of your PR that requires more attention from reviewers?

@codecov-commenter
Copy link

codecov-commenter commented Jun 20, 2023

Codecov Report

Merging #63 (8dcdcd2) into main (830dc68) will increase coverage by 1.24%.
The diff coverage is 97.50%.

@@            Coverage Diff             @@
##             main      #63      +/-   ##
==========================================
+ Coverage   19.50%   20.75%   +1.24%     
==========================================
  Files          17       17              
  Lines        3214     3252      +38     
==========================================
+ Hits          627      675      +48     
+ Misses       2587     2577      -10     
Impacted Files Coverage Δ
nucypher-core/src/dkg.rs 89.61% <97.50%> (+3.07%) ⬆️

@derekpierre
Copy link
Member Author

derekpierre commented Jun 20, 2023

@fjarri I wasn't able to get serdect to act any differently when using serialize_hex_lower_or_bin/deserialize_hex_or_bin but I was able to get the byte serialization working using serde_bytes.

Result of test in nucypher using updated code:

>>>>> key-length: 42
>>>>> key-length: 42
>>>>> key-length: 42
>>>>> key-length: 42

nucypher-core/Cargo.toml Outdated Show resolved Hide resolved
@derekpierre derekpierre changed the title [WIP] Use custom (de)serialization for SessionStaticKey into bytes Use custom (de)serialization for SessionStaticKey into bytes Jun 21, 2023
@derekpierre derekpierre marked this pull request as ready for review June 21, 2023 13:14
CHANGELOG.md Show resolved Hide resolved
derekpierre and others added 2 commits June 22, 2023 08:28
…ticKey into bytes instead of vector of integers.

Add test for SessionStaticKey (de)serialization.

Co-authored-by: Bogdan Opanchuk <bogdan@opanchuk.net>
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.

4 participants