diff --git a/Cargo.toml b/Cargo.toml index a17d5bcc..d4b14b7b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ license ="MIT OR Apache-2.0" name ="ronkathon" repository ="https://github.com/pluto/ronkathon" version ="0.1.0" -exclude =["CHANGELOG.md", "src/tree/ConstructMerkleTree.gif", "src/dsa/keygen.gif", "src/dsa/sign_and_verify.gif"] +exclude =["CHANGELOG.md", "assets/"] [dependencies] rand ="0.8" diff --git a/src/tree/ConstructMerkleTree.gif b/assets/ConstructMerkleTree.gif similarity index 100% rename from src/tree/ConstructMerkleTree.gif rename to assets/ConstructMerkleTree.gif diff --git a/src/tree/MerkleProof.png b/assets/MerkleProof.png similarity index 100% rename from src/tree/MerkleProof.png rename to assets/MerkleProof.png diff --git a/src/dsa/keygen.gif b/assets/keygen.gif similarity index 100% rename from src/dsa/keygen.gif rename to assets/keygen.gif diff --git a/src/dsa/sign_and_verify.gif b/assets/sign_and_verify.gif similarity index 100% rename from src/dsa/sign_and_verify.gif rename to assets/sign_and_verify.gif diff --git a/src/dsa/README.md b/src/dsa/README.md index d6108351..e67aadb9 100644 --- a/src/dsa/README.md +++ b/src/dsa/README.md @@ -26,13 +26,13 @@ Bobby is the one whose signature is required, so Bobby will run the $\text{Gen(n Then, the public key, $\text{pk}$, is publicized as belonging to Bobby. This not only provides authentication but also ensures non-repudiation. This one of the critical parts of a secure digital signature scheme. You can read more on this here: [Public key infrastructure](https://en.wikipedia.org/wiki/Public_key_infrastructure) -![](./keygen.gif) +![](../../assets/keygen.gif) -Now when Alex sends a message(document, contract, etc.), $m$, for Bobby to sign, they compute the signature, $s$ as, $s\leftarrow\text{Sign(sk,m}** and sents $s$ to Alex or any other party who wants to take a look. +Now when Alex sends a message(document, contract, etc.), $m$, for Bobby to sign, they compute the signature, $s$ as, $s\leftarrow\text{Sign(sk,m)}$ and sents $s$ to Alex or any other party who wants to take a look. Now, any party who wants to see if Bobby signed the document or not, applies the verification algorithm using the public key as $\text{Verify(pk,m,s)}$. Thus Alex or any other party can be sure of the authenicity of the signature as well as the integrity of the message. -![](./sign_and_verify.gif) +![](../../assets/sign_and_verify.gif) ### When is a signature scheme said to be secure? diff --git a/src/tree/README.md b/src/tree/README.md index a38f9685..46b78d69 100644 --- a/src/tree/README.md +++ b/src/tree/README.md @@ -21,7 +21,7 @@ To create a Merkle Tree, Bob follows the following steps- 2. In the next step, we concatenate adjacent hashes and hash it again using $H$. Now we are left with 4 hashes. 3. We repeat the last step until a single hash is left. This final hash is called the Merkle root hash. -![](./ConstructMerkleTree.gif) +![](../../assets/ConstructMerkleTree.gif) Voila! @@ -48,7 +48,7 @@ at the current node with the sibling and hash the resultant. Thus, if we are onl In the image below, the nodes marked in yellow will be part of the Merkle Proof and the red nodes will recomputed during the verification step. -![](./MerkleProof.png) +![](../../assets/MerkleProof.png) Merkle Proof, which is a set of hashes, may contain additional information about which branch, left or right, each hash value belonged to.