解釋SNARKs 第3部分:知識(shí)系數(shù)測(cè)試和假設(shè)

原文出自:https://blog.z.cash/snark-explain3/
作者:Ariel Gabizon
譯者:Matter實(shí)驗(yàn)室

In Part II, we saw how Alice can blindly evaluate the hiding E(P(s)) of her polynomial P of degree d, at a point s belonging to Bob. We called this “blind” evaluation, because Alice did not learn s in the process.

在第二部分柒爸,我們知道了Alice如何在屬于Bob的 s 點(diǎn)数初,去盲評(píng)她d階多項(xiàng)式P的匿數(shù)E(P(s))声登。我們將其稱為 “盲” 評(píng)估稍刀,因?yàn)?Alice 在這個(gè)過(guò)程中并不知道 s掌逛。

However, there was something missing in that protocol – the fact that Alice is able to compute E(P(s)) does not guarantee she will indeed send E(P(s)) to Bob, rather than some completely unrelated value.

然而宠互,在那項(xiàng)協(xié)議中有瑕疵 – 雖然Alice 能夠計(jì)算出 E(P(s)) ,但并不能確保她將正確 E(P(s)) 發(fā)送給 Bob朵夏,而非一些完全不相關(guān)的值。

Thus, we need a way to “force” Alice to follow the protocol correctly. We will explain in part IV precisely how we achieve this. In this post, we focus on explaining the basic tool needed for that – which we call here the Knowledge of Coefficient (KC) Test.

因此榆纽,我們需要一種 “強(qiáng)制” Alice 正確地遵從協(xié)議的方式仰猖。我們將在第四部分詳細(xì)解釋我們?nèi)绾螌?shí)現(xiàn)這一點(diǎn)。在本文中掠河,我們專注在解釋實(shí)現(xiàn)這一功能需要用到的基礎(chǔ)工具 – 我們將其稱為 “知識(shí)系數(shù)(KC)測(cè)試”亮元。

As before, we denote by g a generator of a group G of order |G|=p where the discrete log is hard. It will be convenient from this post onwards to write our group additively rather than multiplicatively. That is, for α ∈ Fp, α?g denotes the result of summing α copies of g.

正如之前一樣,我們使用 g 表示一個(gè)階為|G|=p的群G的生成器唠摹,對(duì)于該群爆捞,離散對(duì)數(shù)是困難的。在文章開(kāi)始時(shí)使用加法而不是乘法解釋起來(lái)更加方便勾拉。 那就是煮甥,對(duì)于 α∈Fpα?g 表示 α 個(gè) g 的求和結(jié)果藕赞。

THE KC TEST

知識(shí)系數(shù)(KC)測(cè)試

For α ∈ F(?,p) [1], let us call a pair of elements (a,b) in G an α-pair if a,b≠0 and b=α?a.

[1] F(?,p) denotes the non-zero elements of Fp. It is the same as Z(?,p) described in Part I.

The KC Test proceeds as follows.

  1. Bob chooses random α ∈ F(?,p) and a ∈ G. He computes b=α?a.

  2. He sends to Alice the “challenge” pair (a,b). Note that (a,b) is an α-pair.

  3. Alice must now respond with a different pair (a′,b′) that is also an α-pair.

  4. Bob accepts Alice’s response only if (a′,b′) is indeed an α-pair. (As he knows α he can check if b′=α?a′.)

對(duì)于 α∈F(?,p)[1], 如果 a,b≠0b=α?a 同時(shí)成立成肘,則我們稱 G 中的一組元素 (a,b)α-pair。

    • F(?,p) 表示 Fp 中的非零元素組成的集合斧蜕,它與第一部分描述的 Z(?,p) 相類似双霍。

知識(shí)系數(shù)(KC)測(cè)試按照如下的步驟進(jìn)行:

  1. Bob 隨機(jī)選擇一個(gè) α∈F(?,p)a∈G 。他計(jì)算出 b=α?a 批销。
  2. 他發(fā)送 “挑戰(zhàn)” 數(shù)對(duì) (a,b) 給 Alice洒闸。注意,(a,b) 是一個(gè) α-pair 均芽。
  3. Alice 現(xiàn)在必須回復(fù)一個(gè)不同的數(shù)對(duì) (a′,b′) 同時(shí)也必須是 α-pair 丘逸。
  4. 如果 (a′,b′) 確實(shí)是一個(gè) α-pair ,則 Bob 接受 Alice 的回復(fù)掀宋。(由于他知道 α 深纲,他可以檢查 b′=α?a′是否成立。)

Now, let’s think how Alice could successfully respond to the challenge. Let’s assume for a second that she knew α. In that case, she could simply choose any a′ in G, and compute b′=α?a′; and return (a′,b′) as her new α-pair.

現(xiàn)在劲妙,讓我們思考 Alice 如何成功地回復(fù)挑戰(zhàn)湃鹊。 讓我們假設(shè)一下,她知道 α 是趴。 在這種情況下涛舍,她便可以在 G 中簡(jiǎn)單地挑選出 a′,并計(jì)算出 b′=α?a′; 同時(shí)返回 (a′,b′) 作為她得到的新 α-pair 唆途。

However, as the only information about α she has is α?a and G has a hard discrete log problem, we expect that Alice cannot find α.

然而富雅,由于 Alice 唯一擁有關(guān)于α的信息的載體是α?a 掸驱,并且 G 具有難離散對(duì)數(shù)問(wèn)題,我們可以預(yù)計(jì) Alice 并不能得到 α没佑。

So how can she successfully respond to the challenge without knowing α?

因此毕贼,如何讓 Alice 在不知道 α 的前提下成功回復(fù)挑戰(zhàn)呢?

Here’s the natural way to do it: Alice simply chooses some γ∈F?p,γ∈Fp?, and responds with (a′,b′)=(γ?a,γ?b).(a′,b′)=(γ?a,γ?b).

In this case, we have:

b′=γ?b=γα?a=α(γ?a)=α?a′,b′=γ?b=γα?a=α(γ?a)=α?a′,

so indeed (a′,b′)(a′,b′) is an αα-pair as required.

以下是實(shí)現(xiàn)這一目標(biāo)的自然做法: Alice 簡(jiǎn)單地選擇一些 γ∈F(?,p)蛤奢,并且回復(fù) (a′,b′)=(γ?a,γ?b) 鬼癣。

在這種情況下,我們有:

b′=γ?b=γα?a=α(γ?a)=α?a′,

因此(a′,b′)確實(shí)是這里需要的 α-pair 啤贩。

Note that if Alice responds using this strategy, she knows the ratio between a and a′. That is, she knows the coefficient γ such that a′=γ?a.

注意到待秃,如果 Alice 使用這種策略進(jìn)行回復(fù),她就知道 aa′ 之間的比率痹屹。 也就是說(shuō)章郁,她知道系數(shù) γ 滿足 a′=γ?a

The Knowledge of Coefficient Assumption [2] (KCA) states that this is always the case, namely:

This is typically called the Knowledge of Exponent Assumption in the literature, as traditionally it was used for groups written multiplicatively.

KCA: If Alice returns a valid response (a′,b′) to Bob’s challenge (a,b) with non-negligible probability over Bob’s choices of a,α, then she knows γ such that a′=γ?a.

The KC Test and Assumption will be important tools in Part IV.

知識(shí)系數(shù)假設(shè) [2] (KCA) 指出志衍,情況總是像這樣:

    • 它的書(shū)面名稱通常為知識(shí)系數(shù)假設(shè)暖庄,傳統(tǒng)上被用在字面乘法性質(zhì)的群上。

KCA: 如果 Alice 對(duì)于Bob選擇的a,α楼肪,以不可忽略的可能性培廓,對(duì)Bob的挑戰(zhàn)(a,b)**給出一個(gè)有效的回復(fù) (a′,b′),此時(shí),她所知道的 γ 春叫,可以滿足 a′=γ?a 肩钠。

知識(shí)系數(shù)(KC)測(cè)試和假設(shè)將是第四部分的重要工具。

WHAT DOES “ALICE KNOWS” MEAN EXACTLY

“ALICE知道”的確切意義是什么

You may wonder how we can phrase the KCA in precise mathematical terms; specifically, how do we formalize the notion that “Alice knows γ” in a mathematical definition?

你也許會(huì)好奇我們?nèi)绾螌?KCA 用準(zhǔn)確地?cái)?shù)學(xué)形式表達(dá)出來(lái)暂殖;具體來(lái)說(shuō)蔬将,我們?nèi)绾斡脭?shù)學(xué)定義將 “Alice 知道 γ 的意義形式化出來(lái)?

This is done roughly as follows: We say that, in addition to Alice, we have another party which we call Alice’s Extractor. Alice’s Extractor has access to Alice’s inner state.

我們通過(guò)下面這樣粗略的方式說(shuō)明: 我們說(shuō),除了 Alice 之外央星,我們有一個(gè)被稱為 Alice的提取器 的角色。 Alice的提取器可以訪問(wèn) Alice 的內(nèi)部狀態(tài)惫东。

We then formulate the KCA as saying that: whenever Alice successfully responds with an α-pair (a′,b′), Alice’s Extractor outputs γ such that a′=γ?a. [3]

[3]The fully formal definition needs to give the Extractor “a little slack” and states instead that the probability that Alice responds successfully but the Extractor does not output such γ is negligible.

我們這時(shí)便可以這樣形式化 KCA: 當(dāng) Alice 使用一個(gè) α-pair (a′,b′) 成功回復(fù)時(shí)莉给,Alice的提取器 輸出的 γ 滿足 a′=γ?a. [3]

    • 完整正式定義需要讓提取器 “稍微松懈一下”,并反過(guò)來(lái)聲明廉沮,Alice 成功回復(fù)但是提取器無(wú)法正常輸出這樣的 γ 的可能性可以忽略不計(jì)颓遏。

譯者總結(jié)

數(shù)學(xué)關(guān)系
交互模型
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市滞时,隨后出現(xiàn)的幾起案子叁幢,更是在濱河造成了極大的恐慌,老刑警劉巖坪稽,帶你破解...
    沈念sama閱讀 206,839評(píng)論 6 482
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件曼玩,死亡現(xiàn)場(chǎng)離奇詭異鳞骤,居然都是意外死亡,警方通過(guò)查閱死者的電腦和手機(jī)黍判,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 88,543評(píng)論 2 382
  • 文/潘曉璐 我一進(jìn)店門豫尽,熙熙樓的掌柜王于貴愁眉苦臉地迎上來(lái),“玉大人顷帖,你說(shuō)我怎么就攤上這事美旧。” “怎么了贬墩?”我有些...
    開(kāi)封第一講書(shū)人閱讀 153,116評(píng)論 0 344
  • 文/不壞的土叔 我叫張陵榴嗅,是天一觀的道長(zhǎng)。 經(jīng)常有香客問(wèn)我陶舞,道長(zhǎng)嗽测,這世上最難降的妖魔是什么? 我笑而不...
    開(kāi)封第一講書(shū)人閱讀 55,371評(píng)論 1 279
  • 正文 為了忘掉前任吊说,我火速辦了婚禮论咏,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘颁井。我一直安慰自己厅贪,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 64,384評(píng)論 5 374
  • 文/花漫 我一把揭開(kāi)白布雅宾。 她就那樣靜靜地躺著养涮,像睡著了一般。 火紅的嫁衣襯著肌膚如雪眉抬。 梳的紋絲不亂的頭發(fā)上贯吓,一...
    開(kāi)封第一講書(shū)人閱讀 49,111評(píng)論 1 285
  • 那天,我揣著相機(jī)與錄音蜀变,去河邊找鬼悄谐。 笑死,一個(gè)胖子當(dāng)著我的面吹牛库北,可吹牛的內(nèi)容都是我干的爬舰。 我是一名探鬼主播,決...
    沈念sama閱讀 38,416評(píng)論 3 400
  • 文/蒼蘭香墨 我猛地睜開(kāi)眼寒瓦,長(zhǎng)吁一口氣:“原來(lái)是場(chǎng)噩夢(mèng)啊……” “哼赦肃!你這毒婦竟也來(lái)了诗良?” 一聲冷哼從身側(cè)響起栏笆,我...
    開(kāi)封第一講書(shū)人閱讀 37,053評(píng)論 0 259
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤趾娃,失蹤者是張志新(化名)和其女友劉穎,沒(méi)想到半個(gè)月后,有當(dāng)?shù)厝嗽跇?shù)林里發(fā)現(xiàn)了一具尸體惜颇,經(jīng)...
    沈念sama閱讀 43,558評(píng)論 1 300
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡皆刺,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 36,007評(píng)論 2 325
  • 正文 我和宋清朗相戀三年,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了官还。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片芹橡。...
    茶點(diǎn)故事閱讀 38,117評(píng)論 1 334
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡,死狀恐怖望伦,靈堂內(nèi)的尸體忽然破棺而出林说,到底是詐尸還是另有隱情,我是刑警寧澤屯伞,帶...
    沈念sama閱讀 33,756評(píng)論 4 324
  • 正文 年R本政府宣布腿箩,位于F島的核電站,受9級(jí)特大地震影響劣摇,放射性物質(zhì)發(fā)生泄漏珠移。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 39,324評(píng)論 3 307
  • 文/蒙蒙 一末融、第九天 我趴在偏房一處隱蔽的房頂上張望钧惧。 院中可真熱鬧,春花似錦勾习、人聲如沸浓瞪。這莊子的主人今日做“春日...
    開(kāi)封第一講書(shū)人閱讀 30,315評(píng)論 0 19
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)乾颁。三九已至,卻和暖如春艺栈,著一層夾襖步出監(jiān)牢的瞬間英岭,已是汗流浹背。 一陣腳步聲響...
    開(kāi)封第一講書(shū)人閱讀 31,539評(píng)論 1 262
  • 我被黑心中介騙來(lái)泰國(guó)打工湿右, 沒(méi)想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留诅妹,地道東北人。 一個(gè)月前我還...
    沈念sama閱讀 45,578評(píng)論 2 355
  • 正文 我出身青樓毅人,卻偏偏與公主長(zhǎng)得像漾唉,于是被迫代替她去往敵國(guó)和親。 傳聞我的和親對(duì)象是個(gè)殘疾皇子堰塌,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 42,877評(píng)論 2 345

推薦閱讀更多精彩內(nèi)容