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

Documentation - Prehashed #87

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Documentation - Prehashed #87

wants to merge 15 commits into from

Conversation

curiecrypt
Copy link
Collaborator

@curiecrypt curiecrypt commented Dec 5, 2024

Content

This PR includes documentation of Telescope construction with prehashing.

Pre-submit checklist

  • Branch
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • No clippy warnings in the CI
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested
  • Documentation
    • Update documentation website (if relevant)

Comments

Issue(s)

Closes #85

@curiecrypt curiecrypt marked this pull request as ready for review December 5, 2024 14:10
Copy link
Collaborator

@rrtoledo rrtoledo left a comment

Choose a reason for hiding this comment

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

As you wrote quite formally, it is not very easy to read. I would cut sentences and try to write more naturally for readability.

I am not sure it is clear that instead of making "checks live" we precompute the hashes in advance and link sequences to bins. As such, in "live" we only have to check memory to see which elements are the next in a sequence. This is cheaper than the naive scheme because we perform many more checks than the cardinality of Sp (in average). Also the bin have in average only one element (of course this is when the prover only has np elements).

docs/prehashing.md Outdated Show resolved Hide resolved
docs/prehashing.md Outdated Show resolved Hide resolved
docs/prehashing.md Outdated Show resolved Hide resolved
docs/prehashing.md Outdated Show resolved Hide resolved
docs/prehashing.md Outdated Show resolved Hide resolved
docs/prehashing.md Outdated Show resolved Hide resolved
docs/prehashing.md Outdated Show resolved Hide resolved
docs/prehashing.md Outdated Show resolved Hide resolved
docs/prehashing.md Outdated Show resolved Hide resolved
docs/prehashing.md Outdated Show resolved Hide resolved
@curiecrypt curiecrypt mentioned this pull request Dec 10, 2024
10 tasks
@curiecrypt curiecrypt requested a review from rrtoledo December 11, 2024 19:04

**Construction with Prehashing** optimizes the basic Telescope ALBA protocol by reducing the computational cost of checking sequences.
Here, a sequence means an ordered set of elements or tuples that meet certain hash conditions in the protocol.
In the basic approach, we would attempt to extend a given sequence "blindly" with all elements of $S_p$.
Copy link
Collaborator

Choose a reason for hiding this comment

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

what do you mean by blindly?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think @rrtoledo means without implementing the prehash oracle, by blindly.

Copy link
Collaborator

Choose a reason for hiding this comment

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

By "blindy" I meant searching having no information and using all elements.

docs/prehashing.md Outdated Show resolved Hide resolved
docs/prehashing.md Outdated Show resolved Hide resolved
docs/prehashing.md Outdated Show resolved Hide resolved
docs/prehashing.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@rrtoledo rrtoledo left a comment

Choose a reason for hiding this comment

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

LGTM!
There is just an error in your protocol: H1 is only used for finding the bin, we do not reuse H1 to check an element was correct.

docs/rustdoc/prehashing.md Outdated Show resolved Hide resolved
docs/rustdoc/prehashing.md Outdated Show resolved Hide resolved
docs/rustdoc/prehashing.md Outdated Show resolved Hide resolved
docs/rustdoc/prehashing.md Outdated Show resolved Hide resolved
docs/rustdoc/prehashing.md Outdated Show resolved Hide resolved
docs/rustdoc/prehashing.md Outdated Show resolved Hide resolved
docs/rustdoc/prehashing.md Outdated Show resolved Hide resolved
docs/rustdoc/prehashing.md Outdated Show resolved Hide resolved
docs/rustdoc/prehashing.md Outdated Show resolved Hide resolved
docs/rustdoc/prehashing.md Outdated Show resolved Hide resolved
@curiecrypt curiecrypt requested a review from rrtoledo December 16, 2024 15:24
Copy link
Collaborator

@rrtoledo rrtoledo left a comment

Choose a reason for hiding this comment

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

LGTM

I added a couple of minor comments but you may disregard them :)

> - $\mathsf{bin_3}$: $\emptyset$
> - No valid $s_2$ can be selected.
> - Backtracking for $t = 1$:
> - After exhausting all possible sequences for $t = 1$, no valid proof is found.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are you implying here that C doesn't work?

- When constructing sequences, the prover selects elements directly from the current bin to extend the sequence, continuing this process until the sequence reaches the required length $u$.
- After constructing a sequence of length $u$, the prover validates it with $H_2$. The sequence is a valid proof if $H_2(t, s_1, \dots, s_u) = 1$.

The precomputed $H_0$ values enable quick checks to see if a new element can extend a sequence, based on whether $H_1(t, s_1, \dots, s_k)$ matches $H_0(s_{k+1})$.
Copy link
Collaborator

Choose a reason for hiding this comment

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

"The values precomputed with $H_0$" perhaps?
"based on whether $H_1(t, s_1, \dots, s_k)$ matches the bin with label $H_0(s_{k+1})$"?

Copy link
Member

@tolikzinovyev tolikzinovyev left a comment

Choose a reason for hiding this comment

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

Looks great! Left some minorish comments.

> - Compute $H_1(2, s_1, s_2)$ to determine the next bin to explore.
> - Assume $H_1(2, D, B) = 1$, so the prover looks in bin 1.
> - $\mathsf{bin_1}$: $\[A, C\]$
> - Extend the sequence with $s_3 = C$.
Copy link
Member

Choose a reason for hiding this comment

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

Why do we extend with C, not A?

> - $\pi:~~$ `proof`, a valid proof $(t, s_1, \ldots, s_u)$ or $\bot$.
> ---
> - $bins \leftarrow$ { }
> - **for** each $~~ i \in \[1,~ n_p\]:$
Copy link
Member

Choose a reason for hiding this comment

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

This is a bit confusing. Here [ ] denotes an interval, but above for bins it denoted a list or a set. Suggest to use for bins either ( ) if it's a list or { } if it's a set.

> - Output:
> - $0/1$.
> ---
> - **if** $~~ t ~∉ \[d\]:$
Copy link
Member

Choose a reason for hiding this comment

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

If we are using notation [d] here, we can also use it everywhere else instead of [1, x].

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.

Documentation - Prehashing
4 participants