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

dsa: introduce serde #870

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

sivizius
Copy link

@sivizius sivizius commented Oct 12, 2024

This commits introduces the dependency serde to dsa. It is gated by two features: serde and serde_secrets. The first only derives Deserialize and Serialize for non-secret types like Signature. The latter additionally for SignatureKey, which should be used with caution, because it could allow accidentally leaking secrets.

This commits introduces the dependency `serde` to `dsa`. It is gated
by two features: `serde` and `serde_secrets`. The first only derives
`Deserialize` and `Serialize` for non-secret types like `Signature`.
The latter additionally for `SignatureKey`, which should be used with
caution, because it could allow accidentally leaking secrets.
@sivizius sivizius changed the title dsa: derive serde dsa: introduce serde Oct 12, 2024
@sivizius sivizius marked this pull request as draft October 12, 2024 19:58
@sivizius
Copy link
Author

sivizius commented Oct 12, 2024

Draft, because serde_secrets should be implemented with serdect. Or any other "constant time" way.

@tarcieri
Copy link
Member

Yeah, it would be good to use serdect, similar to how ecdsa does it, especially since you're doing secret key serialization (i.e. SigningKey)

@sivizius
Copy link
Author

Yeah, it would be good to use serdect, similar to how ecdsa does it, especially since you're doing secret key serialization (i.e. SigningKey)

I am actually working on an commit/PR which introduces another crate common with common types that can be used across all other crates, initially with two types: Bytes and SecretBytes which would move the zeroisation, (de)serialisisation, etc. into these type, thus harmonise (de)serialisation, etc.

@tarcieri
Copy link
Member

I'd prefer not to add superfluous crates. There shouldn't be that much duplication.

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