XTR

From HandWiki
Revision as of 17:36, 6 February 2024 by Dennis Ross (talk | contribs) (fixing)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

In cryptography, XTR is an algorithm for public-key encryption. XTR stands for 'ECSTR', which is an abbreviation for Efficient and Compact Subgroup Trace Representation. It is a method to represent elements of a subgroup of a multiplicative group of a finite field. To do so, it uses the trace over [math]\displaystyle{ GF(p^2) }[/math] to represent elements of a subgroup of [math]\displaystyle{ GF(p^6)^* }[/math].

From a security point of view, XTR relies on the difficulty of solving Discrete Logarithm related problems in the full multiplicative group of a finite field. Unlike many cryptographic protocols that are based on the generator of the full multiplicative group of a finite field, XTR uses the generator [math]\displaystyle{ g }[/math] of a relatively small subgroup of some prime order [math]\displaystyle{ q }[/math] of a subgroup of [math]\displaystyle{ GF(p^6)^* }[/math]. With the right choice of [math]\displaystyle{ q }[/math], computing Discrete Logarithms in the group, generated by [math]\displaystyle{ g }[/math], is, in general, as hard as it is in [math]\displaystyle{ GF(p^6)^* }[/math] and thus cryptographic applications of XTR use [math]\displaystyle{ GF(p^2) }[/math] arithmetics while achieving full [math]\displaystyle{ GF(p^6) }[/math] security leading to substantial savings both in communication and computational overhead without compromising security. Some other advantages of XTR are its fast key generation, small key sizes and speed.

Fundamentals of XTR

XTR uses a subgroup, commonly referred to as XTR subgroup or just XTR group, of a subgroup called XTR supergroup, of the multiplicative group of a finite field [math]\displaystyle{ GF(p^6) }[/math] with [math]\displaystyle{ p^6 }[/math] elements. The XTR supergroup is of order [math]\displaystyle{ p^2-p+1 }[/math], where p is a prime such that a sufficiently large prime q divides [math]\displaystyle{ p^2-p+1 }[/math]. The XTR subgroup has now order q and is, as a subgroup of [math]\displaystyle{ GF(p^6)^* }[/math], a cyclic group [math]\displaystyle{ \langle g\rangle }[/math] with generator g. The following three paragraphs will describe how elements of the XTR supergroup can be represented using an element of [math]\displaystyle{ GF(p^2) }[/math] instead of an element of [math]\displaystyle{ GF(p^6) }[/math] and how arithmetic operations take place in [math]\displaystyle{ GF(p^2) }[/math] instead of in [math]\displaystyle{ GF(p^6) }[/math].

Arithmetic operations in [math]\displaystyle{ GF(p^2) }[/math]

Let p be a prime such that p ≡ 2 mod 3 and p2 - p + 1 has a sufficiently large prime factor q. Since p2 ≡ 1 mod 3 we see that p generates [math]\displaystyle{ (\mathbb{Z}/3\mathbb{Z})^* }[/math] and thus the third cyclotomic polynomial [math]\displaystyle{ \Phi_3(x)=x^2+x+1 }[/math] is irreducible over [math]\displaystyle{ GF(p) }[/math]. It follows that the roots [math]\displaystyle{ \alpha }[/math] and [math]\displaystyle{ \alpha^p }[/math] form an optimal normal basis for [math]\displaystyle{ GF(p^2) }[/math] over [math]\displaystyle{ GF(p) }[/math] and

[math]\displaystyle{ GF(p^2) \cong \{x_1 \alpha + x_2 \alpha^p : x_1, x_2 \in GF(p)\}. }[/math]

Considering that p2 mod 3 we can reduce the exponents modulo 3 to get

[math]\displaystyle{ GF(p^2) \cong \{y_1 \alpha + y_2 \alpha^2 : \alpha^2+\alpha+1=0, y_1, y_2 \in GF(p)\}. }[/math]

The cost of arithmetic operations is now given in the following Lemma labeled Lemma 2.21 in "An overview of the XTR public key system":[1]

Lemma

  • Computing xp is done without using multiplication
  • Computing x2 takes two multiplications in [math]\displaystyle{ GF(p) }[/math]
  • Computing xy takes three multiplications in [math]\displaystyle{ GF(p) }[/math]
  • Computing xz-yzp takes four multiplications in [math]\displaystyle{ GF(p) }[/math].

Traces over [math]\displaystyle{ GF(p^2) }[/math]

The trace in XTR is always considered over [math]\displaystyle{ GF(p^2) }[/math]. In other words, the conjugates of [math]\displaystyle{ h \in GF(p^6) }[/math] over [math]\displaystyle{ GF(p^2) }[/math] are [math]\displaystyle{ h, h^{p^2} }[/math] and [math]\displaystyle{ h^{p^4} }[/math] and the trace of [math]\displaystyle{ h }[/math] is their sum:

[math]\displaystyle{ Tr(h)=h + h^{p^2} + h^{p^4}. }[/math]

Note that [math]\displaystyle{ Tr(h) \in GF(p^2) }[/math] since

[math]\displaystyle{ \begin{align} Tr(h)^{p^2} &= h^{p^2} + h^{p^4} + h^{p^6} \\ &= h + h^{p^2} + h^{p^4} \\ &= Tr(h) \end{align} }[/math]

Consider now the generator [math]\displaystyle{ g }[/math] of the XTR subgroup of a prime order [math]\displaystyle{ q }[/math]. Remember that [math]\displaystyle{ \langle g\rangle }[/math] is a subgroup of the XTR supergroup of order [math]\displaystyle{ p^2-p+1 }[/math], so [math]\displaystyle{ q \mid p^2-p+1 }[/math]. In the following section we will see how to choose [math]\displaystyle{ p }[/math] and [math]\displaystyle{ q }[/math], but for now it is sufficient to assume that [math]\displaystyle{ q\gt 3 }[/math]. To compute the trace of [math]\displaystyle{ g }[/math] note that modulo [math]\displaystyle{ p^2-p+1 }[/math] we have

[math]\displaystyle{ p^2 = p-1 }[/math] and
[math]\displaystyle{ p^4 = (p-1)^2 = p^2 -2p +1 = -p }[/math]

and thus

[math]\displaystyle{ \begin{align} Tr(g) &= g + g^{p^2} + g^{p^4}\\ &= g + g^{p-1} + g^{-p}. \end{align} }[/math]

The product of the conjugates of [math]\displaystyle{ g }[/math] equals [math]\displaystyle{ 1 }[/math], i.e., that [math]\displaystyle{ g }[/math] has norm 1.

The crucial observation in XTR is that the minimal polynomial of [math]\displaystyle{ g }[/math] over [math]\displaystyle{ GF(p^2) }[/math]

[math]\displaystyle{ (x-g)\!\ (x-g^{p-1})(x-g^{-p}) }[/math]

simplifies to

[math]\displaystyle{ x^3-Tr(g)\!\ x^2 + Tr(g)^p x -1 }[/math]

which is fully determined by [math]\displaystyle{ Tr(g) }[/math]. Consequently, conjugates of [math]\displaystyle{ g }[/math], as roots of the minimal polynomial of [math]\displaystyle{ g }[/math] over [math]\displaystyle{ GF(p^2) }[/math], are completely determined by the trace of [math]\displaystyle{ g }[/math]. The same is true for any power of [math]\displaystyle{ g }[/math]: conjugates of [math]\displaystyle{ g^n }[/math] are roots of polynomial

[math]\displaystyle{ x^3-Tr(g^n)\!\ x^2 + Tr(g^n)^p x -1 }[/math]

and this polynomial is completely determined by [math]\displaystyle{ Tr(g^n) }[/math].

The idea behind using traces is to replace [math]\displaystyle{ g^n \in GF(p^6) }[/math] in cryptographic protocols, e.g. the Diffie–Hellman key exchange by [math]\displaystyle{ Tr(g^n) \in GF(p^2) }[/math] and thus obtaining a factor of 3 reduction in representation size. This is, however, only useful if there is a quick way to obtain [math]\displaystyle{ Tr(g^n) }[/math] given [math]\displaystyle{ Tr(g) }[/math]. The next paragraph gives an algorithm for the efficient computation of [math]\displaystyle{ Tr(g^n) }[/math]. In addition, computing [math]\displaystyle{ Tr(g^n) }[/math] given [math]\displaystyle{ Tr(g) }[/math] turns out to be quicker than computing [math]\displaystyle{ g^n }[/math] given [math]\displaystyle{ g }[/math].[1]

Algorithm for the quick computation of [math]\displaystyle{ Tr(g^n) }[/math] given [math]\displaystyle{ Tr(g) }[/math]

A. Lenstra and E. Verheul give this algorithm in their paper titled The XTR public key system in.[2] All the definitions and lemmas necessary for the algorithm and the algorithm itself presented here, are taken from that paper.

Definition For c in [math]\displaystyle{ GF(p^2) }[/math] define

[math]\displaystyle{ F(c,X) = X^3 - cX^2 + c^pX - 1 \in GF(p^2)[X]. }[/math]

Definition Let [math]\displaystyle{ h_0,\!\ h_1, h_2 }[/math] denote the, not necessarily distinct, roots of [math]\displaystyle{ F(c,X) }[/math] in [math]\displaystyle{ GF(p^6) }[/math] and let [math]\displaystyle{ n }[/math] be in [math]\displaystyle{ \mathbb{Z} }[/math]. Define

[math]\displaystyle{ c_n=h_0^n + h_1^n + h_2^n. }[/math]

Properties of [math]\displaystyle{ c_n }[/math] and [math]\displaystyle{ F(c,X) }[/math]

  1. [math]\displaystyle{ c=c_1 }[/math]
  2. [math]\displaystyle{ c_{-n}=c_{np}=c_n^p }[/math]
  3. [math]\displaystyle{ c_n \in GF(p^2) \text{ for } n \in \mathbb{Z} }[/math]
  4. [math]\displaystyle{ c_{u+v}=c_u c_v - c_v^p c_{u-v} + c_{u-2v} \text{ for } u, v \in \mathbb{Z} }[/math]
  5. Either all [math]\displaystyle{ h_j }[/math] have order dividing [math]\displaystyle{ p^2-p+1 }[/math] and [math]\displaystyle{ \gt 3 }[/math] or all [math]\displaystyle{ h_j }[/math] are in [math]\displaystyle{ GF(p^2) }[/math]. In particular, [math]\displaystyle{ F(c,X) }[/math] is irreducible if and only if its roots have order diving [math]\displaystyle{ p^2-p+1 }[/math] and [math]\displaystyle{ \gt 3 }[/math].
  6. [math]\displaystyle{ F(c,X) }[/math] is reducible over [math]\displaystyle{ GF(p^2) }[/math] if and only if [math]\displaystyle{ c_{p+1} \in GF(p) }[/math]

Lemma Let [math]\displaystyle{ c,\!\ c_{n-1}, c_n, c_{n+1} }[/math] be given.

  1. Computing [math]\displaystyle{ c_{2n} = c_n^2 - 2c_n^p }[/math] takes two multiplication in [math]\displaystyle{ GF(p) }[/math].
  2. Computing [math]\displaystyle{ c_{n+2} = c_{n+1} \cdot c - c^p \cdot c_n + c_{n-1} }[/math] takes four multiplication in [math]\displaystyle{ GF(p) }[/math].
  3. Computing [math]\displaystyle{ c_{2n-1} = c_{n-1} \cdot c_n - c^p \cdot c_n^p + c_{n+1}^p }[/math] takes four multiplication in [math]\displaystyle{ GF(p) }[/math].
  4. Computing [math]\displaystyle{ c_{2n+1} = c_{n+1} \cdot c_n - c \cdot c_n^p + c_{n-1}^p }[/math] takes four multiplication in [math]\displaystyle{ GF(p) }[/math].

Definition Let [math]\displaystyle{ S_n(c)=(c_{n-1}, c_n, c_{n+1}) \in GF(p^2)^3 }[/math].

Algorithm 1 for computation of [math]\displaystyle{ S_n(c) }[/math] given [math]\displaystyle{ n }[/math] and [math]\displaystyle{ c }[/math]

  • If [math]\displaystyle{ n\lt 0 }[/math] apply this algorithm to [math]\displaystyle{ -n }[/math] and [math]\displaystyle{ c }[/math], and apply Property 2 to the resulting value.
  • If [math]\displaystyle{ n=0 }[/math], then [math]\displaystyle{ S_0(c)\!\ =(c^p, 3, c) }[/math].
  • If [math]\displaystyle{ n=1 }[/math], then [math]\displaystyle{ S_1(c)\!\ =(3, c, c^2-2c^p) }[/math].
  • If [math]\displaystyle{ n=2 }[/math], use the computation of [math]\displaystyle{ c_{n+2}= c_{n+1} \cdot c - c^p \cdot c_n + c_{n-1} }[/math] and [math]\displaystyle{ S_1(c) }[/math] to find [math]\displaystyle{ c_3 }[/math] and thereby [math]\displaystyle{ S_2(c) }[/math].
  • If [math]\displaystyle{ n\gt 2 }[/math], to compute [math]\displaystyle{ S_n(c) }[/math] define
[math]\displaystyle{ \bar{S}_i(c) = S_{2i+1}(c) }[/math]
and [math]\displaystyle{ \bar{m}=n }[/math] if n is odd and [math]\displaystyle{ \bar{m}=n-1 }[/math] otherwise. Let [math]\displaystyle{ \bar{m}=2m+1, k=1 }[/math] and compute [math]\displaystyle{ \bar{S}_k(c) = S_3(c) }[/math] using the Lemma above and [math]\displaystyle{ S_2(c) }[/math]. Let further
[math]\displaystyle{ m=\sum_{j=0}^r m_j 2^j }[/math]
with [math]\displaystyle{ m_j \in {0,1} }[/math] and [math]\displaystyle{ m_r=1 }[/math]. For [math]\displaystyle{ j=r-1, r-2, ..., 0 }[/math] in succession, do the following:
  • If [math]\displaystyle{ m_j=0 }[/math], use [math]\displaystyle{ \bar{S}_k(c) }[/math] to compute [math]\displaystyle{ \bar{S}_{2k}(c) }[/math].
  • If [math]\displaystyle{ m_j=1 }[/math], use [math]\displaystyle{ \bar{S}_k(c) }[/math] to compute [math]\displaystyle{ \bar{S}_{2k+1}(c) }[/math].
  • Replace [math]\displaystyle{ k }[/math] by [math]\displaystyle{ 2k + m_j }[/math].

When these iterations finish, [math]\displaystyle{ k=m }[/math] and [math]\displaystyle{ S_{\bar{m}}(c) = \bar{S}_{m}(c) }[/math]. If n is even use [math]\displaystyle{ S_{\bar{m}}(c) }[/math] to compute [math]\displaystyle{ \bar{S}_{m+1}(c) }[/math].

Parameter selection

Finite field and subgroup size selection

In order to take advantage of the above described representations of elements with their traces and furthermore ensure sufficient security, that will be discussed below, we need to find primes [math]\displaystyle{ p }[/math] and [math]\displaystyle{ q }[/math], where [math]\displaystyle{ p }[/math] denotes the characteristic of the field [math]\displaystyle{ GF(p^6) }[/math] with [math]\displaystyle{ p\equiv 2\ \text{mod}\ 3 }[/math] and [math]\displaystyle{ q }[/math] is the size of the subgroup, such that [math]\displaystyle{ q }[/math] divides [math]\displaystyle{ p^2-p+1 }[/math].

We denote with [math]\displaystyle{ P }[/math] and [math]\displaystyle{ Q }[/math] the sizes of [math]\displaystyle{ p }[/math] and [math]\displaystyle{ q }[/math] in bits. To achieve security comparable to 1024-bit RSA, we should choose [math]\displaystyle{ 6P }[/math] about 1024, i.e. [math]\displaystyle{ P\approx 170 }[/math] and [math]\displaystyle{ Q }[/math] can be around 160.

A first easy algorithm to compute such primes [math]\displaystyle{ p }[/math] and [math]\displaystyle{ q }[/math] is the next Algorithm A:

Algorithm A

  1. Find [math]\displaystyle{ r\in\mathbb{Z} }[/math] such that [math]\displaystyle{ q=r^2-r+1 }[/math] is a [math]\displaystyle{ Q }[/math]-bit prime.
  2. Find [math]\displaystyle{ k\in\mathbb{Z} }[/math] such that [math]\displaystyle{ p=r+k\cdot q }[/math] is a [math]\displaystyle{ P }[/math]-bit prime with [math]\displaystyle{ p\equiv 2\ \text{mod}\ 3 }[/math].
Correctness of Algorithm A:
It remains to check that [math]\displaystyle{ q\mid p^2-p+1 }[/math] because all the other necessary properties are obviously satisfied per definition of [math]\displaystyle{ p }[/math] and [math]\displaystyle{ q }[/math]. We easily see that [math]\displaystyle{ p^2-p+1=r^2+2rkq+k^2q^2-r-kq+1=r^2-r+1+q(2rk+k^2q-k)=q(1+2rk+k^2q-k) }[/math] which implies that [math]\displaystyle{ q\mid p^2-p+1 }[/math].

Algorithm A is very fast and can be used to find primes [math]\displaystyle{ p }[/math] that satisfy a degree-two polynomial with small coefficients. Such [math]\displaystyle{ p }[/math] lead to fast arithmetic operations in [math]\displaystyle{ GF(p) }[/math]. In particular if the search for [math]\displaystyle{ k }[/math] is restricted to [math]\displaystyle{ k=1 }[/math], which means looking for an [math]\displaystyle{ r }[/math] such that both [math]\displaystyle{ r^2-r+1\text{ and }r^2+1 }[/math] are prime and such that [math]\displaystyle{ r^2+1\equiv 2 \text{ mod } 3 }[/math], the primes [math]\displaystyle{ p }[/math] have this nice form. Note that in this case [math]\displaystyle{ r }[/math] must be even and [math]\displaystyle{ r\equiv 1\text{ mod }4 }[/math].

On the other hand, such [math]\displaystyle{ p }[/math] may be undesirable from a security point of view because they may make an attack with the Discrete Logarithm variant of the Number Field Sieve easier.

The following Algorithm B doesn't have this disadvantage, but it also doesn't have the fast arithmetic modulo [math]\displaystyle{ p }[/math] Algorithm A has in that case.

Algorithm B

  1. Select a [math]\displaystyle{ Q }[/math]-bit prime [math]\displaystyle{ q }[/math] so that [math]\displaystyle{ q\equiv7\ \text{mod}\ 12 }[/math].
  2. Find the roots [math]\displaystyle{ r_1 }[/math] and [math]\displaystyle{ r_2 }[/math] of [math]\displaystyle{ X^2-X+1\ \text{mod}\ q }[/math].
  3. Find a [math]\displaystyle{ k\in\mathbb{Z} }[/math] such that [math]\displaystyle{ p=r_i+k\cdot q }[/math] is a [math]\displaystyle{ P }[/math]-bit prime with [math]\displaystyle{ p\equiv 2\ \text{mod}\ 3 }[/math] for [math]\displaystyle{ i\in\{1,2\} }[/math]
Correctness of Algorithm B:
Since we chose [math]\displaystyle{ q\equiv7\ \text{mod}\ 12 }[/math] it follows immediately that [math]\displaystyle{ q\equiv1\ \text{mod}\ 3 }[/math] (because [math]\displaystyle{ 7\equiv1\ \text{mod}\ 3 }[/math] and [math]\displaystyle{ 3\mid 12 }[/math]). From that and quadratic reciprocity we can deduce that [math]\displaystyle{ r_1 }[/math] and [math]\displaystyle{ r_2 }[/math] exist.
To check that [math]\displaystyle{ q\mid p^2-p+1 }[/math] we consider again [math]\displaystyle{ p^2-p+1 }[/math] for [math]\displaystyle{ r_i\in\{1,2\} }[/math] and get that [math]\displaystyle{ p^2-p+1=r_i^2+2r_ikq+k^2q^2-r_i-kq+1=r_i^2-r_i+1+q(2rk+k^2q-k)=q(2rk+k^2q-k) }[/math], since [math]\displaystyle{ r_1 }[/math] and [math]\displaystyle{ r_2 }[/math] are roots of [math]\displaystyle{ X^2-X+1 }[/math] and hence [math]\displaystyle{ q\mid p^2-p+1 }[/math].

Subgroup selection

In the last paragraph we have chosen the sizes [math]\displaystyle{ p }[/math] and [math]\displaystyle{ q }[/math] of the finite field [math]\displaystyle{ GF(p^6) }[/math] and the multiplicative subgroup of [math]\displaystyle{ GF(p^6)^* }[/math], now we have to find a subgroup [math]\displaystyle{ \langle g\rangle }[/math] of [math]\displaystyle{ GF\!\ (p^6)^* }[/math] for some [math]\displaystyle{ g\in GF(p^6) }[/math] such that [math]\displaystyle{ \mid\!\!\langle g\rangle\!\!\mid=q }[/math].

However, we do not need to find an explicit [math]\displaystyle{ g\in GF(p^6) }[/math], it suffices to find an element [math]\displaystyle{ c\in GF(p^2) }[/math] such that [math]\displaystyle{ c=Tr(g) }[/math] for an element [math]\displaystyle{ g\in GF(p^6) }[/math] of order [math]\displaystyle{ q }[/math]. But, given [math]\displaystyle{ Tr(g) }[/math], a generator [math]\displaystyle{ g }[/math] of the XTR (sub)group can be found by determining any root of [math]\displaystyle{ F(Tr(g),\ X) }[/math] which has been defined above. To find such a [math]\displaystyle{ c }[/math] we can take a look at property 5 of [math]\displaystyle{ F(c,\ X) }[/math] here stating that the roots of [math]\displaystyle{ F(c,\ X) }[/math] have an order dividing [math]\displaystyle{ p^2-p+1 }[/math] if and only if [math]\displaystyle{ F(c,\ X) }[/math] is irreducible. After finding such [math]\displaystyle{ c }[/math] we need to check if it really is of order [math]\displaystyle{ q }[/math], but first we focus on how to select [math]\displaystyle{ c\in GF(p^2) }[/math] such that [math]\displaystyle{ F(c,\ X) }[/math] is irreducible.

An initial approach is to select [math]\displaystyle{ c\in GF(p^2)\backslash GF(p) }[/math] randomly which is justified by the next lemma.

Lemma: For a randomly selected [math]\displaystyle{ c\in GF(p^2) }[/math] the probability that [math]\displaystyle{ F(c,\ X)=X^3-cX^2+c^pX-1\in GF(p^2)[X] }[/math] is irreducible is about one third.

Now the basic algorithm to find a suitable [math]\displaystyle{ Tr(g) }[/math] is as follows:

Outline of the algorithm

  1. Pick a random [math]\displaystyle{ c\in GF(p^2)\backslash GF(p) }[/math].
  2. If [math]\displaystyle{ F(c,\ X) }[/math] is reducible, then return to Step 1.
  3. Use Algorithm 1 to compute [math]\displaystyle{ d=c_{(p^2-p+1)/q} }[/math].
  4. If [math]\displaystyle{ d }[/math] is not of order [math]\displaystyle{ q }[/math], return to Step 1.
  5. Let [math]\displaystyle{ Tr(g)=d }[/math].

It turns out that this algorithm indeed computes an element of [math]\displaystyle{ GF(p^2) }[/math] that equals [math]\displaystyle{ Tr(g) }[/math] for some [math]\displaystyle{ g\in GF(p^6) }[/math] of order [math]\displaystyle{ q }[/math].

More details to the algorithm, its correctness, runtime and the proof of the Lemma can be found in "An overview of the XTR public key system" in.[1]

Cryptographic schemes

In this section it is explained how the concepts above using traces of elements can be applied to cryptography. In general, XTR can be used in any cryptosystem that relies on the (subgroup) Discrete Logarithm problem. Two important applications of XTR are the Diffie–Hellman key agreement and the ElGamal encryption. We will start first with Diffie–Hellman.

XTR-DH key agreement

We suppose that both Alice and Bob have access to the XTR public key data [math]\displaystyle{ \left(p,q,Tr(g)\right) }[/math] and intend to agree on a shared secret key [math]\displaystyle{ K }[/math]. They can do this by using the following XTR version of the Diffie–Hellman key exchange:

  1. Alice picks [math]\displaystyle{ a\in\mathbb{Z} }[/math] randomly with [math]\displaystyle{ 1\lt a\lt q-2 }[/math], computes with Algorithm 1 [math]\displaystyle{ S_a(Tr(g))=\left(Tr(g^{a-1}),Tr(g^a),Tr(g^{a+1})\right)\in GF(p^2)^3 }[/math] and sends [math]\displaystyle{ Tr(g^a)\in GF(p^2) }[/math] to Bob.
  2. Bob receives [math]\displaystyle{ Tr(g^a) }[/math] from Alice, selects at random [math]\displaystyle{ b\in\mathbb{Z} }[/math] with [math]\displaystyle{ 1\lt b\lt q-2 }[/math], applies Algorithm 1 to compute [math]\displaystyle{ S_b(Tr(g))=\left(Tr(g^{b-1}),Tr(g^b),Tr(g^{b+1})\right)\in GF(p^2)^3 }[/math] and sends [math]\displaystyle{ Tr(g^b)\in GF(p^2) }[/math] to Alice.
  3. Alice receives [math]\displaystyle{ Tr(g^b) }[/math] from Bob, computes with Algorithm 1 [math]\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 }[/math] and determines [math]\displaystyle{ K }[/math] based on [math]\displaystyle{ Tr(g^{ab})\in GF(p^2) }[/math].
  4. Bob analogously applies Algorithm 1 to compute [math]\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 }[/math] and also determines [math]\displaystyle{ K }[/math] based on [math]\displaystyle{ Tr(g^{ab})\in GF(p^2) }[/math].

XTR ElGamal encryption

For the ElGamal encryption we suppose now that Alice is the owner of the XTR public key data [math]\displaystyle{ (p,q,Tr(g)) }[/math] and that she has selected a secret integer [math]\displaystyle{ k }[/math], computed [math]\displaystyle{ Tr(g^k) }[/math] and published the result. Given Alice's XTR public key data [math]\displaystyle{ \left(p,q,Tr(g),Tr(g^k)\right) }[/math], Bob can encrypt a message [math]\displaystyle{ M }[/math], intended for Alice, using the following XTR version of the ElGamal encryption:

  1. Bob selects randomly a [math]\displaystyle{ b\in\mathbb{Z} }[/math] with [math]\displaystyle{ 1\lt b\lt q-2 }[/math] and computes with Algorithm 1 [math]\displaystyle{ S_b(Tr(g))=\left(Tr(g^{b-1}),Tr(g^b),Tr(g^{b+1})\right)\in GF(p^2)^3 }[/math].
  2. Bob next applies Algorithm 1 to compute [math]\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 }[/math].
  3. Bob determines a symmetric encryption key [math]\displaystyle{ K }[/math] based on [math]\displaystyle{ Tr(g^{bk})\in GF(p^2) }[/math].
  4. Bob uses an agreed upon symmetric encryption method with key [math]\displaystyle{ K }[/math] to encrypt his message [math]\displaystyle{ M }[/math], resulting in the encryption [math]\displaystyle{ E }[/math].
  5. Bob sends [math]\displaystyle{ (Tr(g^b),\ E) }[/math] to Alice.

Upon receipt of [math]\displaystyle{ (Tr(g^b),\ E) }[/math], Alice decrypts the message in the following way:

  1. Alice computes [math]\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 }[/math].
  2. Alice determines the symmetric key [math]\displaystyle{ K }[/math] based on [math]\displaystyle{ Tr(g^{bk})\in GF(p^2) }[/math].
  3. Alice uses the agreed upon symmetric encryption method with key [math]\displaystyle{ K }[/math] to decrypt [math]\displaystyle{ E }[/math], resulting in the original message [math]\displaystyle{ M }[/math].

The here described encryption scheme is based on a common hybrid version of the ElGamal encryption, where the secret key [math]\displaystyle{ K }[/math] is obtained by an asymmetric public key system and then the message is encrypted with a symmetric key encryption method Alice and Bob agreed to.

In the more traditional ElGamal encryption the message is restricted to the key space, which would here be [math]\displaystyle{ GF(p^2) }[/math], because [math]\displaystyle{ Tr(g)\in GF(p^2)\ \forall p\in GF(p^6)^* }[/math]. The encryption in this case is the multiplication of the message with the key, which is an invertible operation in the key space [math]\displaystyle{ GF(p^2) }[/math].

Concretely this means if Bob wants to encrypt a message [math]\displaystyle{ M\!\ ' }[/math], first he has to convert it into an element [math]\displaystyle{ M }[/math] of [math]\displaystyle{ GF(p^2) }[/math] and then compute the encrypted message [math]\displaystyle{ E }[/math] as [math]\displaystyle{ E=K\cdot M\in GF(p^2) }[/math]. Upon receipt of the encrypted message [math]\displaystyle{ E }[/math] Alice can recover the original message [math]\displaystyle{ M }[/math] by computing [math]\displaystyle{ M=E\cdot K^{-1} }[/math], where [math]\displaystyle{ K^{-1} }[/math] is the inverse of [math]\displaystyle{ K }[/math] in [math]\displaystyle{ GF(p^2) }[/math].

Security

In order to say something about the security properties of the above explained XTR encryption scheme, first it is important to check the security of the XTR group, which means how hard it is to solve the Discrete Logarithm problem there. The next part will then state the equivalency between the Discrete Logarithm problem in the XTR group and the XTR version of the discrete logarithm problem, using only the traces of elements.

Discrete logarithms in a general [math]\displaystyle{ GF\left(p^t\right) }[/math]

Let now [math]\displaystyle{ \langle \gamma\rangle }[/math] be a multiplicative group of order [math]\displaystyle{ \omega }[/math]. The security of the Diffie–Hellman protocol in [math]\displaystyle{ \langle \gamma\rangle }[/math] relies on the Diffie–Hellman (DH) problem of computing [math]\displaystyle{ \gamma^{xy}\text{ given }\gamma, \gamma^x\text{ and }\gamma^y }[/math]. We write [math]\displaystyle{ DH(\gamma^x,\ \gamma^y)=\gamma^{xy} }[/math]. There are two other problems related to the DH problem. The first one is the Diffie–Hellman Decision (DHD) problem to determine if [math]\displaystyle{ c=DH(a,b) }[/math] for given [math]\displaystyle{ a,b,c\in\langle\gamma\rangle }[/math] and the second one is the Discrete Logarithm (DL) problem to find [math]\displaystyle{ x=DL(a) }[/math] for a given [math]\displaystyle{ a=\gamma^x\in\langle\gamma\rangle\text{ with }0\leq x\lt \omega }[/math].

The DL problem is at least as difficult as the DH problem and it is generally assumed that if the DL problem in [math]\displaystyle{ \langle \gamma\rangle }[/math] is intractable, then so are the other two.

Given the prime factorization of [math]\displaystyle{ \omega }[/math] the DL problem in [math]\displaystyle{ \langle \gamma\rangle }[/math] can be reduced to the DL problem in all subgroups of [math]\displaystyle{ \langle \gamma\rangle }[/math] with prime order due to the Pohlig–Hellman algorithm. Hence [math]\displaystyle{ \omega }[/math] can safely be assumed to be prime.

For a subgroup [math]\displaystyle{ \langle\gamma\rangle }[/math] of prime order [math]\displaystyle{ \omega }[/math] of the multiplicative group [math]\displaystyle{ GF\left(p^t\right)^* }[/math] of an extension field [math]\displaystyle{ GF(p^t) }[/math] of [math]\displaystyle{ GF(p) }[/math] for some [math]\displaystyle{ t }[/math], there are now two possible ways to attack the system. One can either focus on the whole multiplicative group or on the subgroup. To attack the multiplicative group the best known method is the Discrete Logarithm variant of the Number Field Sieve or alternatively in the subgroup one can use one of several methods that take [math]\displaystyle{ \mathcal{O}(\sqrt{\omega}) }[/math] operations in [math]\displaystyle{ \langle\gamma\rangle }[/math], such as Pollard's rho method.

For both approaches the difficulty of the DL problem in [math]\displaystyle{ \langle\gamma\rangle }[/math] depends on the size of the minimal surrounding subfield of [math]\displaystyle{ \langle\gamma\rangle }[/math] and on the size of its prime order [math]\displaystyle{ \omega }[/math]. If [math]\displaystyle{ GF\left(p^t\right) }[/math] itself is the minimal surrounding subfield of [math]\displaystyle{ \langle\gamma\rangle }[/math] and [math]\displaystyle{ \omega }[/math] is sufficiently large, then the DL problem in [math]\displaystyle{ \langle\gamma\rangle }[/math] is as hard as the general DL problem in [math]\displaystyle{ GF\left(p^t\right) }[/math].

The XTR parameters are now chosen in such a way that [math]\displaystyle{ p }[/math] is not small, [math]\displaystyle{ q }[/math] is sufficiently large and [math]\displaystyle{ \langle g\rangle }[/math] cannot be embedded in a true subfield of [math]\displaystyle{ GF(p^6) }[/math], since [math]\displaystyle{ q\mid p^2-p+1 }[/math] and [math]\displaystyle{ p^2-p+1 }[/math] is a divisor of [math]\displaystyle{ \mid\! GF(p^6)^*\! \mid=p^6-1 }[/math], but it does not divide [math]\displaystyle{ p^s-1\text{ for }s\in\{1,2,3\} }[/math] and thus [math]\displaystyle{ \langle g\rangle }[/math] cannot be a subgroup of [math]\displaystyle{ GF\!\ (p^s)^* }[/math] for [math]\displaystyle{ s\in\{1,2,3\} }[/math]. It follows that the DL problem in the XTR group may be assumed as hard as the DL problem in [math]\displaystyle{ GF(p^6) }[/math].

Security of XTR

Cryptographic protocols that are based on Discrete Logarithms can use many different types of subgroups like groups of points of elliptic curves or subgroups of the multiplicative group of a finite field like the XTR group. As we have seen above the XTR versions of the Diffie–Hellman and ElGamal encryption protocol replace using elements of the XTR group by using their traces. This means that the security of the XTR versions of these encryption schemes is no longer based on the original DH, DHD or DL problems. Therefore, the XTR versions of those problems need to be defined and we will see that they are equivalent (in the sense of the next definition) to the original problems.

Definitions:

  • We define the XTR-DH problem as the problem of computing [math]\displaystyle{ Tr(g^{xy}) }[/math] given [math]\displaystyle{ Tr(g^x) }[/math] and [math]\displaystyle{ Tr(g^y) }[/math] and we write [math]\displaystyle{ XDH(g^x,\ g^y)=g^{xy} }[/math].
  • The XTR-DHD problem is the problem of determining whether [math]\displaystyle{ XDH(a,b)=c }[/math] for [math]\displaystyle{ a,b,c\in Tr(\langle g\rangle) }[/math].
  • Given [math]\displaystyle{ a\in Tr(\langle g\rangle) }[/math], the XTR-DL problem is to find [math]\displaystyle{ x=XDL(a) }[/math], i.e. [math]\displaystyle{ 0\leq x\lt q }[/math] such that [math]\displaystyle{ a=Tr(g^x) }[/math].
  • We say that problem [math]\displaystyle{ \mathcal{A} }[/math] is (a,b)-equivalent to problem [math]\displaystyle{ \mathcal{B} }[/math], if any instance of problem [math]\displaystyle{ \mathcal{A} }[/math] (or [math]\displaystyle{ \mathcal{B} }[/math]) can be solved by at most a (or b) calls to an algorithm solving problem [math]\displaystyle{ \mathcal{B} }[/math] (or [math]\displaystyle{ \mathcal{A} }[/math]).

After introducing the XTR versions of these problems the next theorem is an important result telling us the connection between the XTR and the non-XTR problems, which are in fact equivalent. This implies that the XTR representation of elements with their traces is, as can be seen above, faster by a factor of 3 than the usual representation without compromising security.

Theorem The following equivalencies hold:

i. The XTR-DL problem is (1,1)-equivalent to the DL problem in [math]\displaystyle{ \langle g\rangle }[/math].
ii. The XTR-DH problem is (1,2)-equivalent to the DH problem in [math]\displaystyle{ \langle g\rangle }[/math].
iii. The XTR-DHD problem is (3,2)-equivalent to the DHD problem in [math]\displaystyle{ \langle g\rangle }[/math].

This means that an algorithm solving either XTR-DL, XTR-DH or XTR-DHD with non-negligible probability can be transformed into an algorithm solving the corresponding non-XTR problem DL, DH or DHD with non-negligible probability and vice versa. In particular part ii. implies that determining the small XTR-DH key (being an element of [math]\displaystyle{ GF(p^2) }[/math]) is as hard as determining the whole DH key (being an element of [math]\displaystyle{ GF(p^6) }[/math] ) in the representation group [math]\displaystyle{ \langle g \rangle }[/math].

References

  1. 1.0 1.1 1.2 Lenstra, Arjen K.; Verheul, Eric R.. An overview of the XTR public key system. http://www.win.tue.nl/~klenstra/xtrsurvey.pdf. Retrieved 2008-03-22. 
  2. Lenstra, Arjen K.; Verheul, Eric R.. The XTR public key system.