Skip to content

Commit

Permalink
Some minor cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
martinthomson committed Jul 26, 2024
1 parent 9276a14 commit 4d3c3c4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions draft-savage-ppm-3phm-mpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ dot-product of two vectors, one of which is known to both `P_=` and
Rearranging terms:

~~~ pseudocode
x_-·y_+ ⊕ (x_-·y_- ⊕ z_- ⊕ r_- ) ⊕ x_+·y_- ⊕ r_+ = 0
x_-·y_+ ⊕ (x_-·y_- ⊕ z_- ⊕ r_-) ⊕ x_+·y_- ⊕ r_+ = 0
~~~

Define:
Expand All @@ -540,7 +540,7 @@ e_- = x_-·y_- ⊕ z_- ⊕ r_-
Then:

~~~ pseudocode
(x_-·y_+ ⊕ e_- ) ⊕ (x_+·y_- ⊕ r_+) = 0
(x_-·y_+ ⊕ e_-) ⊕ (x_+·y_- ⊕ r_+) = 0
~~~

Using: `x ⊕ y = x·(1 - 2·y) + y`
Expand Down Expand Up @@ -597,9 +597,9 @@ From this point, each party can compute the vectors that they are able to.
`P_=` and `P_-` both compute `g_i` as follows:

~~~ pseudocode
g_1 = -2·x_-·y_-·(1 - 2·e_- )
g_2 = y_-·(1 - 2·e_- )
g_3 = x_-·(1 - 2·e_- )
g_1 = -2·x_-·y_-·(1 - 2·e_-)
g_2 = y_-·(1 - 2·e_-)
g_3 = x_-·(1 - 2·e_-)
g_4 = -½(1 - 2·e_-)
~~~

Expand Down
4 changes: 2 additions & 2 deletions fix-sub.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

blockcode = re.compile(r"^(~~~~*) *(\w+)$")
inlinecode = re.compile(r"(?:^|(?<=[^\\]))`")
sub = re.compile(r"(?:<sub>([" + chars + r"]+)</sub>|(?<=\w)_([" + chars + r"]))")
sup = re.compile(r"(?:<sup>([" + chars + r"]+)</sup>|(?<=\w)\^([" + chars + r"]))")
sub = re.compile(r"(?:<sub>([" + chars + r"]+)</sub>|(?<=[\w\)])_([" + chars + r"]))")
sup = re.compile(r"(?:<sup>([" + chars + r"]+)</sup>|(?<=[\w\)])\^([" + chars + r"]))")

def warn(msg, **kwargs):
print(msg, file=sys.stderr, **kwargs)
Expand Down

0 comments on commit 4d3c3c4

Please sign in to comment.