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

Update ReadMe #228

Merged
merged 2 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions crypto3/docs/manual/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ Crypto3 cryptography suite's purpose is:
3. To provide a Standard Template Library-alike C++ interface and concept-based architecture implementation.

Libraries are designed to be state of the art, highly performant and providing a one-stop solution for
all cryptographic operations. They are supported on all operating systems (*nix, windows, macOS)
and architectures(x86/ARM).
all cryptographic operations. They are supported on Linux operating system and architectures (x86/ARM).


See [contribution](contributing.md) guidelines if you wish to contribute to the project.
Expand All @@ -25,13 +24,13 @@ Detailed list of modules with tutorials is available at [Modules page](modules.h
```
root
├── cmake: cmake sub-module with helper functions/macros to build crypto3 library umbrella-repository
├── docs: documentation , tutorials and guides
├── docs: documentation, tutorials and guides
├── libs: all directories added as submodules which are independent projects.
│ ├── algebra: algebraic operations and structures being used for elliptic-curve cryptography
│ ├── block: block ciphers
│ ├── blueprint: components and circuits for zk schemes
│ ├── codec: encoding/decoding algorithms
│ ├── containers:containers and generic commitment schemes for accumulating data, includes Merkle Tree
│ ├── containers: containers for accumulating data, includes Merkle Tree
│ ├── hash: hashing algorithms
│ ├── kdf: key derivation functions
│ ├── mac: message authentication codes
Expand Down Expand Up @@ -69,7 +68,7 @@ project as a submodule and would not need to resolve dependencies. See [crypto3-

### Selective
Developer can select to include a one or more modules to reduce the sources of resulting project and dependencies tree height. This however
ETatuzova marked this conversation as resolved.
Show resolved Hide resolved
does require the developer to manually resolve all required dependencies and stay upto date regarding
does require the developer to manually resolve all required dependencies and stay up to date regarding
compatibilities across modules.


Expand Down
8 changes: 4 additions & 4 deletions crypto3/docs/manual/intermediate.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ BLS weighted threshold signature [WIP]
=============================

In this tutorial we dive deeper into the cryptography constructs which crypto3 library implements.
By the end of this tutorial , a user will understand how to sign data and use different modes.
By the end of this tutorial, a user will understand how to sign data and use different modes.


Pre-requisites
Expand Down Expand Up @@ -38,7 +38,7 @@ which an algorithm needs to be performed.
- Finalisation: This steps requires accumulated data to be finalised padded before running an algorithm.

Algorithms in the crypto3 library will carry out the above steps for the user. Algorithms can do operations
such as signing , aggregating , verifying.
such as signing, aggregating, verifying.


Starting point to use any public key operations in crypto3 library is to create a cryptographic scheme.
Expand Down Expand Up @@ -74,7 +74,7 @@ using pubkey_type = public_key<scheme_type>;


Next we set up some types which we will use throughout the example
- `sss_public_key_group_type` : TODO : Describe them. Which one of these are accumulators?
- `sss_public_key_group_type`: TODO: Describe them. Which one of these are accumulators?
- `shares_dealing_processing_mode`
- `signing_processing_mode_type`
- `verification_processing_mode_type`
Expand Down Expand Up @@ -102,7 +102,7 @@ We now take a closer look at our main.
std::size_t n = 20;
std::size_t t = 10;
```
Next , we assign weights to our threshold values using the `weights_type` type which is a pair of (TODO)
Next, we assign weights to our threshold values using the `weights_type` type which is a pair of (TODO)

```c++
auto i = 1;
Expand Down
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
27 changes: 0 additions & 27 deletions crypto3/libs/algebra/README.md

This file was deleted.

4 changes: 2 additions & 2 deletions 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 Expand Up @@ -162,7 +162,7 @@ It also contains `pairing_policy` type, needed for comfortable usage of curve pa

### Curve Element Algorithms ### {#curve_element_algorithms}

Curve element corresponds an point of the curve and has all the needed methods and overloaded arithmetic operators. The corresponding algorithms
Curve element corresponds a point of the curve and has all the needed methods and overloaded arithmetic operators. The corresponding algorithms
are based on the underlying field algorithms are also defined here.

### Basic Curve Policies ### {#basic_curve_policies}
Expand Down
27 changes: 27 additions & 0 deletions crypto3/libs/algebra/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# =nil; Foundation's Algebraic Constructions Module

=nil; Foundation's Algebraic Constructions module.

Contains:
* Finite fields
* Curves
* Pairing
* Constexpr BLAS.

## Usage

This library uses Boost CMake build modules (https://github.com/NilFoundation/placeholder/tree/master/crypto3/cmake).
To actually include this library in a project it is required to:
akokoshn marked this conversation as resolved.
Show resolved Hide resolved

1. Add [CMake Modules](https://github.com/NilFoundation/placeholder/tree/master/crypto3/cmake) to target project repository.
2. Add all the internal dependencies using [CMake Modules](https://github.com/NilFoundation/placeholder/tree/master/crypto3/cmake) to target project repository.
3. Initialize parent project with [CMake Modules](https://github.com/NilFoundation/placeholder/tree/master/crypto3/cmake) (Look at [crypto3](https://github.com/NilFoundation/placeholder/tree/master/crypto3) for the example)

## Dependencies

### Internal

* [Multiprecision](https://github.com/NilFoundation/placeholder/tree/master/crypto3/libs/multiprecision).

### External
* [Boost](https://boost.org) (>= 1.73)
41 changes: 0 additions & 41 deletions crypto3/libs/blueprint/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion 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
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
24 changes: 24 additions & 0 deletions crypto3/libs/blueprint/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Circuit Definition Library for =nil; Foundation's Cryptography Suite

=nil; Foundation's Circuit Definition library which provides interfaces for generating ZK circuits used in proof generation. It holds information about the circuit itself, its gates, constraints, and other fixed expressions, public and private assignments needed by the ZK-SNARK system.

## Usage

This library uses Boost CMake build modules (https://github.com/NilFoundation/placeholder/tree/master/crypto3/cmake).
To actually include this library in a project it is required to:

1. Add [CMake Modules](https://github.com/NilFoundation/placeholder/tree/master/crypto3/cmake) to target project repository.
2. Add all the internal dependencies using [CMake Modules](https://github.com/NilFoundation/placeholder/tree/master/crypto3/cmake) to target project repository.
3. Initialize parent project with [CMake Modules](https://github.com/NilFoundation/placeholder/tree/master/crypto3/cmake) (Look at [crypto3](https://github.com/NilFoundation/placeholder/tree/master/crypto3) for the example)

## Dependencies

### Internal

* [Algebra](https://github.com/NilFoundation/placeholder/tree/master/crypto3/libs/algebra).
* [Zk](https://github.com/NilFoundation/placeholder/tree/master/crypto3/libs/zk).
* [Random](https://github.com/NilFoundation/placeholder/tree/master/crypto3/libs/random).
* [Hash](https://github.com/NilFoundation/placeholder/tree/master/crypto3/libs/hash).

### External
* [Boost](https://boost.org) (>= 1.73)
21 changes: 0 additions & 21 deletions crypto3/libs/containers/README.md

This file was deleted.

17 changes: 17 additions & 0 deletions crypto3/libs/containers/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Containers for =nil; Foundation's Cryptography Suite

Containers using =nil; Foundation's cryptography suite.

## Usage

This library uses Boost CMake build modules (https://github.com/NilFoundation/placeholder/tree/master/crypto3/cmake).
To actually include this library in a project it is required to:

1. Add [CMake Modules](https://github.com/NilFoundation/placeholder/tree/master/crypto3/cmake) to target project repository.
2. Add all the internal dependencies using [CMake Modules](https://github.com/NilFoundation/placeholder/tree/master/crypto3/cmake) to target project repository.
3. Initialize parent project with [CMake Modules](https://github.com/NilFoundation/placeholder/tree/master/crypto3/cmake) (Look at [crypto3](https://github.com/NilFoundation/placeholder/tree/master/crypto3) for the example)

## Dependencies

### External
* [Boost](https://boost.org) (>= 1.73)
4 changes: 0 additions & 4 deletions crypto3/libs/hash/README.md

This file was deleted.

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
18 changes: 18 additions & 0 deletions crypto3/libs/hash/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Hashes for =nil; Foundation's Cryptography Suite

Hashes for =nil; Foundation's cryptography suite.

## Usage

This library uses Boost CMake build modules (https://github.com/NilFoundation/placeholder/tree/master/crypto3/cmake).
To actually include this library in a project it is required to:

1. Add [CMake Modules](https://github.com/NilFoundation/placeholder/tree/master/crypto3/cmake) to target project repository.
2. Add all the internal dependencies using [CMake Modules](https://github.com/NilFoundation/placeholder/tree/master/crypto3/cmake) to target project repository.
3. Initialize parent project with [CMake Modules](https://github.com/NilFoundation/placeholder/tree/master/crypto3/cmake) (Look at [crypto3](https://github.com/NilFoundation/placeholder/tree/master/crypto3) for the example)

## Dependencies

### External
* [Boost](https://boost.org) (>= 1.73)

27 changes: 0 additions & 27 deletions crypto3/libs/marshalling/algebra/README.md

This file was deleted.

25 changes: 25 additions & 0 deletions crypto3/libs/marshalling/algebra/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Marshalling utilities for =nil;Crypto3 Algebra

This module provides extension of [=nil;Marshalling](https://github.com/NilFoundation/placeholder/tree/master/crypto3/libs/marshalling) utilities for [=nil;Crypto3 Algebra](https://github.com/NilFoundation/placeholder/tree/master/crypto3/libs/algebra)

## Usage

This library uses Boost CMake build modules (https://github.com/NilFoundation/placeholder/tree/master/crypto3/cmake).
To actually include this library in a project it is required to:

1. Add [CMake Modules](https://github.com/NilFoundation/placeholder/tree/master/crypto3/cmake) to target project repository.
2. Add all the internal dependencies using [CMake Modules](https://github.com/NilFoundation/placeholder/tree/master/crypto3/cmake) to target project repository.
3. Initialize parent project with [CMake Modules](https://github.com/NilFoundation/placeholder/tree/master/crypto3/cmake) (Look at [crypto3](https://github.com/NilFoundation/placeholder/tree/master/crypto3) for the example)

## Dependencies

### Internal

* [Multiprecision](https://github.com/NilFoundation/placeholder/tree/master/crypto3/libs/multiprecision)
* [Algebra](https://github.com/NilFoundation/placeholder/tree/master/crypto3/libs/algebra)
* [=nil;Marshalling](https://github.com/NilFoundation/placeholder/tree/master/crypto3/libs/marshalling)
* [=nil;Crypto3 Multiprecision Marshalling](https://github.com/NilFoundation/placeholder/tree/master/crypto3/libs/marshalling/multiprecision)

### External

* [Boost](https://boost.org) (>= 1.74)
3 changes: 0 additions & 3 deletions crypto3/libs/marshalling/containers/README.md

This file was deleted.

Loading
Loading