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

Get rid of exposed domain separation tags and use dedicated functions instead #38

Merged
merged 1 commit into from
Mar 6, 2021

Conversation

fjarri
Copy link
Contributor

@fjarri fjarri commented Mar 3, 2021

Fixes #28

As we have discussed, we need to keep the DSTs, but they're better off hidden in the respective functions.

What do you think, keep strings as tags, or use single bytes to make it a little more portable?

@fjarri fjarri requested review from cygnusv and tuxxy March 3, 2021 06:50
umbral-pre/src/hashing_ds.rs Outdated Show resolved Hide resolved
Copy link
Member

@cygnusv cygnusv left a comment

Choose a reason for hiding this comment

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

I think this PR will benefit from the discussion on #2 (comment)

@@ -1,7 +1,7 @@
use crate::capsule_frag::CapsuleFrag;
use crate::constants::{NON_INTERACTIVE, X_COORDINATE};
Copy link
Member

Choose a reason for hiding this comment

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

what was I thinking 🙈

@fjarri
Copy link
Contributor Author

fjarri commented Mar 3, 2021

I think this PR will benefit from the discussion on #2 (comment)

I think that discussion is kind of orthogonal to this PR, is it not? This is just code quality changes. One thing though that could be done is making the DST a parameter in the ScalarDigest constructor (leaving it to handle it however it sees fit, if we change the algorithm later). E.g.:

    ScalarDigest::new_with_dst(b"SHARED_SECRET")
        .chain_point(precursor)
        .chain_point(pubkey)
        .chain_point(dh_point)
        .finalize()

@fjarri fjarri merged commit 9da12a6 into nucypher:master Mar 6, 2021
@fjarri fjarri deleted the specialty-hashing branch March 6, 2021 04:48
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.

Are NON_INTERACTIVE and X_COORDINATE constants necessary?
3 participants