
Series: Zcash from First Principles . Article 2 . Elliptic Curves (Àdàkọ:Ojúewé ojúewé) A ro pe Abala 1 (awọn aaye to lopin): iṣiro ti o yika mod a akọkọ. Ko si ipilẹṣẹ miiran ti o nilo. ** Ohun tí ẹ ó fi sílẹ̀:** àwòrán tó ṣe kedere tó sì tọ̀nà nípa àwọn ìyí elliptic, "ibi ìdẹkùn" tí ó jẹ́ kí wọ́n wúlò, àti bí Zcash ṣe sọ wọ̀n di kókó àti àdéhùn.
Àpilẹ̀kọ 1 fún wa ní ibi eré ìdárayá tó dára fún ìṣirò: àgbègbè tí ó ní òpin. ṣùgbọ́n àgbègbè kan ní tirẹ̀ jẹ́ àwọn nọ́ńbà lásán. láti ṣe kókó àti "àwọn àpòòwé tí a fi èdìdì dì" láti inú ìpínrọ̀ 0, Zcash nilo ohun kan pẹlu pataki, ọkan-itọsọna iru ti isoro: rorun lati ṣe iṣiro siwaju, fere soro lati yi pada. Ohun ti o jẹ a ** elliptic iyipo **. Yi article kọ o lati ilẹ soke, inu ilohunsoke ṣaaju ki o to algebra.
Gbogbo ètò ìpamọ́ nílò òpópónà kan tí kò ní àtúnṣe: iṣẹ́ tí kò fi bẹ́ẹ̀ ṣe pàtàkì láti rìn síwájú àti tí kò ṣeé ṣe láti padà sẹ́yìn.
Here's why. Your secret key is a number you keep hidden. Your public key (and your address) is derived from it and shown to the world. The entire security of the system rests on one fact: given the public key, nobody can work backwards to your secret key. If they could, they could spend your money.
Nítorí náà a nílò ìṣiṣẹ́ ìṣirò níbi tí:
Plain finite-field multiplication isn't good enough; division undoes it instantly (that was the whole point of Article 1). We need something with no easy "undo" button. Elliptic curves provide exactly that, and as a bonus, their points combine in a way that's perfect for building commitments. Let's see how.
Gbagbe cryptography fun akoko kan. a ** elliptic iyipo ** ni o kan awọn ṣeto ti ojuami (x, y) tí ó tẹ́júmọ́ àpapọ̀ ìṣirò tí ó ní ìrísí:
y^2 = x^3 + ax + b
Over ordinary numbers it looks like a smooth, swooping curve, often with a rounded loop and two tails:

The genuinely surprising part: you can "add" two points on this curve to get a third point on the same curve. This isn't ordinary addition of coordinates. It's a geometric rule, and it's easier to see than to say.
Láti fi kún P + Q:
P àti Q.R*.R* ní ààlà ojú òpó. Ìrònú yẹn ni ìdáhùn, P + Q.
Láti ṣe ìṣirò P + P (ìwé 2P), kò sí ibì kejì láti fa ìlà, nítorí náà o lo ìlà tí a fi ń mọ̀ ọ́n. P instead, then follow the same "third intersection, then reflect" recipe.
That's the entire operation. Two geometric rules. With them, the points of an elliptic curve form what mathematicians call a group: a set with a well-behaved "addition." It even has a "zero."
Gbogbo ètò ìṣírò nílò 0, the thing that changes nothing when you add it. On an elliptic curve, that role is played by a special extra point called the point at infinity, written OO lè fojú inú wò ó bí "òkè tí kò lópin", ibi tí àwọn ìlà tó dúró ṣánṣán ti ń pàdé. O ó fi í sílẹ̀ láì yí i padà, bí ìgbà tí a bá fi í kún un 0.
The smooth curve above is the intuition. But Zcash doesn't use real numbers (they round and leak size, per Article 1). It uses an elliptic curve over a finite field: the same equation y^2 = x^3 + ax + b, ṣùgbọ́n pẹ̀lú gbogbo ìṣirò tí a ṣe mod a prime.
Tó o bá ṣe bẹ́ẹ̀, àlàfo tó rẹwà náà á tú ká, á sì di àwọn kókó tí kò ní ìsopọ̀ kankan, kókó kan fún ẹnì kọ̀ọ̀kan (x, y) tọkọtaya tí ó tẹ́júmọ̀ sí àpapọ̀ mod pO ti dẹkun wíwo bi a iyipo ni gbogbo. sugbon nibi ni awọn crucial ohun:
Awọn algebra ti awọn chord-ati-tangent ofin ṣi ṣiṣẹ pipe. Awọn kanna agbekalẹ ti ri
P + Qgeometrically bayi ṣe iṣiro rẹ pẹlu arithmetic aaye opin. awọn ojuami ṣi ṣe ẹgbẹ kan, pẹlu kanna0(àkókó ní àìlópin).
Ẹ jẹ́ ká sọ èyí di òótọ́ pẹ̀lú àpẹẹrẹ kéékèèké kan tí a ti rí i pé ó jóòótọ́.
Gba y^2 = x^3 + 2x + 2 lórí àgbègbè tí ó ní òpin F_17. Ṣiṣiro gbogbo aaye ti o wulo n funni ni deede ** awọn aaye 18, pẹlu aaye ni ailopin = 19 lapapọ.** Diẹ ninu wọn:
(0,6) (0,11) (3,1) (3,16) (5,1) (5,16) (6,3) (6,14) (7,6) (7,11) ...
Wá ibi tó o máa lọ báyìí G = (5, 1) ẹ wo ohun tó ṣẹlẹ̀ (gbogbo ìlà tó wà nísàlẹ̀ yìí ni wọ́n ṣírò, kì í ṣe àbá):
| Igbesẹ | Àmì | Igbesẹ | Àmì |
|---|---|---|---|
1G | (5, 1) | 11G | (13, 10) |
2G | (6, 3) | 12G | (0, 11) |
3G | (10, 6) | 13G | (16, 4) |
4G | (3, 1) | 14G | (9, 1) |
5G | (9, 16) | 15G | (3, 16) |
6G | (16, 13) | 16G | (10, 11) |
7G | (0, 6) | 17G | (6, 14) |
Ohun méjì tó yẹ kó o kíyè sí rèé:
O** ni igbesẹ 19, ki o si o yoo tun lailai. G "ń mú" gbogbo àwùjọ wá, nítorí náà a pè é ní "generator".1G + 2G = (5,1) + (6,3) = (10,6), èyí tí ó jẹ́ gan-an 3G. Àfikún náà bára mu ní inú, gẹ́gẹ́ bí àwùjọ kan ṣe ń béèrè.Àtẹ yẹn ti 1G, 2G, 3G, ... ni okan ohun gbogbo. fifi aaye kan kun si ara re ni a npe ni scalar multiplication*: aaye kG túmọ̀ sí "G tí a fi kún ara rẹ̀ k àwọn ìgbà kan. "
Ní báyìí, ẹ jẹ́ ká wo ọ̀nà méjì tí wọ́n gbà ṣe é:
| Ìtọ́sọ́nà | Ìbéèrè | Ìṣòro |
|---|---|---|
| Àwọn tó ń lọ síwájú | Ti a fun ni k àti G, iṣirò kG | Rọrùn. Kódà fún àwọn tó tóbi ní astronomiki k, ọgbọ́n àrékérekè kan tí a ń pè ní double-and-add dé ibẹ̀ ní ọgọ́rùn-ún díẹ̀ ìgbésẹ̀ |
| Sẹ́yìn | Ti a fun ni G àti kG, gba pada k | Kò ṣeé ṣe dáadáa lórí ìlà ìkọsílẹ̀ gidi kan |
Ti asymmetry ni awọn ** ọkan-ọna street ** ti a nilo ni Section 1. k produced this point?") ni a npe ni **Elliptic Curve Discrete Logarithm Problem (ECDLP) **, ati lori awọn iyipo Zcash lo, ko si ọna ti a mọ ti o yanju rẹ ṣaaju iku ooru ti agbaye.

Nínú ohun ìṣeré wa
F_17ìkúrú o * le * nìkan kakO ni 19 ojuami.2^(255)points. The table would have more rows than there are atoms in the universe, so "reading it off" is not an option. The smallness is what makes the toy curve teachable and also why it isn't secure.
A ní gbogbo ohun tí a nílò láti ṣàlàyé kókó ìkọ̀wé-ìfiwéra gidi, ó sì rọrùn gan-an:
** Yan nọ́ńbà àṣírí kan
k. Ṣíṣèwé lórí kókó náàkGÌyẹn ni.**kkókó ìkọ̀kọ̀ rẹ ni.kGjẹ́ kókó ìta gbangba rẹ. Ọ̀nà kan ṣoṣo (ECDLP) ṣe ìdánilójú pé ẹnikẹ́ni kò lè sákGpadà sík.
Èrò kan ṣoṣo yìí, a public key is a secret scalar times a fixed generator, ni irúgbìn àwọn kókó ìnáwó Zcash, wíwo kókó, àti àwọn àdírẹ́sì. Igi kókó tí ó kún fún àwọn àlàfo ní orí, ṣùgbọ́n gbogbo ẹ̀ka ń dàgbà láti inú gbòǹgbò yìí.
Recall the "sealed envelope" (commitment) from Article 0, which had to hide its contents yet be impossible to forge. Elliptic curves hand us a clean way to build one. Take two fixed, public generator points G àti H, ohun tó ṣe pàtàkì gan - an v, ati nọmba ti o fọju laileto r, ati fọọmu:
Commitment = v.G + r.H
Èyí ni ìfọ̀kànsí Pedersen, ó sì ní àwọn ànímọ́ méjèèjì tí a fẹ́:
r smears awọn esi kọja gbogbo awọn iyipo, ki awọn ojuami fi han ohunkohun nipa v.(v, r) tó o bá ń sọ ohun kan náà, kò ní ṣeé ṣe fún ẹ láti yí èrò rẹ pa dà nípa ohun tó o ti pinnu láti ṣe.Ohun-ini ajeseku kan ti di ohun ti ko ni idiyele nigbamii: awọn adehun wọnyi ** ṣafikun **. v_1 àfikún sí àdéhùn láti v_2 jẹ àdéhùn tó lẹ́sẹ̀ nílẹ̀ láti v_1 + v_2. Ìwà "homomorphic" ni bí Zcash yóò ṣe fi hàn nígbà tó bá yá pé owó tí ó wọlé nínú ìnáwó kan dọ́gba pẹ̀lú owó tó jáde, láìfi iye kankan hàn. A ó ná owó náà ní àyíká Àpilẹ̀kọ 6.
Àwọn ẹ̀rí ìka náà dájú, wọ́n sì ṣeé ṣàyẹ̀wò.
| Apẹrẹ Zcash | Àwọn ìlà tí ó ń lò | Ipa |
|---|---|---|
| Sapling (agbalagba) | BLS12-381 pẹ̀lú ìlà tí a fi sínú rẹ̀ tí a ń pè ní Jubjub | BLS12-381 ní ètò ìdánilójú; A kọ́ Jubjub lórí pápá ìpele BLS12-381's kí àwọn iṣẹ́ pàtàkì àti ìdánilójú má baà jẹ́ ohun tí a lè ṣe nínú ẹ̀rí àìmọ̀ |
| Orchard (lọ́wọ́lọ́wọ́) | Pallas àti Vesta (ìyípo "Pasta") | Pallas ní àwọn kọ́kọ́rọ́ àti ìlérí Orchard's; a ṣètò ìsopọ̀ Pallas/Vesta ní pàtàkì láti jẹ́ kí àwọn ẹ̀rí tó ti ní ìlọsíwájú ṣiṣẹ́ dáadáa |
The reasons one curve gets "embedded" inside another's field, and why a cycle of two curves is useful, are real and important, but they belong to the proof-system articles. For now the takeaway is solid: every Zcash key is a scalar times a generator, and every Zcash commitment is a sum of curve points, living on one of these named curves.

A lo fọọmu Weierstrass ti o kuru (y^2 = x^3 + ax + b); Zcash's curves are often written in other equivalent forms (Jubjub is a twisted Edwards curve) chosen for efficiency and safety, but the group idea is identical. We didn't define the exact point-addition formulas (they're the algebraic version of "third intersection, then reflect"), and we set aside subtleties like curve order, cofactors, and "pairings," which become important in the proof-system articles. None of this changes the intuition; it sharpens it.
y^2 = x^3 + ax + b, ati awọn aaye rẹ ni a le fi kun nipasẹ ofin geometric chord-and-tangent, pẹlu aaye pataki ni ailopin ti n ṣiṣẹ bi odo.y^2 = x^3 + 2x + 2 ó kọjá F_17 ó ní ìlà mọ́kàndínlógún, G = (5,1) gbogbo wọn ni.)kG ó rọrùn láti ṣírò ṣùgbọ́n kò ṣeé ṣe láti yí i padà: ECDLP. Èyí ni ẹnubodè.k, ọ̀rọ̀ àkọsílẹ̀ kG. Ìpinnu: Fọọmu Pedersen v.G + r.H, which hides, binds, and conveniently adds up.| Àkókò ìgba | Ìtumọ̀ Gẹ̀ẹ́sì lásán |
|---|---|
| Elliptic curve | Àwọn ojú ìwé tó tẹ́ni lọ́rùn y^2 = x^3 + ax + b, pẹ̀lú "afikun" pàtàkì ti awọn aaye |
| Point addition | Òfin chord-and-tangent: ìlà la àwọn ojú ìwé méjì kọjá, mú ìlù kẹta, ṣàfihàn |
Point at infinity (O) | “Òdo” ni ìtẹ̀ náà; fífi kún un kò yí ohunkóhun padà |
Generator (G) | Àkójọ ìpìlẹ̀ tí àwọn iye rẹ̀ tó pọ̀ tó sì bo gbogbo àwùjọ náà nígbẹ̀yìn gbẹ́yín |
Scalar multiplication (kG) | Fifikun G fún ara rẹ̀ k àkókò; ìrọ̀rùn síwájú, ó ṣòro láti yí padà |
| ECDLP | Iṣoro lile ti imularada k láti kGipilẹ aabo; |
| Pedersen commitment | v.G + r.H; àpò ìwé tí a fi èdìdì dì tí ó ń fi pamọ́, ó ń di, ó sì ń so pọ̀ mọ́ ara wọn |
** Kí ló dé tí a fi máa ń lo àwọn ìlà dípò àwọn iye ńláńlá tí a lè fi ṣe àkópọ̀?** Both can give a one-way street, but elliptic curves achieve the same security with far smaller keys and faster operations, and their point arithmetic is ideal for commitments.
Ṣé ECDLP ti fi hàn pé ó nira? kì í ṣe ohun tí kò ṣeé ṣe, ṣùgbọ́n ọ̀pọ̀lọpọ̀ ọdún ìsapá kìí rí àbájáde kankan tó gbéṣẹ́ lórí àwọn ìyí tí wọ́n yàn dáadáa.
Ṣé kọ̀ǹpútà kónítọ̀mù lè ṣe èyí? Kọǹpútà kónítọ́ọ̀mù tí ó tóbi tó lè fọ ECDLP. Èyí jẹ́ ìdààmú tí a mọ̀ fún àkókò gígùn ní gbogbo ilé-iṣẹ́ àti agbègbè ìwádìí tí ó wà ní ìgbésẹ̀; àwọn àyípo òde òní ṣì ní ààbò lòdì sí kọ̀ǹpùtátọ̀ ìgbàlódé.
** Kí ló dé tí Zcash fi ń lo ju àlàfo kan lọ?** Different jobs. One curve carries the zero-knowledge proof system; another (embedded in the first's field) makes the in-proof key and commitment operations efficient. The next articles explain why that pairing matters.
Nípa lílo tábìlì tí a ṣàyẹ̀wò ní Abala 3, kí ni 9G + 10G kí sì ni ìdáhùn náà sọ fún ọ nípa G? *ìdáhùn rẹ wà nísàlẹ̀ yìí.) *
9 + 10 = 19, a sì rí i pé 19G = O, ìyókù ní àìlópin. 9G + 10G = OÈyí túmọ̀ sí 10G jẹ́ ìyókù ìdìpọ̀ ti negative 9G: awọn aaye meji ti o ṣafikun si aaye "zero". lori iyipo kan, idaduro aaye kan jẹ aworan digi rẹ nikan ni ori ila-x, ati ni otitọ 9G = (7,6) àti 10G = (7,11) bákan náà x àti ní y-ìpín iye tó tó 17 = 0 (mod 17)Àkópọ̀ náà kò yàtọ̀ síra, èyí sì ni ohun tí "ọmọ ẹgbẹ́ kan" ń mú dáni lójú.
Article 3 . Hashing and commitments: we'll open up the "magic sealed envelope" properly. You've now seen one way to build a commitment from curve points; next we ask what hiding and binding really mean, meet hash functions, and connect both to the note commitments that anchor every Zcash payment.
8G |
| (13, 7) |
18G |
| (5, 16) |
9G | (7, 6) | 19G | O (ailopin) |
10G | (7, 11) |