Zcash 백서

Zcash

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 35쪽 중 16쪽

𝐸G1 over F𝑞G with equation𝑦 2 =𝑥 3 +𝑏 G. This curve has embedding degree 12 with respect to𝑟 G. Let G(𝑟)2 be the subgroup of order 𝑟G in the sextic twist 𝐸G2 of 𝐸G1 over F𝑞G2 with equation 𝑦2 =𝑥 3 + 𝑏G𝜉 , where𝜉 F𝑞G2. We represent elements of F𝑞G2 as polynomials 𝑎1·𝑡+𝑎 0 F𝑞G[𝑡], modulo the irreducible polynomial 𝑡2 + 1; in this representation,𝜉is given by𝑡+ 9. LetG (𝑟)𝑇 be the subgroup of𝑟 Gth roots of unity inF*𝑞G12, with multiplicative identity1 G. Let^𝑒G be the optimal ate pairing (see [Vercauter2009] and [AKLGL2010, section 2]) of typeG (𝑟)1 ×G (𝑟)2 →G (𝑟)𝑇 . For𝑖 {1..2}, let𝒪 G𝑖 be the point at infinity (which is the additive identity) inG (𝑟)𝑖 , and letG (𝑟)*𝑖 :=G (𝑟)𝑖 ∖{𝒪 G𝑖}. Let𝒫 G1 G(𝑟)*1 := (1,2). Let𝒫 G2 G(𝑟)*2 := (11559732032986387107991004021392285783925812861821192530917403151452391805634·𝑡+ 10857046999023057135944570762232829481370756359578518086990519993285655852781, 4082367875863433681332203403145435568316851327593401208105741076214120093531·𝑡+ 8495653923123431417604973247489272438418190587263600148770280649306958101930). 𝒫G1 and𝒫 G2 are generators ofG (𝑟)1 andG (𝑟)2 respectively. 102 DefineI2BEBSP (ℓ N)×{0..2 ℓ−1}→B [ℓ] as in §5.1 ‘Integers, Bit Sequences, and Endianness’ on p.76. For a point𝑃 G(𝑟)*1 = (𝑥𝑃 , 𝑦𝑃 ): •The field elements𝑥 𝑃 and𝑦 𝑃 F𝑞 are represented as integers𝑥and𝑦 {0.. 𝑞−1}. •Let˜𝑦=𝑦mod 2. •𝑃is encoded as 0 0 0 0 0 0 1 1-bit˜𝑦 256-bitI2BEBSP 256(𝑥) . For a point𝑃 G(𝑟)*2 = (𝑥𝑃 , 𝑦𝑃 ): •DefineFE2IP F𝑞G[𝑡]/(𝑡2 + 1)→{0.. 𝑞 G2−1}such thatFE2IP(𝑎 𝑤,1·𝑡+𝑎 𝑤,0) =𝑎 𝑤,1·𝑞+𝑎 𝑤,0. •Let𝑥=FE2IP(𝑥 𝑃 ),𝑦=FE2IP(𝑦 𝑃 ), and𝑦′ =FE2IP(−𝑦 𝑃 ). •Let˜𝑦= {︃ 1,if𝑦 > 𝑦′ 0,otherwise. •𝑃is encoded as 0 0 0 0 1 0 1 1-bit˜𝑦 512-bitI2BEBSP 512(𝑥) . Non-normative notes: • Only the 𝑟G-order subgroups G(𝑟)2,𝑇 are used in the protocol, not their containing groups G2,𝑇 . Points in G(𝑟)*2 are always checked to be of order 𝑟G when decoding from external representation. (The group of rational points G1 on 𝐸G1 /F𝑞G is of order 𝑟G so no subgroup checks are needed in that case, and elements of G(𝑟)𝑇 are never represented externally.) The(𝑟)superscripts on G(𝑟)1,2,𝑇 are used for consistency with notation elsewhere in this specification. •The points at infinity𝒪 G1,2 never occur in proofs and have no defined encodings in this protocol. • A rational point 𝑃̸=𝒪 G2 on the curve 𝐸G2 can be verified to be of order𝑟G, and therefore in G(𝑟)*2 , by checking that𝑟 G·𝑃=𝒪 G2. • The use ofbig-endianorder by I2BEBSP is different from the encoding of most other integers in this pro- tocol. The encodings for G(𝑟)*1,2 are consistent with the definition of EC2OSP for compressed curve points in [IEEE2004, section 5.5.6.2]. The LSB compressed form (i.e. EC2OSP-XL) is used for points in G(𝑟)*1 , and the SORT compressed form (i.e.EC2OSP-XS) for points inG (𝑟)*2 . • Testing 𝑦 > 𝑦′ for the compression of G(𝑟)*2 points is equivalent to testing whether (𝑎𝑦,1, 𝑎𝑦,0)>(𝑎 −𝑦,1, 𝑎−𝑦,0) in lexicographic order. • Algorithms for decompressing points from the above encodings are given in [IEEE2000, Appendix A.12.8] for G(𝑟)*1 , and [IEEE2004, Appendix A.12.11] forG (𝑟)*2 . When computing square roots in F𝑞G or F𝑞G2 in order to decompress a point encoding, the implementationMUST NOTassume that the square root exists, or that the encoding represents a point on the curve. 103 5.4.9.2BLS12-381 #blspairing Therepresented pairingBLS12-381is defined in this section. Parameters are taken from [Bowe2017]. Let 𝑞S := 4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787. Let𝑟 S := 52435875175126190479447740508185965837690552500527637822603658699938581184513. Let𝑢 S :=−15132376222941642752. Let𝑏 S := 4. (𝑞 S and𝑟 S are prime.) Let S(𝑟)1 be the subgroup of order 𝑟S of the group of rational points on a Barreto–Lynn–Scott ([BLS2002]) curve 𝐸S1 overF𝑞S with equation𝑦 2 =𝑥 3 +𝑏 S. This curve has embedding degree 12 with respect to𝑟 S. Let S(𝑟)2 be the subgroup of order 𝑟S in the sextic twist 𝐸S2 of 𝐸S1 over F𝑞S2 with equation 𝑦2 =𝑥 3 + 4(𝑖+ 1), where𝑖 F𝑞S2. We represent elements of F𝑞S2 as polynomials 𝑎1·𝑡+𝑎 0 F𝑞S[𝑡], modulo the irreducible polynomial 𝑡2 + 1; in this representation,𝑖is given by𝑡. LetS (𝑟)𝑇 be the subgroup of𝑟 Sth roots of unity inF*𝑞S12, with multiplicative identity1 S. Let^𝑒S be the optimal ate pairing of typeS (𝑟)1 ×S (𝑟)2 →S (𝑟)𝑇 . For𝑖 {1..2}, let𝒪 S𝑖 be the point at infinity inS (𝑟)𝑖 , and letS (𝑟)*𝑖 :=S (𝑟)𝑖 ∖{𝒪 S𝑖}. Let𝒫 S1 S(𝑟)*1 := (3685416753713387016781088315183077757961620795782546409894578378688607592378376318836054947676345821548104185464507, 1339506544944476473020471379941921221584933875938349620426543736416511423956333506472724655353366534992391756441569). Let𝒫 S2 S(𝑟)*2 := (3059144344244213709971259814753781636986470325476647558659373206291635324768958432433509563104347017837885763365758·𝑡+ 352701069587466618187139116011060144890029952792775240219908644239793785735715026873347600343865175952761926303160, 927553665492332455747201965776037880757740193453592970025027978793976877002675564980949289727957565575433344219582·𝑡+ 1985150602287291935568054521177171638300868978215655730859378665066344726373823718423869104263333984641494340347905). 𝒫S1 and𝒫 S2 are generators ofS (𝑟)1 andS (𝑟)2 respectively. DefineI2BEBSP (ℓ N)×{0..2 ℓ−1}→B [ℓ] as in §5.1 ‘Integers, Bit Sequences, and Endianness’ on p.76. For a point𝑃 S(𝑟)*1 = (𝑥𝑃 , 𝑦𝑃 ): •The field elements𝑥 𝑃 and𝑦 𝑃 F𝑞S are represented as integers𝑥and𝑦 {0.. 𝑞S−1}. •Let˜𝑦= {︃ 1,if𝑦 > 𝑞S−𝑦 0,otherwise. •𝑃is encoded as 1 0 1-bit˜𝑦 381-bitI2BEBSP 381(𝑥) . 104 For a point𝑃 S(𝑟)*2 = (𝑥𝑃 , 𝑦𝑃 ): •DefineFE2IPP F𝑞S[𝑡]/(𝑡2 + 1)→{0.. 𝑞 S−1}[2] such thatFE2IPP(𝑎 𝑤,1·𝑡+𝑎 𝑤,0) = [𝑎𝑤,1, 𝑎𝑤,0]. •Let𝑥=FE2IPP(𝑥 𝑃 ),𝑦=FE2IPP(𝑦 𝑃 ), and𝑦′ =FE2IPP(−𝑦 𝑃 ). •Let˜𝑦= {︃ 1,if𝑦 > 𝑦′ lexicographically 0,otherwise. •𝑃 is encoded as 1 0 1-bit˜𝑦 381-bitI2BEBSP 381(𝑥1) 384-bitI2BEBSP 384(𝑥2) . Non-normative notes: • Only the 𝑟S-order subgroups S(𝑟)1,2,𝑇 are used in the protocol, not their containing groups S1,2,𝑇 . Points in S(𝑟)*1,2 are always checked to be of order 𝑟S when decoding from external representation. (Elements of S(𝑟)𝑇 are never represented externally.) The (𝑟)superscripts on S(𝑟)1,2,𝑇 are used for consistency with notation elsewhere in this specification. •The points at infinity𝒪 S1,2 never occur in proofs and have no defined encodings in this protocol. •In contrast to the correspondingBN-254curve,𝐸 S1 overF𝑞S is not aprime-order curve. • A rational point 𝑃̸=𝒪 S𝑖 on the curve 𝐸S𝑖 for 𝑖∈{1,2} can be verified to be of order 𝑟S, and therefore in S(𝑟)*𝑖 , by checking that𝑟 S·𝑃=𝒪 S𝑖. • The use ofbig-endianorder by I2BEBSP is different from the encoding of most other integers in this protocol. •The encodings forS (𝑟)*1,2 are specific toZcash. • Algorithms for decompressing points from the encodings of S(𝑟)*1,2 are defined analogously to those for G(𝑟)*1,2 in §5.4.9.1 ‘BN-254’ on p. 102, taking into account that the SORT compressed form (not the LSB compressed form) is used forS (𝑟)*1 . When computing square roots in F𝑞S or F𝑞S2 in order to decompress a point encoding, the implementationMUST NOTassume that the square root exists, or that the encoding represents a point on the curve. 5.4.9.3Jubjub #jubjub “You boil it in sawdust: you salt it in glue: You condense it with locusts and tape: Still keeping one principal object in view— To preserve its symmetrical shape.” — Lewis Carroll, “The Hunting of the Snark” [Carroll1876] Saplinguses an elliptic curve,Jubjub, designed to be efficiently implementable inzk-SNARK circuits. Therepresented groupJof points on this curve is defined in this section. Acomplete twisted Edwards elliptic curve, as defined in [BL2017, section 4.3.4], is an elliptic curve 𝐸 over a non- binary field F𝑞, parameterized by distinct 𝑎, 𝑑 F𝑞∖{0} such that 𝑎 is square and 𝑑 is nonsquare, with equation 𝐸:𝑎·𝑢 2 +v 2 = 1 +𝑑·𝑢 2·v2. We use the abbreviation “ctEdwards” to refer tocomplete twisted Edwards elliptic curvesand coordinates. Let𝑞 J :=𝑟 S, as defined in §5.4.9.2 ‘BLS12-381’ on p.104. Let𝑟 J := 6554484396890773809930967563523245729705921265872317281365359162392183254199. (𝑞 J and𝑟 J are prime.) Letℎ J := 8. 105 Let𝑎 J :=−1. Let𝑑 J :=−10240/10241 (mod𝑞 J). Let J be the group of points (𝑢,v) on actEdwards curve 𝐸J over F𝑞J with equation 𝑎J·𝑢2 +v 2 = 1 +𝑑 J·𝑢2·v2. The zero point with coordinates(0,1)is denoted𝒪 J.Jhas orderℎ J·𝑟J. Letℓ J := 256. Define the notation ?√∙ as in §2 ‘Notation’ on p.11. Define I2LEBSP (ℓ N)×{0..2 ℓ−1}→B [ℓ] as in §5.1 ‘Integers, Bit Sequences, and Endianness’ on p. 76, and similarly forLEBS2IP (ℓ N)×B [ℓ]→{0..2 ℓ−1}. Definerepr J J→B [ℓJ] such thatrepr J(︀(𝑢,v) )︀ =I2LEBSP 256(︀(vmod𝑞 J) + 2255·˜𝑢)︀, where˜𝑢=𝑢mod 2. Defineabst J B[ℓJ]→J∪{⊥}such thatabst J(𝑃 ⋆)is computed as follows: letv⋆ B[255] be the first255bits of𝑃 ⋆and let˜𝑢 Bbe the last bit. ifLEBS2IP 255(v⋆)≥𝑞 J then return⊥, otherwise letv F𝑞J =LEBS2IP 255(v⋆) (mod𝑞 J). let𝑢= ? √︂ 1−v 2 𝑎J−𝑑 J·v 2 . (The denominator𝑎 J−𝑑 J·v2 cannot be zero, since 𝑎J𝑑J is not square inF 𝑞J.) if𝑢=⊥, return⊥. if𝑢mod 2 = ˜𝑢then return(𝑢,v)else return(𝑞 J−𝑢,v). Note:In earlier versions of this specification,abst J was defined as the left inverse ofrepr J such that if𝑆is not in the range ofrepr J, thenabst J(𝑆)=⊥. This differs from the specification above: •Previously,abst J (︁ I2LEBSP256 (︀ 2255 + 1)︀)︁andabst J(︁I2LEBSP256(︀2255 +𝑞 J−1 )︀)︁were defined as⊥. • In the current specification, abstJ (︁ I2LEBSP256 (︀ 2255 + 1)︀)︁ =abst J(︀I2LEBSP256(1))︀ = (0,1) =𝒪 J, and also abstJ (︁ I2LEBSP256 (︀ 2255 +𝑞 J−1 )︀)︁=abst J(︀I2LEBSP256(︀𝑞J−1 )︀ )︀= (0,−1). Define J(𝑟) as the order-𝑟J subgroup of J. Note that this includes𝒪J. For the set of points of order𝑟J (which excludes 𝒪J), we writeJ (𝑟)*. DefineJ ⋆ (𝑟) := {︀ reprJ(𝑃) B[ℓJ]|𝑃∈J (𝑟)}︀. Non-normative notes: • ThectEdwards compressed encodingused here is consistent with that used in EdDSA [BJLSY2015] for validating keysand the𝑅element of a signature. •[BJLSY2015, “Encoding and parsing curve points”] gives algorithms for decompressing points from the encod- ing ofJ. •[BJLSY2015, “Encoding and parsing integers”] describes several possibilities for parsing of integers; the speci- fication ofabst J above requires “strict” parsing. When computing square roots in F𝑞J in order to decompress a point encoding, the implementationMUST NOT assume that the square root exists, or that the encoding represents a point on the curve. Note that algorithms elsewhere in this specification that use Jubjub may impose other conditions on points, for example that they have order at least𝑟 J. 106 5.4.9.4 Coordinate Extractor forJubjub #concreteextractorjubjub Let 𝑢 (︀ (𝑢,v) )︀ =𝑢and let v (︀ (𝑢,v) )︀ =v. DefineExtract J(𝑟) J(𝑟)→B [ℓSaplingMerkle ] by ExtractJ(𝑟)(𝑃) :=I2LEBSP ℓSaplingMerkle (︀ 𝑢(𝑃) )︀ . Facts:The point(0,1) =𝒪 J, and the point(0,−1)has order2inJ.J (𝑟) is of odd-prime order. Lemma 5.4.7.Let𝑃= (𝑢,v)∈J (𝑟). Then(𝑢,−v)/∈J (𝑟). #lemmasubgroupnegation Proof. If 𝑃=𝒪 J then (𝑢,−v) = (0,−1)/∈J (𝑟). Else, 𝑃 is of odd-prime order. Note that v̸= 0 . (If v= 0 then 𝑎·𝑢 2 = 1, and so applying the doubling formula gives [2]𝑃= (0,−1) , then [4]𝑃= (0,1) =𝒪 J; contradiction since then 𝑃 would not be of odd-prime order.) Therefore, −v̸=v . Now suppose (𝑢,−v) =𝑄 is a point in J(𝑟). Then by applying the doubling formula we have[2]𝑄=−[2]𝑃. But also[2](−𝑃) =−[2]𝑃. Therefore either𝑄=−𝑃(then v(𝑄) = v(−𝑃) ; contradiction since−v̸=v ), or doubling is not injective on J(𝑟) (contradiction since J(𝑟) is of odd order [KvE2013]). Theorem 5.4.8. 𝑢 is injective onJ (𝑟). #thmselectuinjective Proof. By writing the curve equation as v2 = (1−𝑎·𝑢 2)/(1−𝑑·𝑢 2), and noting that the potentially exceptional case 1−𝑑·𝑢 2 = 0 does not occur for actEdwards curve, we see that for a given 𝑢 there can be at most two possible solutions for v, and that if there are two solutions they can be written as v and−v. In that case by the Lemma, at most one of(𝑢,v)and(𝑢,−v)is inJ (𝑟). Therefore, 𝑢 is injective on points inJ (𝑟). SinceI2LEBSP ℓSaplingMerkle is injective, it follows thatExtract J(𝑟) is injective onJ (𝑟). 5.4.9.5 Group Hash intoJubjub #concretegrouphashjubjub LetURSbe the MPC randomness beacon defined in §5.9 ‘Randomness Beacon’ on p.123. LetBLAKE2s-256be as defined in §5.4.1.2 ‘BLAKE2 Hash Functions’ on p.79. LetLEOS2IPbe as defined in §5.1 ‘Integers, Bit Sequences, and Endianness’ on p.76. LetJ (𝑟),J (𝑟)*, andabst J be as defined in §5.4.9.3 ‘Jubjub’ on p.105. LetGroupHash J(𝑟)*.Input:=B Y Y[8]×B Y Y[N], and letGroupHash J(𝑟)*.URSType:=B Y Y[64]. (The input element with type BY Y[8] is intended to act as a “personalization” parameter to distinguish uses of the group hashfor different purposes.) Let𝐷 BY Y[8] be an8-byte domain separator, and let𝑀 BY Y[N] be the hash input. The hashGroupHash J(𝑟)*URS (𝐷, 𝑀) J(𝑟)*∪{⊥}is calculated as follows: let𝐻 =BLAKE2s-256(𝐷,URS||𝑀) let𝑃=abst J (︀ LEOS2BSP256(𝐻) )︀ if𝑃=⊥then return⊥ let𝑄=[ℎ J]𝑃 if𝑄=𝒪 J then return⊥, else return𝑄. 107 Notes: • The use of GroupHashJ(𝑟)*URS for DiversifyHashSapling and to generate independent bases needs arandom oracle (for inputs on which GroupHashJ(𝑟)*URS does not return⊥); here we show that it is sufficient to employ a simpler random oracleinstantiated byBLAKE2s-256in the security analysis. 𝐻 BY Y[32]↦↛∈{⊥,𝒪 J,(0,−1)} abstJ(︀LEOS2BSP256(𝐻))︀ J is injective, and both it and its inverse are efficiently computable. 𝑃 J↦↛∈{𝒪 J} [ℎJ]𝑃 J(𝑟)* is exactlyℎ J-to-1, and both it and its inverse relation are efficiently computable. It follows that when (︀ 𝐷 BY Y[8], 𝑀 BY Y[N])︀↦→BLAKE2s-256(𝐷,URS||𝑀) BY Y[32] is modelled as arandom oracle, (︀ 𝐷 BY Y[8], 𝑀 BY Y[N])︀↦↛∈{⊥} GroupHashJ(𝑟)*URS (︀𝐷, 𝑀)︀ J(𝑟)* also acts as arandom oracle. •TheBLAKE2s-256chaining variable after processingURSmay be precomputed. Define first (BY Y→𝑇∪{⊥})→𝑇∪{⊥} so that first(𝑓) =𝑓(𝑖) where 𝑖 is the least integer in BY Y such that 𝑓(𝑖)̸=⊥ , or⊥if no such𝑖exists. DefineFindGroupHash J(𝑟)*(︀𝐷, 𝑀)︀ :=first(𝑖 BY Y↦→GroupHash J(𝑟)*URS (𝐷, 𝑀||[𝑖]) J(𝑟)*∪{⊥}). Note:For random input, FindGroupHashJ(𝑟)* returns⊥ with probability approximately2−256. In theZcashprotocol, most uses of FindGroupHashJ(𝑟)* are for constants and do not return⊥; the only use that could potentially return⊥ is in the computation of adefault diversified payment addressin §4.2.2 ‘Sapling Key Components’ on p.38. 5.4.9.6PallasandVesta #pallasandvesta Orcharduses two elliptic curves, Pallas and Vesta, that form a cycle: the base field of each is the scalar field of the other. In Orchard, we use Vesta for the proof system (playing a similar rôle to BLS12-381 in Sapling), and Pallas for the application circuit (similar to Jubjub in Sapling). Both curves are designed to be efficiently implementable in zk-SNARK circuits, although we only usePallasin that way for Orchard. Therepresented groupsPandVof points onPallasandVestarespectively are defined in this section. Ashort Weierstrass elliptic curveover a field F𝑞 of characteristic greater than 3, as defined for example in [Hıs ¸ıl2010, Definition 2.3.1], is an elliptic curve 𝐸 over F𝑞, parameterized by 𝑎, 𝑏 F𝑞 such that 4·𝑎 3 + 27·𝑏 2̸= 0, with equation 𝐸:𝑦 2 =𝑥 3 +𝑎·𝑥+𝑏 . The curve has a distinguished zero point𝒪, also called the “point at infinity”. For PallasandVestawe have𝑎= 0and so we will omit that term below. Let𝑞 P := 0x40000000000000000000000000000000224698fc094cf91b992d30ed00000001. Let𝑞 V := 0x40000000000000000000000000000000224698fc0994a8dd8c46eb2100000001. (𝑞 P and𝑞 V are prime.) Let𝑟 P :=𝑞 V and𝑟 V :=𝑞 P. Let𝑏 P =𝑏 V := 5. Let P be the group of points (𝑥, 𝑦)with zero point𝒪P, on ashort Weierstrass curve 𝐸P over F𝑞P with equation 𝑦2 =𝑥 3 +𝑏 P.Phas order𝑟 P. Let V be the group of points (𝑥, 𝑦)with zero point𝒪V, on ashort Weierstrass curve 𝐸V over F𝑞V with equation 𝑦2 =𝑥 3 +𝑏 V.Vhas order𝑟 V. For the set of points onPallasof order𝑟 P (which excludes𝒪 P), we writeP*. For the set of points onVestaof order𝑟 V (which excludes𝒪 V), we writeV*. Letℓ P =ℓ V := 256. Define the notation ?√∙ as in §2 ‘Notation’ on p.11. 108 Define I2LEBSP (ℓ N)×{0..2 ℓ−1}→B [ℓ] as in §5.1 ‘Integers, Bit Sequences, and Endianness’ on p. 76, and similarly forLEBS2IP (ℓ N)×B [ℓ]→{0..2 ℓ−1}. LetGbe eitherPorV. Definerepr G G→B [ℓG] such that reprG (︀ 𝒪G )︀ =I2LEBSP 256(0) reprG (︀ (𝑥, 𝑦) )︀ =I2LEBSP 256 (︀ (𝑥mod𝑞 G) + 2255·˜𝑦)︀, where˜𝑦=𝑦mod 2. Defineabst G B[ℓG]→G∪{⊥}such thatabst G(𝑃 ⋆)is computed as follows: let𝑥⋆ B[255] be the first255bits of𝑃 ⋆and let˜𝑦 Bbe the last bit. ifLEBS2IP 255(𝑥⋆)≥𝑞 G then return⊥, otherwise let𝑥 F𝑞G =LEBS2IP 255(𝑥⋆) (mod𝑞 G). let𝑦= ? √︁ 𝑥3 +𝑏 G . if𝑥= 0and˜𝑦= 0, return𝒪 G. if𝑦=⊥, return⊥. if𝑦mod 2 = ˜𝑦then return(𝑥, 𝑦)else return(𝑥, 𝑞 G−𝑦). Notes: • There is no solution to 0 =𝑥 3 + 5in either F𝑞P or F𝑞V, and so 𝑦 cannot be zero. Therefore there is only one valid representation of each point onPallas and of each point onVesta; in particularabstP(nc)=⊥ and abstV(nc)=⊥ fornc=I2LEBSP 256 (︀ 2255)︀. This differs from the corresponding case ofabst J(nc)forJubjub, for example. • When computing square roots in F𝑞P or F𝑞V in order to decompress a point encoding, the implementation MUST NOTassume that the square root exists, or that the encoding represents a point on the curve. 5.4.9.7 Coordinate Extractor forPallas #concreteextractorpallas LetP,𝒪 P,𝑞 P, and𝑏 P be as defined in §5.4.9.6 ‘Pallas and Vesta’ on p.108. Define 𝑥 P→F 𝑞P and 𝑦 P→F 𝑞P such that: 𝑥 (︀ 𝒪P )︀ = 0 𝑥 (︀ (𝑥, 𝑦) )︀ =𝑥 𝑦 (︀ 𝒪P )︀ = 0 𝑦 (︀ (𝑥, 𝑦) )︀ =𝑦. DefineExtract P P→{0.. 𝑞 P−1}such that ExtractP(𝑃) = 𝑥(𝑃) mod𝑞 P. We also defineExtract⊥P P∪{⊥}→{0.. 𝑞 P−1}∪{⊥}such that Extract⊥P(︀⊥)︀ =⊥ Extract⊥P(︀𝑃 P)︀ =Extract P(𝑃). Note:There is no solution to𝑦 2 = 03 + 5inF 𝑞P, and soExtract P(𝑃)can only be0when𝑃=𝒪 P. 109 5.4.9.8 Group Hash intoPallasandVesta #concretegrouphashpallasandvesta Orcharduses the “simplified SWU” algorithm forrandom-oraclehashing to elliptic curves with 𝑗-invariant 0, consistent with [ID-hashtocurve, section 6.6.3], based on a method by Riad Wahby and Dan Boneh[WB2019]. It is adapted from work of Eric Brier, Jean-Sébastien Coron, Thomas Icart, David Madore, Hugues Randriam, and Mehdi Tibouchi in [BCIMRT2010]; Andrew Shallue and Christiaan van de Woestijne in[SvdW2006]; and Maciej Ulas in [Ulas2007]. Let P and V be the represented groups of points on thePallas curveand theVesta curverespectively, as defined in §5.4.9.6 ‘Pallas and Vesta’ on p.108. LetGbe eitherPorVaccording to the desired target curve. Also define𝒪G, G*, 𝑞G, and abstG by replacing G with P or V, using definitions from §5.4.9.6 ‘Pallas and Vesta’ on p.108. LetcurveName G be“ pallas”whenG=P, or“ vesta”whenG=V. The algorithm makes use of a curve 𝐸iso-P, called iso-Pallas, that is isogenous 11 to 𝐸P; or 𝐸iso-V, called iso-Vesta, that is isogenous to𝐸 V. Let𝑎 iso-P := 0x18354a2eb0ea8c9c49be2d7258370742b74134581a27a59f92bb4b0b657a014b. Let𝑎 iso-V := 0x267f9b2ee592271a81639c4d96f787739673928c7d01b212c515ad7242eaa6b1. Let𝑏 iso-P =𝑏 iso-V := 1265. Let iso-P be the group of points(𝑥, 𝑦)with zero point𝒪iso-P, on ashort Weierstrass curve 𝐸iso-P over F𝑞P with equation 𝑦2 =𝑥 3 +𝑎 iso-P·𝑥+𝑏 iso-P. Since𝐸 iso-P is isogenous to𝐸 P, it has the same order𝑟 iso-P =𝑟 P =𝑞 V. Let iso-Vbe the group of points(𝑥, 𝑦)with zero point𝒪iso-V, on ashort Weierstrass curve 𝐸iso-Vover F𝑞V with equation 𝑦2 =𝑥 3 +𝑎 iso-V·𝑥+𝑏 iso-V. Since𝐸 iso-V is isogenous to𝐸 V, it has the same order𝑟 iso-V =𝑟 V =𝑞 P. Let𝒞 P F𝑞P[13] := [ 0x0e38e38e38e38e38e38e38e38e38e38e4081775473d8375b775f6034aaaaaaab, 0x3509afd51872d88e267c7ffa51cf412a0f93b82ee4b994958cf863b02814fb76, 0x17329b9ec525375398c7d7ac3d98fd13380af066cfeb6d690eb64faef37ea4f7, 0x1c71c71c71c71c71c71c71c71c71c71c8102eea8e7b06eb6eebec06955555580, 0x1d572e7ddc099cff5a607fcce0494a799c434ac1c96b6980c47f2ab668bcd71f, 0x325669becaecd5d11d13bf2a7f22b105b4abf9fb9a1fc81c2aa3af1eae5b6604, 0x1a12f684bda12f684bda12f684bda12f7642b01ad461bad25ad985b5e38e38e4, 0x1a84d7ea8c396c47133e3ffd28e7a09507c9dc17725cca4ac67c31d8140a7dbb, 0x3fb98ff0d2ddcadd303216cce1db9ff11765e924f745937802e2be87d225b234, 0x025ed097b425ed
프로젝트로 돌아가기