text: The Diffie–Hellman key exchange is an application of exponentiation in finite fields that is widely used for secure communications. It uses the fact that exponentiation is computationally inexpensive, whereas the inverse operation, the discrete logarithm, is computationally expensive. More precisely, if  is a primitive element in  then  can be efficiently computed with exponentiation by squaring for any , even if  is large, while there is no known computationally practical algorithm that allows retrieving  from  if  is sufficiently large.
  Powers of sets
  The Cartesian product of two sets  and  is the set of the ordered pairs  such that  and  This operation is not properly commutative nor associative, but has these properties up to canonical isomorphisms, that allow identifying, for example,   and
  This allows defining the th power  of a set  as the set of all -tuples  of elements of .
  When  is endowed with some structure, it is frequent that  is naturally endowed with a similar structure. In this case, the term "direct product" is generally used instead of "Cartesian product", and exponentiation denotes product structure. For example  (where  denotes the real numbers) denotes the Cartesian product of  copies of  as well as their direct product as vector space, topological spaces, rings, etc.
  Sets as exponents
  A -tuple  of elements of  can be considered as a function from  This generalizes to the following notation.
  Given two sets  and , the set of all functions from  to  is denoted . This exponential notation is justified by the following canonical isomorphisms (for the first one, see Currying):
  where  denotes the Cartesian product, and  the disjoint union.