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

Fix, test, and enable custom domain tags. #116

Merged
merged 1 commit into from
Oct 21, 2021
Merged

Conversation

porcuquine
Copy link
Contributor

Fill in the blanks of the custom domain tag implementation, and enable it — with support for 256 unique tags. Although it would be possible to add more, I wanted to be conservative, and this should be plenty.

The way the tag space is divided up and Standard/Strengthened variants are supported makes this already a little crowded and confusing. Let's minimize the extent to which we paint our future selves into a corner by annexing only what we need for now.

@porcuquine porcuquine force-pushed the custom-domain-tags branch 2 times, most recently from 261d5c9 to ba88a2f Compare October 19, 2021 00:39
Copy link
Contributor

@Kubuxu Kubuxu left a comment

Choose a reason for hiding this comment

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

In my opinion, it is doing the right thing, but another pair of eyes would be great.

src/hash_type.rs Outdated Show resolved Hide resolved
@DrPeterVanNostrand
Copy link
Contributor

Looks good to me

@porcuquine porcuquine merged commit 4f26325 into master Oct 21, 2021
@porcuquine porcuquine deleted the custom-domain-tags branch October 21, 2021 19:45
HashType::Encryption => with_strength(pow2::<F>(32)),
// identifier * 2^40
// identifier * 2^(40 + strength) -- where standard strength is 0.
Copy link
Contributor

Choose a reason for hiding this comment

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

The formula is a bit wrong I think,
it should be identifier * 2^40 + strength * 2^32.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I think that's correct.

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