Skip to content

Commit

Permalink
fix: rustdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
ngutech21 committed Oct 26, 2023
1 parent 4535599 commit 867af16
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
22 changes: 18 additions & 4 deletions moksha-core/src/dhke.rs
Original file line number Diff line number Diff line change
@@ -1,29 +1,43 @@
//! Implementation of `<https://gist.github.com/RubenSomsen/be7a4760dd4596d06963d67baf140406>`
//! Blind Diffie-Hellman Key Exchange (blind ecash).
//!
//! Implementation of [RubenSomsen/Blind-DH-ecash.md](https://gist.github.com/RubenSomsen/be7a4760dd4596d06963d67baf140406)
//!
//! Bob (Mint):
//!```python
//! A = a*G
//! return A
//! ```
//!
//!
//! Alice (Client):
//!```python
//! Y = hash_to_curve(secret_message)
//! r = random blinding factor
//! B'= Y + r*G
//! return B'
//! ```
//!
//!
//! Bob:
//!```python
//! C' = a*B'
//! (= a*Y + a*r*G)
//! (= a*Y + a*r*G)
//! return C'
//!```
//!
//! Alice:
//!```python
//! C = C' - r*A
//! (= C' - a*r*G)
//! (= a*Y)
//! (= C' - a*r*G)
//! (= a*Y)
//! return C, secret_message
//!```
//!
//! Bob:
//!```python
//! Y = hash_to_curve(secret_message)
//! C == a*Y
//!```
//! If true, C must have originated from Bob
//!
use crate::error::MokshaCoreError;
Expand Down
1 change: 0 additions & 1 deletion moksha-core/src/proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ impl From<Proof> for Proofs {
}

#[cfg(test)]

mod tests {
use serde_json::json;

Expand Down

0 comments on commit 867af16

Please sign in to comment.