Clever Geek Handbook
📜 ⬆️ ⬇️

XTR (algorithm)

XTR (short for ECSTR - “Efficient and Compact Subgroup Trace Representation”) is a public key encryption algorithm based on the computational complexity of the discrete logarithm problem . The advantages of this algorithm over others using this idea are its higher speed and smaller key size.

This algorithm uses a generatorg {\ displaystyle g} g relatively small subgroup of orderq {\ displaystyle q} q (q {\ displaystyle q} q - simple) subgroupsGF(p6)∗ {\ displaystyle GF (p ^ {6}) ^ {*}} {\ displaystyle GF (p ^ {6}) ^ {*}} . With the right choiceq {\ displaystyle q} q , discrete logarithm in the group generated byg {\ displaystyle g} g has the same computational complexity as inGF(p6)∗ {\ displaystyle GF (p ^ {6}) ^ {*}} {\ displaystyle GF (p ^ {6}) ^ {*}} . XTR uses arithmeticGF(p2) {\ displaystyle GF (p ^ {2})} {\ displaystyle GF (p ^ {2})} insteadGF(p6) {\ displaystyle GF (p ^ {6})} {\ displaystyle GF (p ^ {6})} , providing the same security, but at a lower cost for computing and data transfer.

Content

  • 1 Theoretical basis of XTR
    • 1.1 Arithmetic operations inGF(p2) {\ displaystyle GF (p ^ {2})} {\ displaystyle GF (p ^ {2})}
    • 1.2 Using traces inGF(p2) {\ displaystyle GF (p ^ {2})} {\ displaystyle GF (p ^ {2})}
    • 1.3 Fast Computation AlgorithmTr(gn) {\ displaystyle Tr (g ^ {n})} {\ displaystyle Tr (g ^ {n})} byTr(g) {\ displaystyle Tr (g)} {\ displaystyle Tr (g)} [2]
    • 1.4 Algorithm for computingSn(c) {\ displaystyle S_ {n} (c)} {\ displaystyle S_ {n} (c)} givenn {\ displaystyle n} n andc {\ displaystyle c} c
  • 2 Select options
    • 2.1 Choosing a field and subgroup size
    • 2.2 Subgroup selection
  • 3 Examples
    • 3.1 Diffie-Hellman Protocol
    • 3.2 El Gamal scheme
  • 4 notes

XTR Theoretical Framework

The algorithm works in the final fieldGF(p6) {\ displaystyle GF (p ^ {6})} {\displaystyle GF(p^{6})} . Consider the order groupp2-p+one {\ displaystyle p ^ {2} -p + 1} {\displaystyle p^{2}-p+1} , and its subgroup of order q , where p is a prime, such that another sufficiently large prime q is a divisorp2-p+one {\ displaystyle p ^ {2} -p + 1} {\displaystyle p^{2}-p+1} . A group of order q is called an XTR-subgroup. This cyclic group⟨g⟩ {\ displaystyle \ langle g \ rangle} {\displaystyle \langle g\rangle } is a subgroupGF(p6)∗ {\ displaystyle GF (p ^ {6}) ^ {*}} {\displaystyle GF(p^{6})^{*}} and has a generator g .

Arithmetic operations inGF(p2) {\ displaystyle GF (p ^ {2})} {\displaystyle GF(p^{2})}

Let p be a prime such that p ≡ 2 mod 3 and p 2 - p + 1 be divided by a sufficiently large prime q . Since p 2 ≡ 1 mod 3 , p generates(Z/3Z)∗ {\ displaystyle (\ mathbb {Z} / 3 \ mathbb {Z}) ^ {*}} {\displaystyle (\mathbb {Z} /3\mathbb {Z} )^{*}} . So the circular polynomialΦ3(x)=x2+x+one {\ displaystyle \ Phi _ {3} (x) = x ^ {2} + x + 1} {\displaystyle \Phi _{3}(x)=x^{2}+x+1} is irreducible inGF(p) {\ displaystyle GF (p)} GF(p) . Hence the rootsα {\ displaystyle \ alpha} \alpha andαp {\ displaystyle \ alpha ^ {p}} {\displaystyle \alpha ^{p}} form the optimal normal basisGF(p2) {\ displaystyle GF (p ^ {2})} {\displaystyle GF(p^{2})} overGF(p) {\ displaystyle GF (p)} GF(p) and

GF(p2)≅{xoneα+x2αp:xone,x2∈GF(p)}.{\ displaystyle GF (p ^ {2}) \ cong \ {x_ {1} \ alpha + x_ {2} \ alpha ^ {p}: x_ {1}, x_ {2} \ in GF (p) \} .} {\displaystyle GF(p^{2})\cong \{x_{1}\alpha +x_{2}\alpha ^{p}:x_{1},x_{2}\in GF(p)\}.}

Given p ≡ 2 mod 3 :

GF(p2)≅{yoneα+y2α2:α2+α+one=0,yone,y2∈GF(p)}.{\ displaystyle GF (p ^ {2}) \ cong \ {y_ {1} \ alpha + y_ {2} \ alpha ^ {2}: \ alpha ^ {2} + \ alpha + 1 = 0, y_ {1 }, y_ {2} \ in GF (p) \}.} {\displaystyle GF(p^{2})\cong \{y_{1}\alpha +y_{2}\alpha ^{2}:\alpha ^{2}+\alpha +1=0,y_{1},y_{2}\in GF(p)\}.}

Thus, the cost of arithmetic operations is as follows:

  • Calculation of x p does not require multiplication
  • Computing x 2 requires two multiplication operations inGF(p) {\ displaystyle GF (p)} GF(p)
  • Computing xy requires three multiplication operations inGF(p) {\ displaystyle GF (p)} GF(p)
  • Xz-yz calculation p requires four multiplication operations inGF(p) {\ displaystyle GF (p)} GF(p) .: [1]

Using traces inGF(p2) {\ displaystyle GF (p ^ {2})}  

Elements associated withh∈GF(p6) {\ displaystyle h \ in GF (p ^ {6})}   atGF(p2) {\ displaystyle GF (p ^ {2})}   are: myselfh,hp2 {\ displaystyle h, h ^ {p ^ {2}}}   andhpfour {\ displaystyle h ^ {p ^ {4}}}   , and their sum is a traceh {\ displaystyle h}   .

Tr(h)=h+hp2+hpfour.{\ displaystyle Tr (h) = h + h ^ {p ^ {2}} + h ^ {p ^ {4}}.}  

Besides:

Tr(h)p2=hp2+hpfour+hp6=h+hp2+hpfour=Tr(h){\ displaystyle {\ begin {aligned} Tr (h) ^ {p ^ {2}} & = h ^ {p ^ {2}} + h ^ {p ^ {4}} + h ^ {p ^ {6 }} \\ & = h + h ^ {p ^ {2}} + h ^ {p ^ {4}} \\ & = Tr (h) \ end {aligned}}}  

Consider a generatorg {\ displaystyle g}   XTR order groupsq {\ displaystyle q}   whereq {\ displaystyle q}   - Prime number. As⟨g⟩ {\ displaystyle \ langle g \ rangle}   - subgroup of the order groupp2-p+one {\ displaystyle p ^ {2} -p + 1}   thenq∣p2-p+one {\ displaystyle q \ mid p ^ {2} -p + 1}   . Besides,

p2=p-one{\ displaystyle p ^ {2} = p-1}  

and

pfour=(p-one)2=p2-2p+one=-p{\ displaystyle p ^ {4} = (p-1) ^ {2} = p ^ {2} -2p + 1 = -p}   .

In this way,

Tr(g)=g+gp2+gpfour=g+gp-one+g-p.{\ displaystyle {\ begin {aligned} Tr (g) & = g + g ^ {p ^ {2}} + g ^ {p ^ {4}} \\ & = g + g ^ {p-1} + g ^ {- p}. \ end {aligned}}}  

We also note that conjugate to the elementg {\ displaystyle g}   is anone {\ displaystyle 1}   , i.e,g {\ displaystyle g}   has a norm of 1. A key feature of XTR is that the minimum polynomialg {\ displaystyle g}   atGF(p2) {\ displaystyle GF (p ^ {2})}  

(x-g)(x-gp-one)(x-g-p){\ displaystyle (xg) \! \ (xg ^ {p-1}) (xg ^ {- p})}  

simplified to

x3-Tr(g)x2+Tr(g)px-one{\ displaystyle x ^ {3} -Tr (g) \! \ x ^ {2} + Tr (g) ^ {p} x-1}  

In other words, conjugate tog {\ displaystyle g}   elements like the roots of a minimal polynomial inGF(p2) {\ displaystyle GF (p ^ {2})}   are completely determined by the traceg {\ displaystyle g}   . Similar reasoning is true for any degreeg {\ displaystyle g}   :

x3-Tr(gn)x2+Tr(gn)px-one{\ displaystyle x ^ {3} -Tr (g ^ {n}) \! \ x ^ {2} + Tr (g ^ {n}) ^ {p} x-1}  

- this polynomial is determined by the traceTr(gn) {\ displaystyle Tr (g ^ {n})}   .

The idea of ​​the algorithm is to replacegn∈GF(p6) {\ displaystyle g ^ {n} \ in GF (p ^ {6})}   onTr(gn)∈GF(p2) {\ displaystyle Tr (g ^ {n}) \ in GF (p ^ {2})}   that is, calculateTr(gn) {\ displaystyle Tr (g ^ {n})}   byTr(g) {\ displaystyle Tr (g)}   insteadgn {\ displaystyle g ^ {n}}   byg {\ displaystyle g}   However, for the method to be effective, a way is neededTr(gn) {\ displaystyle Tr (g ^ {n})}   according to availableTr(g) {\ displaystyle Tr (g)}   .

Fast calculation algorithmTr(gn) {\ displaystyle Tr (g ^ {n})}   byTr(g) {\ displaystyle Tr (g)}   [2]

Definition: For eachc {\ displaystyle c}  GF(p2) {\ displaystyle GF (p ^ {2})}   define:

F(c,X)=X3-cX2+cpX-one∈GF(p2)[X].{\ displaystyle F (c, X) = X ^ {3} -cX ^ {2} + c ^ {p} X-1 \ in GF (p ^ {2}) [X].}  

Definition: Leth0,hone,h2 {\ displaystyle h_ {0}, \! \ h_ {1}, h_ {2}}   - rootsF(c,X) {\ displaystyle F (c, X)}   atGF(p6) {\ displaystyle GF (p ^ {6})}   , butn∈Z {\ displaystyle n \ in \ mathbb {Z}}   . Denote:

cn=h0n+honen+h2n.{\ displaystyle c_ {n} = h_ {0} ^ {n} + h_ {1} ^ {n} + h_ {2} ^ {n}.}  

The propertiescn {\ displaystyle c_ {n}}   andF(c,X) {\ displaystyle F (c, X)}   :

  1. c=cone{\ displaystyle c = c_ {1}}  
  2. c-n=cnp=cnp{\ displaystyle c _ {- n} = c_ {np} = c_ {n} ^ {p}}  
  3. cn∈GF(p2){\ displaystyle c_ {n} \ in GF (p ^ {2})}   forn∈Z {\ displaystyle n \ in \ mathbb {Z}}  
  4. cu+v=cucv-cvpcu-v+cu-2v{\ displaystyle c_ {u + v} = c_ {u} c_ {v} -c_ {v} ^ {p} c_ {uv} + c_ {u-2v}}   foru,v∈Z {\ displaystyle u, v \ in \ mathbb {Z}}  
  5. Or allhj {\ displaystyle h_ {j}}   have a divisor orderp2-p+one {\ displaystyle p ^ {2} -p + 1}   and>3 {\ displaystyle> 3}   or allhj {\ displaystyle h_ {j}}   - in fieldGF(p2) {\ displaystyle GF (p ^ {2})}   . In particular,F(c,X) {\ displaystyle F (c, X)}   - irreducible if and only if its roots have an order that is a divisorp2-p+one {\ displaystyle p ^ {2} -p + 1}   and>3 {\ displaystyle> 3}   .
  6. F(c,X){\ displaystyle F (c, X)}   we give in the fieldGF(p2) {\ displaystyle GF (p ^ {2})}   if and only ifcp+one∈GF(p) {\ displaystyle c_ {p + 1} \ in GF (p)}  

Statement: May they be givenc,cn-one,cn,cn+one {\ displaystyle c, \! \ c_ {n-1}, c_ {n}, c_ {n + 1}}   .

  1. Calculationc2n=cn2-2cnp {\ displaystyle c_ {2n} = c_ {n} ^ {2} -2c_ {n} ^ {p}}   requires two product operations in the fieldGF(p) {\ displaystyle GF (p)}   .
  2. Calculationcn+2=cn+one⋅c-cp⋅cn+cn-one {\ displaystyle c_ {n + 2} = c_ {n + 1} \ cdot cc ^ {p} \ cdot c_ {n} + c_ {n-1}}   requires four product operations in the fieldGF(p) {\ displaystyle GF (p)}   .
  3. Calculationc2n-one=cn-one⋅cn-cp⋅cnp+cn+onep {\ displaystyle c_ {2n-1} = c_ {n-1} \ cdot c_ {n} -c ^ {p} \ cdot c_ {n} ^ {p} + c_ {n + 1} ^ {p}}   requires four product operations in the fieldGF(p) {\ displaystyle GF (p)}   .
  4. Calculationc2n+one=cn+one⋅cn-c⋅cnp+cn-onep {\ displaystyle c_ {2n + 1} = c_ {n + 1} \ cdot c_ {n} -c \ cdot c_ {n} ^ {p} + c_ {n-1} ^ {p}}   requires four product operations in the fieldGF(p) {\ displaystyle GF (p)}   .

Definition: LetSn(c)=(cn-one,cn,cn+one)∈GF(p2)3 {\ displaystyle S_ {n} (c) = (c_ {n-1}, c_ {n}, c_ {n + 1}) \ in GF (p ^ {2}) ^ {3}}   .

Algorithm for calculatingSn(c) {\ displaystyle S_ {n} (c)}   givenn {\ displaystyle n}   andc {\ displaystyle c}  

  • Atn<0 {\ displaystyle n <0}   the algorithm is applied to-n {\ displaystyle -n}   andc {\ displaystyle c}   , then property 2 is used to obtain the final result
  • Atn=0 {\ displaystyle n = 0}   ,S0(c)=(cp,3,c) {\ displaystyle S_ {0} (c) \! \ = (c ^ {p}, 3, c)}   .
  • Atn=one {\ displaystyle n = 1}   ,Sone(c)=(3,c,c2-2cp) {\ displaystyle S_ {1} (c) \! \ = (3, c, c ^ {2} -2c ^ {p})}   .
  • Atn=2 {\ displaystyle n = 2}   , we will use expressions forcn+2=cn+one⋅c-cp⋅cn+cn-one {\ displaystyle c_ {n + 2} = c_ {n + 1} \ cdot cc ^ {p} \ cdot c_ {n} + c_ {n-1}}   andSone(c) {\ displaystyle S_ {1} (c)}   to findc3 {\ displaystyle c_ {3}}   and correspondingly,S2(c) {\ displaystyle S_ {2} (c)}   .
  • Atn>2 {\ displaystyle n> 2}   to calculateSn(c) {\ displaystyle S_ {n} (c)}   introduce
S¯i(c)=S2i+one(c){\ displaystyle {\ bar {S}} _ {i} (c) = S_ {2i + 1} (c)}  
andm¯=n {\ displaystyle {\ bar {m}} = n}   if notn {\ displaystyle n}   odd andm¯=n-one {\ displaystyle {\ bar {m}} = n-1}   if even. Putm¯=2m+one,k=one {\ displaystyle {\ bar {m}} = 2m + 1, k = 1}   and findS¯k(c)=S3(c) {\ displaystyle {\ bar {S}} _ {k} (c) = S_ {3} (c)}   using the Statement, andS2(c) {\ displaystyle S_ {2} (c)}   . Let, further,
m=∑j=0rmj2j{\ displaystyle m = \ sum _ {j = 0} ^ {r} m_ {j} 2 ^ {j}}  
Wheremj∈0,one {\ displaystyle m_ {j} \ in {0,1}}   andmr=one {\ displaystyle m_ {r} = 1}   . Forj=r-one,r-2,...,0 {\ displaystyle j = r-1, r-2, ..., 0}   sequentially perform the following:
  • Atmj=0 {\ displaystyle m_ {j} = 0}   useS¯k(c) {\ displaystyle {\ bar {S}} _ {k} (c)}   to findS¯2k(c) {\ displaystyle {\ bar {S}} _ {2k} (c)}   .
  • Atmj=one {\ displaystyle m_ {j} = 1}   useS¯k(c) {\ displaystyle {\ bar {S}} _ {k} (c)}   to findS¯2k+one(c) {\ displaystyle {\ bar {S}} _ {2k + 1} (c)}   .
  • Replacek {\ displaystyle k}   on2k+mj {\ displaystyle 2k + m_ {j}}   .

Upon completion of the iterations,k=m {\ displaystyle k = m}   , butSm¯(c)=S¯m(c) {\ displaystyle S _ {\ bar {m}} (c) = {\ bar {S}} _ {m} (c)}   . If n is even, we useSm¯(c) {\ displaystyle S _ {\ bar {m}} (c)}   to findS¯m+one(c) {\ displaystyle {\ bar {S}} _ {m + 1} (c)}   .

Select options

Select a field and subgroup size

To take advantage of the presentation of the elements of groups in the form of their traces and to ensure sufficient data security, you need to find simplep {\ displaystyle p}   andq {\ displaystyle q}   wherep {\ displaystyle p}   - field characteristicGF(p6) {\ displaystyle GF (p ^ {6})}   , andp≡2mod3 {\ displaystyle p \ equiv 2 \ {\ text {mod}} \ 3}   , butq {\ displaystyle q}   - subgroup size and divisorp2-p+one {\ displaystyle p ^ {2} -p + 1}   . Denote byP {\ displaystyle P}   andQ {\ displaystyle Q}   sizesp {\ displaystyle p}   andq {\ displaystyle q}   in bits. To achieve the security level that, for example, provides RSA with a key length of 1024 bits, you must selectP {\ displaystyle P}   such that6P>1024 {\ displaystyle 6P> 1024}   , i.eP≈170 {\ displaystyle P \ approx 170}   butQ {\ displaystyle Q}   maybe around 160. The first algorithm to calculate such simplep {\ displaystyle p}   andq {\ displaystyle q}   - Algorithm A.

Algorithm A

  1. Will findr∈Z {\ displaystyle r \ in \ mathbb {Z}}   such that the numberq=r2-r+one {\ displaystyle q = r ^ {2} -r + 1}   Is a prime number in lengthQ {\ displaystyle Q}   bit.
  2. Will findk∈Z {\ displaystyle k \ in \ mathbb {Z}}   such that the numberp=r+k⋅q {\ displaystyle p = r + k \ cdot q}   - simple lengthP {\ displaystyle P}   bit as wellp≡2mod3 {\ displaystyle p \ equiv 2 \ {\ text {mod}} \ 3}   .
Correctness of Algorithm A:
It is only necessary to verify thatq∣p2-p+one {\ displaystyle q \ mid p ^ {2} -p + 1}   , since all the remaining properties are obviously satisfied due to the specifics of the choicep {\ displaystyle p}   andq {\ displaystyle q}   .
It is easy to see thatp2-p+one=r2+2rkq+k2q2-r-kq+one=r2-r+one+q(2rk+k2q-k)=q(one+2rk+k2q-k) {\ displaystyle p ^ {2} -p + 1 = r ^ {2} + 2rkq + k ^ {2} q ^ {2} -r-kq + 1 = r ^ {2} -r + 1 + q ( 2rk + k ^ {2} qk) = q (1 + 2rk + k ^ {2} qk)}   meansq∣p2-p+one {\ displaystyle q \ mid p ^ {2} -p + 1}   .

Algorithm A is very fast, but it can be unsafe, as it is vulnerable to attack using a sieve of a number field .

The slower Algorithm B. has been saved from this drawback.

Algorithm B

  1. Choose a primeq {\ displaystyle q}   in lengthQ {\ displaystyle Q}   bit such thatq≡7mod12 {\ displaystyle q \ equiv 7 \ {\ text {mod}} \ 12}   .
  2. Find the rootsrone {\ displaystyle r_ {1}}   andr2 {\ displaystyle r_ {2}}  X2-X+onemodq {\ displaystyle X ^ {2} -X + 1 \ {\ text {mod}} \ q}   .
  3. Will findk∈Z {\ displaystyle k \ in \ mathbb {Z}}   such thatp=ri+k⋅q {\ displaystyle p = r_ {i} + k \ cdot q}   ,p {\ displaystyle p}   - simpleP {\ displaystyle P}   bit number and at the same timep≡2mod3 {\ displaystyle p \ equiv 2 \ {\ text {mod}} \ 3}   fori∈{one,2} {\ displaystyle i \ in \ {1,2 \}}  
Correctness of Algorithm B:
As soon as we chooseq≡7mod12 {\ displaystyle q \ equiv 7 \ {\ text {mod}} \ 12}   , the condition is automatically satisfiedq≡onemod3 {\ displaystyle q \ equiv 1 \ {\ text {mod}} \ 3}   (As7≡onemod3 {\ displaystyle 7 \ equiv 1 \ {\ text {mod}} \ 3}   and3∣12 {\ displaystyle 3 \ mid 12}   ) From this statement and the quadratic law of reciprocity it follows that the rootsrone {\ displaystyle r_ {1}}   andr2 {\ displaystyle r_ {2}}   exists.
To verify thatq∣p2-p+one {\ displaystyle q \ mid p ^ {2} -p + 1}   consider againp2-p+one {\ displaystyle p ^ {2} -p + 1}   forri∈{one,2} {\ displaystyle r_ {i} \ in \ {1,2 \}}   and note thatp2-p+one=ri2+2rikq+k2q2-ri-kq+one=ri2-ri+one+q(2rk+k2q-k)=q(2rk+k2q-k) {\ displaystyle p ^ {2} -p + 1 = r_ {i} ^ {2} + 2r_ {i} kq + k ^ {2} q ^ {2} -r_ {i} -kq + 1 = r_ { i} ^ {2} -r_ {i} + 1 + q (2rk + k ^ {2} qk) = q (2rk + k ^ {2} qk)}   . Meansrone {\ displaystyle r_ {1}}   andr2 {\ displaystyle r_ {2}}   rootsX2-X+one {\ displaystyle X ^ {2} -X + 1}   and thereforeq∣p2-p+one {\ displaystyle q \ mid p ^ {2} -p + 1}   .

Subgroup Selection

In the previous section we found the sizesp {\ displaystyle p}   andq {\ displaystyle q}   final fieldGF(p6) {\ displaystyle GF (p ^ {6})}   and multiplicative subgroup inGF(p6)∗ {\ displaystyle GF (p ^ {6}) ^ {*}}   . Now you should find a subgroup⟨g⟩ {\ displaystyle \ langle g \ rangle}   atGF(p6)∗ {\ displaystyle GF \! \ (p ^ {6}) ^ {*}}   for someg∈GF(p6) {\ displaystyle g \ in GF (p ^ {6})}   such that∣⟨g⟩∣ =q {\ displaystyle \ mid \! \!! langle g \ rangle \! \!! \ mid = q}   . However, it is not necessary to look for an explicit element.g∈GF(p6) {\ displaystyle g \ in GF (p ^ {6})}   , just find the elementc∈GF(p2) {\ displaystyle c \ in GF (p ^ {2})}   such thatc=Tr(g) {\ displaystyle c = Tr (g)}   for itemg∈GF(p6) {\ displaystyle g \ in GF (p ^ {6})}   of orderq {\ displaystyle q}   . But with thisTr(g) {\ displaystyle Tr (g)}   generatorg {\ displaystyle g}   XTR groups can be found by finding the rootF(Tr(g),X) {\ displaystyle F (Tr (g), \ X)}   . To find itc {\ displaystyle c}   , consider property 5F(c,X) {\ displaystyle F (c, \ X)}   . Finding suchc {\ displaystyle c}   should check whether it is really orderq {\ displaystyle q}   , however, we must first choose c \ in GF (p²) such that F (c, \ X) is irreducible. The simplest approach is to choosec∈GF(p2)∖GF(p) {\ displaystyle c \ in GF (p ^ {2}) \ backslash GF (p)}   randomly.

Statement: For a randomly selectedc∈GF(p2) {\ displaystyle c \ in GF (p ^ {2})}   the probability thatF(c,X)=X3-cX2+cpX-one∈GF(p2)[X] {\ displaystyle F (c, \ X) = X ^ {3} -cX ^ {2} + c ^ {p} X-1 \ in GF (p ^ {2}) [X]}   - irreducible, more than 1/3.

Basic search algorithmTr(g) {\ displaystyle Tr (g)}   :

  1. Choose randomc∈GF(p2)∖GF(p) {\ displaystyle c \ in GF (p ^ {2}) \ backslash GF (p)}   .
  2. IfF(c,X) {\ displaystyle F (c, \ X)}   - we bring, we will return to the first step.
  3. We use the algorithm to searchSn(c) {\ displaystyle S_ {n} (c)}   . Will findd=c(p2-p+one)/q {\ displaystyle d = c _ {(p ^ {2} -p + 1) / q}}   .
  4. Ifd {\ displaystyle d}   has an order not equalq {\ displaystyle q}   back to the first step.
  5. Let beTr(g)=d {\ displaystyle Tr (g) = d}   .

This algorithm calculates a field elementGF(p2) {\ displaystyle GF (p ^ {2})}   equivalentTr(g) {\ displaystyle Tr (g)}   for someg∈GF(p6) {\ displaystyle g \ in GF (p ^ {6})}   of orderq {\ displaystyle q}   . [one]

Examples

Diffie-Hellman Protocol

Suppose Alice and Bob have an XTR public key(p,q,Tr(g)) {\ displaystyle \ left (p, q, Tr (g) \ right)}   and they want to generate a shared private keyK {\ displaystyle K}   .

  1. Alice picks a random numbera∈Z {\ displaystyle a \ in \ mathbb {Z}}   such thatone<a<q-2 {\ displaystyle 1 <a <q-2}   calculatesSa(Tr(g))=(Tr(ga-one),Tr(ga),Tr(ga+one))∈GF(p2)3 {\ displaystyle S_ {a} (Tr (g)) = \ left (Tr (g ^ {a-1}), Tr (g ^ {a}), Tr (g ^ {a + 1}) \ right) \ in GF (p ^ {2}) ^ {3}}   and sendsTr(ga)∈GF(p2) {\ displaystyle Tr (g ^ {a}) \ in GF (p ^ {2})}   To bob.
  2. Bob getsTr(ga) {\ displaystyle Tr (g ^ {a})}   from Alice, picks randomb∈Z {\ displaystyle b \ in \ mathbb {Z}}   such thatone<b<q-2 {\ displaystyle 1 <b <q-2}   calculatesSb(Tr(g))=(Tr(gb-one),Tr(gb),Tr(gb+one))∈GF(p2)3 {\ displaystyle S_ {b} (Tr (g)) = \ left (Tr (g ^ {b-1}), Tr (g ^ {b}), Tr (g ^ {b + 1}) \ right) \ in GF (p ^ {2}) ^ {3}}   and sendsTr(gb)∈GF(p2) {\ displaystyle Tr (g ^ {b}) \ in GF (p ^ {2})}   Alice.
  3. Alice getsTr(gb) {\ displaystyle Tr (g ^ {b})}   from Bob, calculatesSa(Tr(gb))=(Tr(g(a-one)b),Tr(gab),Tr(g(a+one)b))∈GF(p2)3 {\ displaystyle S_ {a} (Tr (g ^ {b})) = \ left (Tr (g ^ {(a-1) b}), Tr (g ^ {ab}), Tr (g ^ {( a + 1) b}) \ right) \ in GF (p ^ {2}) ^ {3}}   and getsTr(gab)∈GF(p2) {\ displaystyle Tr (g ^ {ab}) \ in GF (p ^ {2})}   - private keyK {\ displaystyle K}   .
  4. Similarly, Bob computesSb(Tr(ga))=(Tr(ga(b-one)),Tr(gab),Tr(ga(b+one)))∈GF(p2)3 {\ displaystyle S_ {b} (Tr (g ^ {a})) = \ left (Tr (g ^ {a (b-1)}), Tr (g ^ {ab}), Tr (g ^ {a (b + 1)}) \ right) \ in GF (p ^ {2}) ^ {3}}   and getsTr(gab)∈GF(p2) {\ displaystyle Tr (g ^ {ab}) \ in GF (p ^ {2})}   - private keyK {\ displaystyle K}   .

El Gamal Scheme

Suppose Alice has a part of the XTR public key:(p,q,Tr(g)) {\ displaystyle (p, q, Tr (g))}   . Alice picks a secret integerk {\ displaystyle k}   and calculates and publishesTr(gk) {\ displaystyle Tr (g ^ {k})}   . Having received Alice’s public key(p,q,Tr(g),Tr(gk)) {\ displaystyle \ left (p, q, Tr (g), Tr (g ^ {k}) \ right)}   Bob can encrypt the messageM {\ displaystyle M}   intended by Alice using the following algorithm:

  1. Bob picks randomb∈Z {\ displaystyle b \ in \ mathbb {Z}}   such thatone<b<q-2 {\ displaystyle 1 <b <q-2}   and calculatesSb(Tr(g))=(Tr(gb-one),Tr(gb),Tr(gb+one))∈GF(p2)3 {\ displaystyle S_ {b} (Tr (g)) = \ left (Tr (g ^ {b-1}), Tr (g ^ {b}), Tr (g ^ {b + 1}) \ right) \ in GF (p ^ {2}) ^ {3}}   .
  2. Bob then calculatesSb(Tr(gk))=(Tr(g(b-one)k),Tr(gbk),Tr(g(b+one)k))∈GF(p2)3 {\ displaystyle S_ {b} (Tr (g ^ {k})) = \ left (Tr (g ^ {(b-1) k}), Tr (g ^ {bk}), Tr (g ^ {( b + 1) k}) \ right) \ in GF (p ^ {2}) ^ {3}}   .
  3. Bob defines a symmetric keyK {\ displaystyle K}   based onTr(gbk)∈GF(p2) {\ displaystyle Tr (g ^ {bk}) \ in GF (p ^ {2})}   .
  4. Bob encrypts the messageM {\ displaystyle M}   the keyK {\ displaystyle K}   receiving an encrypted messageE {\ displaystyle E}   .
  5. A couple(Tr(gb),E) {\ displaystyle (Tr (g ^ {b}), \ E)}   Bob sends Alice.

Getting a pair(Tr(gb),E) {\ displaystyle (Tr (g ^ {b}), \ E)}   Alice decodes her as follows:

  1. Alice calculatesSk(Tr(gb))=(Tr(gb(k-one)),Tr(gbk),Tr(gb(k+one)))∈GF(p2)3 {\ displaystyle S_ {k} (Tr (g ^ {b})) = \ left (Tr (g ^ {b (k-1)}), Tr (g ^ {bk}), Tr (g ^ {b (k + 1)}) \ right) \ in GF (p ^ {2}) ^ {3}}   .
  2. Alice defines a symmetric keyK {\ displaystyle K}   based onTr(gbk)∈GF(p2) {\ displaystyle Tr (g ^ {bk}) \ in GF (p ^ {2})}   .
  3. Knowing that the message encryption algorithm is symmetric, Alice keyedK {\ displaystyle K}   decryptsE {\ displaystyle E}   receiving the original messageM {\ displaystyle M}   .

Thus, the message is transmitted.

Notes

  1. ↑ 1 2 Lenstra, Arjen K .; Verheul, Eric R. An overview of the XTR public key system (neopr.) . Archived on April 15, 2006.
  2. ↑ Lenstra, Arjen K .; Verheul, Eric R. The XTR public key system (neopr.) .
Source - https://ru.wikipedia.org/w/index.php?title=XTR_(algorithm)&oldid=101068766


More articles:

  • Australian Curling Mixed Team
  • Japan Curling Mixed Team
  • Chyosovo-4
  • Meunier, Toma
  • McCulloch, Luke
  • Brokar's Triangle
  • Clairvoyant (television series 2016)
  • Rocco (Moon Crater)
  • Old Lime (art colony)
  • Iskandirov, Mukash Zulkarnayevich

All articles

Clever Geek | 2019