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

Add support for range verfication #1

Merged
merged 1 commit into from
Oct 4, 2019
Merged

Conversation

afcidk
Copy link
Contributor

@afcidk afcidk commented Oct 3, 2019

Add trange parameter to hash_chain_verify to specify the maximum range.

The default test range is specified in DEFAULT_TRANGE.

hashchain.c Outdated
@@ -64,24 +65,37 @@ struct hash_chain hash_chain_create(void *base,
* @param h Pointer to a hash.
* @param tip Pointer to the "tip" hash.
* @param hash Hash algorithm to use.
* @param True if hash(h) == tip
* @param trange Maximum test size.
Copy link
Member

Choose a reason for hiding this comment

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

Why would you call it trange?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the semantics of this function is "Could the function be verified in the given range?".

Copy link
Member

Choose a reason for hiding this comment

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

Alternatively, just use range.

@jserv
Copy link
Member

jserv commented Oct 3, 2019

Please update README.md accordingly.

hashchain.c Outdated
@@ -161,11 +175,12 @@ int cmd_verify(int argc, char **argv)
{
if (argc < 4) {
fprintf(stderr, "error: too few args\n");
fprintf(stderr, "usage: %s ALGO QUERY ANCHOR\n", argv[0]);
fprintf(stderr, "usage: %s ALGO QUERY ANCHOR [MAX_TRANGE]\n", argv[0]);
Copy link
Member

Choose a reason for hiding this comment

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

Shall it be MAX_RANGE?

@jserv jserv merged commit 81a4ab8 into DLTcollab:master Oct 4, 2019
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