-
Notifications
You must be signed in to change notification settings - Fork 10
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
Bump bincode
and secrecy
for no_std
builds
#140
Conversation
All contributors have signed the CLA ✍️ ✅ |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #140 +/- ##
==========================================
- Coverage 90.08% 90.05% -0.04%
==========================================
Files 43 43
Lines 7768 7771 +3
==========================================
Hits 6998 6998
- Misses 770 773 +3 ☔ View full report in Codecov by Sentry. |
synedrion/src/paillier/keys.rs
Outdated
@@ -12,20 +11,12 @@ use crate::uint::{ | |||
RandomPrimeWithRng, Retrieve, Signed, UintLike, UintModLike, | |||
}; | |||
|
|||
#[derive(Clone, Serialize, Deserialize, ZeroizeOnDrop)] | |||
#[derive(Clone, Debug, Serialize, Deserialize, ZeroizeOnDrop)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it somehow obscure the secret values in the output, the way the previous implementation did?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it doesn't log the inner value. See the implementation on SecretBox
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But p
and q
are not SecretBox
-ed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry, you're right. I thought they were SecretBox
-ed for some reason. I've added a manual Debug
implementation that matches the DebugSecret
one.
One other option here would be to SecretBox
p
and q
, but it would add bit of noise of this PR. Wdyt?
Oh shoot, you're right. It looks like this is a feature of a different CLA bot; the one we're using doesn't yet have this feature. |
We don't need to keep compatibilty with `[email protected]`, so we can move away from using the legacy config.
I have read the CLA Document and I hereby sign the CLA |
This should match the previous implementation provided by the `DebugSecret` crate.
@@ -164,8 +164,6 @@ impl<'de> Deserialize<'de> for Scalar { | |||
|
|||
impl DefaultIsZeroes for Scalar {} | |||
|
|||
impl DebugSecret for Scalar {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume we don't need a manual implementation of DebugSecret
anymore like for SecretKeyPaillier
since a) this already had a derived Debug
implementation and b) anybody that's using for secret values these can wrap them in a SecretBox
and use that Debug
implementation
I've been strugging to use Synedrion as a dependency in a Substrate pallet due to one of
its dependencies pulling in
std
transitively, as mentioned in entropyxyz/entropy-core#961.Through a bit of digging I found that the
bincode
andsecrecy
dependencies werepulling in
serde
without disable default features, causingstd
to be pulled in.I've updated them to the latest releases which use better feature management to allow
serde
to not be pulled in with default features. Note that the latest releases aretechnically pre-releases.