Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
* remove 'unique' qualification for elements of a set (by definition,
all elements in a set are unique...)
* rename `S_p` -> `n`
  • Loading branch information
abailly committed Oct 18, 2024
1 parent ab39a30 commit 2677a6a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
11 changes: 6 additions & 5 deletions docs/alba.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ document.addEventListener('DOMContentLoaded', () => {
const n_f = document.getElementById('n_f');
const item = document.getElementById('item');
const proof_size = document.getElementById('proof_size');
const s_p = document.getElementById('s_p');
const n = document.getElementById('n');
const proof_proba = document.getElementById('proof_proba');

function U(n_p, n_f) {
Expand Down Expand Up @@ -87,7 +87,7 @@ document.addEventListener('DOMContentLoaded', () => {
x: {
type: 'linear',
title: {
text: 'S_p',
text: 'n',
display: true
},
}
Expand All @@ -106,9 +106,10 @@ document.addEventListener('DOMContentLoaded', () => {
function updateProofProba() {
const n_p_v = Number(n_p.value);
const n_f_v = Number(n_f.value);
const s_p_v = Number(s_p.value);
const n_v = Number(n.value);
const u = U(n_p_v, n_f_v);
const proba = probabilityOfProof(u, n_p_v, n_f_v, s_p_v);
const proba = probabilityOfProof(u, n_p_v, n_f_v, n_v);
// expected prover time is n_p + O (u^2), we neglect the n_p part here
proof_proba.value = proba.toExponential(4);
}

Expand All @@ -124,7 +125,7 @@ document.addEventListener('DOMContentLoaded', () => {
n_p.addEventListener('change', updateChart);
n_f.addEventListener('change', updateChart);
item.addEventListener('change', updateChart);
s_p.addEventListener('change', updateProofProba);
n.addEventListener('change', updateProofProba);

updateProofSize();
updateProofProba();
Expand Down
2 changes: 1 addition & 1 deletion docs/src/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Definition

_Approximate Lower Bound Arguments_ are a form of cryptographic certificates that allow a _prover_ to convince a _verifier_ they know some set of elements by providing only a small subset of those elements. More formally, given some set of _unique_ elements, and some bounds \\(n_p\\) and \\(n_f\\), where \\(n_p > n_f\\), about the size of this set, ALBA provides an algorithm that allows to build a _proof_ they know _more than_ \\(n_f\\) elements, where the proof size is a constant value derived from the \\(\frac{n_p}{n_f}\\) ratio.
_Approximate Lower Bound Arguments_ are a form of cryptographic certificates that allow a _prover_ to convince a _verifier_ they know some set of elements by providing only a small subset of those elements. More formally, given some set of elements, and some bounds \\(n_p\\) and \\(n_f\\), where \\(n_p > n_f\\), about the size of this set, ALBA provides an algorithm that allows to build a _proof_ they know _at least_ \\(n_f\\) elements, where the proof size is a constant value derived from the \\(\frac{n_p}{n_f}\\) ratio.

The algorithm provides the following guarantees, given the prover has \\(S_p\\) elements and a security parameter \\(\lambda\\):

Expand Down
21 changes: 10 additions & 11 deletions docs/src/simulation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ALBA Parameters Simulation

ALBA provides strong security guarantees about the capability to generate a proof given some number of items \\(S_p\\):
ALBA provides strong security guarantees about the capability to generate a proof given some number of items \\(n\\):

* a honest prover with at least \\(n_p\\) items has a probability of
failing to generate a proof lower than \\(2^{-128}\\),
Expand All @@ -10,7 +10,7 @@ ALBA provides strong security guarantees about the capability to generate a proo

This page provides a simple and user-friendly way of estimating how
various ALBA parameters impact the size of the proof and probability
of having a proof, given a number of items \\(S_p\\) varying between
of having a proof, given a number of items \\(n\\) varying between
the two parameters' bounds. It is expected to be a quick way to
estimate what would be "good" values for those parameters in a
specific context, depending on security requirements and expected
Expand All @@ -21,17 +21,17 @@ One can define:
* \\(n_p\\): The size of the _honest set_ of items.
* \\(n_f\\): The size of the _faulty set_ of items. \\(n_f\\) must be lower than \\(n_p\\).
* Item size: The size of a single item, this is used to compute the full size of a proof.
* \\(S_p\\): The number of items actually available to an adversary, or put differently, how much adversarial stake should we expect.
* \\(n\\): The number of items actually available to an adversary, or put differently, how much adversarial stake should we expect.

From these parameters, we display a chart showing the probability of
an adversary being able to compute a valid proof, given some
number of items \\(S_p\\) available between \\(n_p\\) and
an adversary being able to compute a single valid proof, given some
number of items \\(n\\) available between \\(n_p\\) and
\\(n_f\\). The formula used, initially proposed in this [GitHub
discussion](https://github.com/cardano-scaling/alba/discussions/17)
is:

\\[
r \cdot {\left( \frac{S_p}{n_p} \right)}^u\cdot qd
r \cdot {\left( \frac{n}{n_p} \right)}^u\cdot qd
\\]

where _u_, _r_, _q_, and _d_ are defined in the aforementioned
Expand All @@ -43,8 +43,7 @@ We also display two specific values:
item size, which is given by the formula from section 3.2.2,
Corollary 3, from the [ALBA
paper](https://iohk.io/en/research/library/papers/approximate-lower-bound-arguments/),
* the probability of having a proof for some specific number of \\(S_p\\) computed.

* the probability of having a proof for some specific number of \\(n\\) (computed.

<div class="col col-md-8">
<div class="row">
Expand All @@ -59,7 +58,7 @@ We also display two specific values:
</div>
<div class="col col-md-3">
<label for="n_f" class="form-label">\(n_f\)<span class="help" data-bs-toggle="tooltip" title="Expected number of faulty set of items.">?</span></label>
<input type="number" step="10" class="form-control" id="n_f" value="200">
<input type="number" step="10" class="form-control" id="n_f" value="400">
</div>
<div class="col col-md-3">
<label for="item" class="form-label">Item size<span class="help" data-bs-toggle="tooltip" title="Size of a single item.">?</span></label>
Expand All @@ -72,8 +71,8 @@ We also display two specific values:
</div>
<div class="row g-3" style="width: 95%; margin: auto;">
<div class="col col-md-3">
<label for="s_p" class="form-label">\(S_p\)<span class="help" data-bs-toggle="tooltip" title="Number of items actually available.">?</span></label>
<input type="number" step="10" class="form-control" id="s_p" value="300">
<label for="n" class="form-label">\(n\)<span class="help" data-bs-toggle="tooltip" title="Number of items actually available.">?</span></label>
<input type="number" step="10" class="form-control" id="n" value="700">
</div>
<div class="col col-md-3">
<label for="proof_proba" class="form-label">Proof probability<span class="help" data-bs-toggle="tooltip" title="Probability of having a proof for some number of items.">?</span></label>
Expand Down

0 comments on commit 2677a6a

Please sign in to comment.