Wrocław University of Science and TechnologyDepartment of Fundamentals of Computer Science

Modified Okamoto identification

All roles run locally in this browser. Secret scalars are displayed for explanation only; they are not protocol messages. This is a research demonstration, not a production service.

Loading MCL WebAssembly...

Construction and implementation

Original and modified Okamoto

The commitment and challenge keep their roles. The change is in the response: the original protocol sends a linear expression as a scalar; the modified protocol sends that expression in the exponent, under a base bound to this commitment and challenge. A pairing checks the relation without receiving the scalar.

Original Okamoto identification on the left and its modified, pairing-verified variant on the right. The modified response is a group element instead of a scalar.
Author's original comparison artwork. Multiplicative notation; see SCC 2017, Sections 3.2 and 4, and Figure 3.

The same comparison in the selected elliptic-curve groups

Above: the publication's multiplicative notation. Below: additive notation with public keys and commitments in G2, modified responses in G1, and pairing results in GT. In both columns, the challenge follows the commitment.

Original Okamoto: scalar response verified in G2
Modified Okamoto: group response verified with a pairing
The two protocols use the same public key and commitment notation. Only the modified protocol uses the transcript-bound point U and a pairing.

In the source figure, P\mathcal P is the prover and V\mathcal V the verifier. The secret key is (a1,a2)(a_1,a_2), AA is the public key, (x1,x2)(x_1,x_2) is the ephemeral randomness, XX its commitment, and cc the verifier's challenge. Scalar arithmetic is modulo the prime group order qq.

The response equations below use multiplicative notation for the same asymmetric groups: g1,g2G2g_1,g_2\in G_2 denote the displayed Q1,Q2Q_1,Q_2, g^=UG1\hat g=U\in G_1, and e:G1×G2GTe:G_1\times G_2\to G_T. Multiplication and powers in the source groups represent point addition and scalar multiplication.

Original: scalar response

si=xi+aic,i=1,2s_i=x_i+a_i\cdot c,\quad i=1,2

The verifier checks a group equation using the received (s1,s2)(s_1,s_2):

g1s1g2s2=XAcg_1^{s_1}\cdot g_2^{s_2}=X\cdot A^c

For a nonzero challenge, a known xix_i exposes the corresponding secret:

ai=(sixi)c1(modq)a_i=(s_i-x_i)\cdot c^{-1}\pmod q

Modified: response in the group

g^=G1(ser(X)ser(c))\hat g=\mathcal H_{G_1}(\operatorname{ser}(X)\Vert\operatorname{ser}(c)) Si=g^xi+aic,i=1,2S_i=\hat g^{x_i+a_i\cdot c},\quad i=1,2

The verifier now checks a pairing equation:

e(S1,g1)e(S2,g2)=e(g^,XAc) e(S_1,g_1)\cdot e(S_2,g_2)= e(\hat g,X\cdot A^c)

The response no longer gives the verifier the scalars (s1,s2)(s_1,s_2) needed for that linear extraction. This is the purpose of lifting the response into the exponent.

Source notation. The original artwork retains the publication's symmetric pairing e^:G×GGT\hat e:G\times G\to G_T. Its group-valued hash is denoted \mathcal H in the paper. Throughout our explanations and executable asymmetric profile, the hash into G1G_1 is written G1\mathcal H_{G_1} and the scalar-valued hash is written \mathcal H. The code's UU corresponds to g^\hat g in multiplicative notation. Concatenation always means encoded values, commitment first, challenge second.

From the paper to MCL WebAssembly

The executable example uses asymmetric pairing groups, with BLS12-381 selected initially. It writes elliptic-curve groups additively and keeps the target group multiplicative:

e:G1×G2GTe:G_1\times G_2\to G_T
Keys and commitment
Q1,Q2,A,XG2Q_1,Q_2,A,X\in G_2. The figure's g1,g2g_1,g_2 correspond to Q1,Q2Q_1,Q_2 in the demo.A=a1Q1+a2Q2,X=x1Q1+x2Q2A=a_1\cdot Q_1+a_2\cdot Q_2,\quad X=x_1\cdot Q_1+x_2\cdot Q_2The two generators are derived with distinct labels; their discrete-logarithm relation must not be known.
Transcript-bound base
U=G1(ser(X)ser(c))G1U=\mathcal H_{G_1}(\operatorname{ser}(X)\Vert\operatorname{ser}(c))\in G_1Here UU replaces g^\hat g. The code calls hashAndMapToG1 on the concatenated hexadecimal serializations, commitment first, challenge second. This is not a public hash-to-scalar multiplied by a fixed point.
Modified response
Si=(xi+aic)UG1,i=1,2S_i=(x_i+a_i\cdot c)\cdot U\in G_1,\quad i=1,2Exponentiation in the figure becomes scalar multiplication in G1G_1; S1,S2S_1,S_2 are the transmitted points.
Verification
e(S1,Q1)e(S2,Q2)=e(U,X+cA)e(S_1,Q_1)\cdot e(S_2,Q_2)=e(U,X+c\cdot A)Both sides are in GTG_T. Every pairing takes a G1G_1 point first and a G2G_2 point second. The dot between the two pairings is multiplication in the target group.
Ordinary protocol
Ordinary Okamoto needs no pairing and can be instantiated in a suitable prime-order group, including G1G_1 or G2G_2. Both variants have executable grids below: the regular protocol verifies scalar responses in G₂, and the modified protocol verifies G₁ response points using pairings.
Protected computation and scope of this demonstrator

The paper explicitly protects the long-term keys behind the exponentiation interfaces fi(B)=Bai\mathbf f_i(B)=B^{a_i}. It forms each response as Si=g^xifi(g^c)S_i=\hat g^{x_i}\cdot\mathbf f_i(\hat g^c), without exporting the key or a scalar response from that protected component.

This browser demonstration computes and displays secret scalars for teaching. It does not implement an HSM or isolate those secrets from the browser. MCL's Fr values are scalars modulo qq; the demo's random sampling has no explicit zero-rejection step, whereas the source artwork marks nonzero samples with Zq\mathbb Z_q^*.

The asymmetric equations above describe the actual executable arithmetic. They are not a claim that the paper's symmetric-group security reduction transfers unchanged to this implementation profile. See the publication for its security model and the MCL WebAssembly documentation for the library.

Protocol Steps

01 Parameters

MCL init...
PG1P\in G_1Q1,Q2G2Q_1,Q_2\in G_2

P:
Q1:
Q2:

02 Prover keys

sk=(a1,a2)sk=(a_1,a_2)A=a1Q1+a2Q2A=a_1\cdot Q_1+a_2\cdot Q_2

sk1:
sk2:
pk:

03 Commitment

x1,x2Zqx_1,x_2\in\mathbb Z_qX=x1Q1+x2Q2X=x_1\cdot Q_1+x_2\cdot Q_2

x1:
x2:
X:

04 Challenge

cZqc\in\mathbb Z_q

c:

05 Response

U=G1(ser(X)ser(c))U=\mathcal H_{G_1}(\mathrm{ser}(X)\Vert\mathrm{ser}(c))si=xi+aics_i=x_i+a_i\cdot cSi=siU,i=1,2S_i=s_i\cdot U,\quad i=1,2

U:
s1:
S1:
s2:
S2:

06 Verification

e1=e(S1,Q1)e_1=e(S_1,Q_1)e2=e(S2,Q2)e_2=e(S_2,Q_2)e3=e1e2e_3=e_1\cdot e_2e4=e(U,X+cA)e_4=e(U,X+c\cdot A)e3=e4e_3=e_4

e3:
e4:
Result:

Regular Okamoto Protocol Steps

01 Parameters

Q1,Q2G2Q_1,Q_2\in G_2
Q1Q_1:
Q2Q_2:

02 Prover keys

sk=(a1,a2)sk=(a_1,a_2)A=a1Q1+a2Q2A=a_1\cdot Q_1+a_2\cdot Q_2
a1a_1:
a2a_2:
AA:

03 Commitment

x1,x2Zqx_1,x_2\in\mathbb Z_qX=x1Q1+x2Q2X=x_1\cdot Q_1+x_2\cdot Q_2
x1x_1:
x2x_2:
XX:

04 Challenge

cZqc\in\mathbb Z_q
cc:

05 Response

si=xi+aics_i=x_i+a_i\cdot ci=1,2i=1,2
s1s_1:
s2s_2:

06 Verification

L=s1Q1+s2Q2L=s_1\cdot Q_1+s_2\cdot Q_2R=X+cAR=X+c\cdot AL=RL=R
LL:
RR:
Result:

Original and modified: execution time

Mean milliseconds per run on the selected curve: 10 fresh transcripts after 3 warm-up runs. Both variants use the same pre-generated key; paired runs alternate their order. Includes fresh commitment and challenge randomness, response computation, and the complete verification equation. Modified verification recomputes G1\mathcal H_{G_1} from the public transcript. Parameter generation, key generation, DOM updates and network transmission are excluded. These are local browser measurements, not security estimates or production benchmarks.

StageOriginal (ms)Modified (ms)
Commitment
Challenge
Response
Verification
Total

Benchmark



opmsec
Fr::setByCSPRNG0
pairing0
millerLoop0
finalExp0
precomputedMillerLoop0
G1::add0
G1::dbl0
G1::mul0
G2::add0
G2::dbl0
G2::mul0
hashAndMapToG10
hashAndMapToG20
Fr::add0
Fr::mul0
Fr::sqr0
Fr::inv0
GT::add0
GT::mul0
GT::sqr0
GT::inv0