# The auditable Variant 3

This is a continuation for the previous post.

Let’s forget for a while about the space efficiency and build a truly anonymous scheme based on the Variant 2 using ** Hp(P)**.

The stealth address will contain two parts. For the first part let’s revert to the original Cryptonote formula. For the second part the formula from the Variant 2 is used.

The scheme, Variant 3, is below:

Wallet:Private key:(a, b, d)Public key:(A=a*G, B=b*G, D=d*G)Incomings tracking key:(a, B)Wallet balance tracking key:(a, B, d)Stealth address:Address pair:(P=Hs(r*A)*G+B, T=Hs(r*D)*D)Address private key pair:(x=Hs(a*R)+b, t=Hs(d*R)*d)Key image pair:(I=x*Hp(P), Ï=Hs(d*R)*d*Hp(P))Sender hides his stealth (P, T) among n-1 other address pairs:s<-random{(Pi, Ti) | i=1,…,n}, where (Ps, Ts)=(P, T)

{(qi, ki) | i=1,…,n}and{wi | i=1,…,n, i≠s}<-randomI=x*Hp(P), wherex=Hs(a*R)+bHp

Ï=t*(P), wheret=Hs(d*R)*dLi= qi*G, fori=s

qi*G +wi*Pi, forall i≠s

Ri= qi*Hp(Ps), fori=s

qi*Hp(Pi) +wi*I, forall i≠s

Mi= ki*G, fori=s

ki*G +wi*Ti, forall i≠s

Ni= ki*Hp(Ps), fori=s

ki*Hp(Pi) +wi*Ï, forall i≠sc=Hs(m, L1,…,Ln, R1,…,Rn, M1,…,Mn, N1,…,Nn, I, Ï, P1,…,Pn, T1,…,Tn)ci= wi, forall i≠s

c−sum(ci, for all i≠s), fori=sri= qi, forall i≠s

qi−cs*x, fori=s

zi= ki, forall i≠s

ki−cs*t, fori=ssignature=(Public verifier checks the signature:I, Ï, c1,…,cn, r1,…,rn, z1,…,zn)L’i= ri*G +ci*Pi, forall i

R’i= ri*Hp(Pi) +ci*I, forall i

M’i= zi*G +ci*Ti, forall i

N’i= zi*Hp(Pi) +ci*Ï, forall ic'=Hs(m, L'1,…,L'n, R'1,…,R'n, M'1,…,M'n, N'1,…,N'n, I, Ï, P1,…,Pn, T1,…,Tn)Knowing the incoming tracking key (a, B) for Bob's wallet (A, B, D) Carol can check if tx output (P, T) is sent to Bob:sum(ci, for all i)?=c'P?=Hs(a*R)*G+B, whereRis taken from the txKnowing Bob's wallet balance tracking key (a, B, d) an Auditor can check if another tx output is spent by Bob:Ï?=t*Hp(P), wheret=Hs(d*R)*d,

Ïis the second part of the tx key image,

(P, T)is one of the tx inputs,

Ris taken from a tx that outputs(P, T)

# Informal explanation for the scheme

Here we have the original Cryptonote scheme together with the additional key image ** Ï **and the corresponding

**and**

*M***series of arguments to the**

*N***hash.**

*c*The role for the original Cryptonote part is to prove that there is some index ** s** for the ring, such that there is some

**known to the sender (Bob), such that**

*x***and**

*Ps=x*G***. In other words, to prove that Bob knows key**

*I=x*Hp(Ps)***for some of the inputs and he really spends that input by publishing its key image**

*x***.**

*I*The role for the additional part is to prove that for the same index ** s** Bob knows some

**, such that**

*t***, and to publish the**

*Ts=t*G***.**

*Ï=t*Hp(Ps)*# Wallet balance audit use case

The Auditor knows ** t**’s constructed from

**that he knows. Hence, scanning the blockchain, he selects those output**

*d***’s that he can reconstruct**

*(P, T)***private key for.**

*T*Next, he looks at the key images ** (I, Ï)**’s and selects those that he can reconstruct

**for. Namely, for all selected**

*Ï***’s he knows**

*(P, T)***’s and checks:**

*t**Ï?=t*Hp(P)*

If this equality holds, then ** Ï **is linked to

**. That is, the Auditor links an output sent to Bob with a signature spending that output.**

*(P, T)*Thus, the Auditor sees all Bob’s spend-auditable incomings and outgoings.

# Spend-auditable coins

The ‘spend-auditable’ means here that Alice is free to put anything to ** T** when she sends an output to Bob. By default she puts

**, that means the coin is spend-auditable.**

*T=Hs(r*D)*D*However, she may put anything, e.g. ** T=Hs(r*D’)*D’** where

**, such that**

*D’=d’*G***is known to Bob and is not known to the Auditor. This way Bob is still able to spend this coin, however the Auditor won’t see that.**

*d’*Anyway, this doesn’t break the auditability in general, as only sender (Alice) has this option. Once Alice decided the coin to be spend-auditable, Bob can’t change that.

In other words, this option, that Alice has, is nothing. The same manner she is able to send the coin to another Bob’s wallet, that is not under the audit.

# Anonymity

The anonymity is proven the same way the original Cryptonote anonymity is, the both (P, I) and (T, Ï) parts of the scheme are obfuscated by ** Hp(P)**.

Can the intersection of the parts leak anonymity? That is, is Alice able to link Bob’s outgoing transactions with Bob by looking at the signatures containing (I, Ï)? This would be possible if she know a private key for linear combination of P and T that she composed when she sent a transaction to Bob. However, she doesn’t.

# Is it possible to cheat with Ps, Ty?

Everything works when Bob knows private keys for ** (Ps, Ts)** in the ring.

Suppose, Bob also knows private keys for another pair ** (Py, Ty)** in the ring. Is he able to cheat by providing the second part of key image calculated for that, second, pair? E.g., like on the following sketch:

I=xs*Hp(Ps)

Ï=ty*Hp(Py)Li= qi*G, fori=s, i=y

qi*G +wi*Pi, forall i≠s, i≠y

Ri= qi*Hp(Pi), fori=s, i=y

qi*Hp(Pi) +wi*I, forall i≠s, i≠y

Mi= ki*G, fori=s, i=y

ki*G +wi*Ti, forall i≠s, i≠y

Ni= ki*Hp(Pi), fori=s, i=y

ki*Hp(Pi) +wi*Ï, forall i≠s, i≠yc=Hs(m, L1,…,Ln, R1,…,Rn, M1,…,Mn, N1,…,Nn, I, Ï, P1,…,Pn, T1,…,Tn)ci= wi, forall i≠s, i≠y

(c−sum(ci, for all i≠s))/3 ,fori=s

(c−sum(ci, for all i≠s))*2/3 ,fori=yri= qi, forall i≠s, i≠y

qi−cs*xs, fori=s

qi−cy*xs, fori=yzi= ki, forall i≠s, i≠y

ki−cs*ty, fori=s

ki−cy*ty, fori=y

Here we have two variable coefficients dependent of the ** c** (hash for the left-side):

**and**

*cs***.**

*cy*However, using the common formulas the verifier won’t get the same ** Ry** and

**due to**

*Ns***:**

*Hp(Ps)!=Hp(Py)**L’i= ri*G +ci*Pi **, for **all i*

R’i= ri*Hp(Pi) +ci*I *, for **all i** *

--- R'y=qy*Hp(Py)-cy*xs*Hp(Py)+cy*xs*Hp(Ps) != Ry=qy*Hp(Py)

M’i= zi*G +ci*Ti *, for **all i*

N’i= zi*Hp(Pi) +ci*Ï *, for **all i*

*--- N's=ks*Hp(Ps)-cs*ty*Hp(Ps)+cs*ty*Hp(Py) != Ns=ks*Hp(Ps)*

Thus, no, it’s not possible to cheat this way.

# Summary for the Variant 3

The wallets are auditable at the cost of

*P*→*(P, T)*, plus one point for each output*I*→*(I, Ï)*, plus one point for each key image- (
*I, c1,…,cn, r1,…,rn*)→(*I, Ï, c1,…,cn, r1,…,rn, z1,…,zn*), plus one point and plus*n*integers for each transaction signature, where*n*is the decoy count.

Continued in the next post.