Skip to content

Commit

Permalink
(fixup) Modify math with LaTex to embedded form
Browse files Browse the repository at this point in the history
  • Loading branch information
tnasu committed Nov 9, 2022
1 parent 1d31b8f commit 963c029
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 22 deletions.
14 changes: 4 additions & 10 deletions docs/en/02-consensus.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,13 @@ Ostracon's block generation mechanism based on Tendermint-BFT consists of the fo

VRF is an algorithm for generating a hash value $t$ that can be used as a cryptographic pseudo-random number. The differences between VRF and typical hash functions or pseudo-random number generators are that only the owner of the private key can generate the hash value $t$, and anyone with the corresponding public key can verify the correctness of the hash value.

A VRF hash generator $k$ generates a proof $\pi$ (VRF Proof) from the message $m$ using its private key $S_k$ as in Equation (1). Here, the hash value $t$ can be acquired from the proof $pi$ using Equation. (2). On the other hand, to verify that the hash value $t$ was generated by the owner of the private key $S_k$ based on the message $m$, the verifier applies the public key $P_k$ for $S_k$, $m$, and $\pi$ to Equation (3) to verify that both hash values are identical.
A VRF hash generator $k$ generates a proof $\pi$ (VRF Proof) from the message $m$ using its private key $S_k$ as in Equation `1.`. Here, the hash value $t$ can be acquired from the proof $pi$ using Equation. `2.` On the other hand, to verify that the hash value $t$ was generated by the owner of the private key $S_k$ based on the message $m$, the verifier applies the public key $P_k$ for $S_k$, $m$, and $\pi$ to Equation `3.` to verify that both hash values are identical.

![VRF Expression](../static/consensus/math_expression.png)

```math
\begin{eqnarray}
\pi & = & {\rm vrf\_prove}(S_k, m) \\
t & = & {\rm vrf\_proof\_to\_hash}(\pi)
\end{eqnarray}
\begin{equation}
{\rm vrf\_proof\_to\_hash}(\pi) \overset{\text{?}}{=} {\rm vrf\_verify}(P_k, m, \pi)
\end{equation}
```
1. $\pi = {\rm vrf\_prove}(S_k, m)$
2. $t = {\rm vrf\_proof\_to\_hash}(\pi)$
3. ${\rm vrf\_proof\_to\_hash}(\pi) \overset{\text{?}}{=} {\rm vrf\_verify}(P_k, m, \pi)$

With Ostracon, the Proposer and Voters of the next block are selected randomly by a verifiable random number from the Proposer that created the previous block. A VRF Proof field $pi$ is added to the block for this purpose.

Expand Down
18 changes: 6 additions & 12 deletions docs/ja/02-consensus.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,16 @@ Tendermint-BFT に基づく Ostracon のブロック生成メカニズムは以
VRF は暗号論的疑似乱数として使用できるハッシュ値 $t$ を生成するアルゴリズムです。VRF が一般的なハッシュ関数や疑似乱数生成器と異なるのは、
秘密鍵の所有者のみがハッシュ値 $t$ を算出でき、対応する公開鍵を持つ人であれば誰でもそのハッシュ値の正当性を検証できる点です。

乱数の生成者 $k$ は式 (1) のように自身の秘密鍵 $S_k$ を使ってメッセージ $m$ から証明 (VRF Proof) $\pi$ を生成します。ここでハッシュ値
$t$ は式 (2) を使って証明 $pi$ から生成することができます。一方、検証者はハッシュ値 $t$ が秘密鍵 $S_k$ の所有者によってメッセージ $m$ に
基づいて生成されたものであることを検証するために、$S_k$ に対する公開鍵 $P_k$ と $m$, $\pi$ を式 (3) に適用して同一のハッシュ値 $t$ が
乱数の生成者 $k$ は式 `1.` のように自身の秘密鍵 $S_k$ を使ってメッセージ $m$ から証明 (VRF Proof) $\pi$ を生成します。ここでハッシュ値
$t$ は式 `2.` を使って証明 $pi$ から生成することができます。一方、検証者はハッシュ値 $t$ が秘密鍵 $S_k$ の所有者によってメッセージ $m$ に
基づいて生成されたものであることを検証するために、$S_k$ に対する公開鍵 $P_k$ と $m$, $\pi$ を式 `3.` に適用して同一のハッシュ値 $t$ が
生成されることを確認します。

![VRF Expression](../static/consensus/math_expression.png)

```math
\begin{eqnarray}
\pi & = & {\rm vrf\_prove}(S_k, m) \\
t & = & {\rm vrf\_proof\_to\_hash}(\pi)
\end{eqnarray}
\begin{equation}
{\rm vrf\_proof\_to\_hash}(\pi) \overset{\text{?}}{=} {\rm vrf\_verify}(P_k, m, \pi)
\end{equation}
```
1. $\pi = {\rm vrf\_prove}(S_k, m)$
2. $t = {\rm vrf\_proof\_to\_hash}(\pi)$
3. ${\rm vrf\_proof\_to\_hash}(\pi) \overset{\text{?}}{=} {\rm vrf\_verify}(P_k, m, \pi)$

Ostracon では、あるブロックを作成した Proposer による*無作為で検証可能な乱数*によって次の Proposer と Voter を決定します。そして
ブロックにはそのための VRF Proof フィールド $\pi$ が追加されています。
Expand Down

0 comments on commit 963c029

Please sign in to comment.