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

docs: cleanup document #160

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion crypto3/docs/manual/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Quickstart
========================

By the end of this guide ,you will have set up a development environment for crypto3 projects
By the end of this guide, you will have set up a development environment for crypto3 projects
and be able to run an example.This will enable you to test ideas quickly and further explore the
API's of the suite.

Expand Down
2 changes: 1 addition & 1 deletion crypto3/libs/algebra/docs/implementation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

@tableofcontents

The key idea of `algebra` is to provide usefull interfaces for basic cryptography math. It's based on NilFoundation fork of
The key idea of `algebra` is to provide useful interfaces for basic cryptography math. It's based on NilFoundation fork of
Boost.Multiprecision so that it can be used with boost cpp_int, gmp or other backends.

We expanded Boost.Multiprecision with `modular_adaptor`, which is actually a multi-precision number by some modular. It contains
Expand Down
4 changes: 2 additions & 2 deletions crypto3/libs/blueprint/docs/concepts.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Concepts # {#component_concepts}

A ```circuit``` is defined by ```Blueprint``` and ```Blueprint assignment table``` (contains ```Blueprint public assignment table``` and ```Blueprint private assignment table```) instances.
It consist of one or multiple components putted on these two.
It consists of one or multiple components putted on these two.
While ```Blueprint``` holds information about the circuit itself, its gates, constraints and other fixed expressions, ```Blueprint assignment table``` contains public and private assignments needed by zk-SNARK system.

## Blueprint
Expand Down Expand Up @@ -29,4 +29,4 @@ The process of adding a component is following:
1. (Optional) Get ```component``` start row by calling ```allocate_rows```. If the ```component``` is used as part of other ```component``` logic, it's not necessary to call the function, because needed rows are allocated by the master ```component```.
2. (Optional) Allocate public input on the ```Blueprint assignment table``` via ```Blueprint assignment table::allocate_public_input```.
3. Set all the gates and constraints on the ```Blueprint``` by calling ```generate_circuit```. ```Allocated data``` is being modified in process of the function working.
4. Set all the assignments on the ```Blueprint assignment table``` table by calling ```generate_assignments```.
4. Set all the assignments on the ```Blueprint assignment table``` table by calling ```generate_assignments```.
2 changes: 1 addition & 1 deletion crypto3/libs/blueprint/docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ w = [1, 3, 35, 9, 27, 30].

Now let’s see how we can enter this R1CS into =nil;Crypto3 Blueprint, produce proofs and verify them. We will use the `blueprint_variable` type to declare our variables. See the file `test.cpp` for the full code.

First lets define the finite field where all our values live, and initialize the curve parameters:
First let's define the finite field where all our values live, and initialize the curve parameters:

```
typedef libff::Fr<default_r1cs_ppzksnark_pp> field_type;
Expand Down
6 changes: 3 additions & 3 deletions crypto3/libs/hash/docs/pack.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ order we have the reverse order of input chunks in the *out* array.

An interested reader may wonder why changing of endiannesses leads to such a strange effect. Well, the answer to this
question lies in the following convention: all data divided into chunks with units ordered in `big_unit_big_bit`
endianness will stay unchanged when tranforming to data with chunk units ordered in `big_unit_big_bit` endianness. Let
endianness will stay unchanged when transforming to data with chunk units ordered in `big_unit_big_bit` endianness. Let
us explain it with the following example.

```cpp
Expand Down Expand Up @@ -162,7 +162,7 @@ struct1 [label="0x12 | 0x34 | 0x56 | 0x78 | 0x90 | 0xab | 0xcd | 0xef"];
} @enddot

Here it is easy to see that the data from `input` was just concatenated into the `output` data with no additional
tranformations. Now, notice that the first and the second example described in this section implicitly rely on the
transformations. Now, notice that the first and the second example described in this section implicitly rely on the
above-described convention. In the first example the input data is concatenated in reverse byte order, and in the second
example the byte order is reversed after the input data concatenation.

Expand Down Expand Up @@ -214,7 +214,7 @@ To conclude, there are three types of reversals that we must deal with in pack a

In this section we suppose that the chunk type of input and output data is integral.

Data chunk order reversal tranforms a group of consecutive input chunks with units in `InputEndianness` order into an
Data chunk order reversal transforms a group of consecutive input chunks with units in `InputEndianness` order into an
output chunk with units in `OutputEndianness` order and can be described as follows.

1. Check whether `InputEndianness` or `OutputEndianness` is `little_bit`. This condition determines the data chunk order
Expand Down