Rings, Fields notes

Rings

a ring over the set

R is given as
(R,+,)
, which has two binary operations, denoted by
+
and
such that:

  1. R
    is an abelian group (commutative group) with respect to +.
  2. is associative. i.e.,
    (ab)c=a(bc)
    for all
    a,b,cR
    .
  3. The distributive laws hold. i.e., for all
    a,b,cR
    we have
    a(b+c)=(ab+bc
    and
    (b+c)a=ba+ca
    .

We use

0 (the zero element) to denote the identity element of the abelian group
R
with respect to addition.
The additive inverse of
a
is denoted by
a
, also
a+(b)
is abbreviated by
ab
.

Definition

  1. A ring is called a ring with identity if the ring has a multiplicative identity—that is, if there is an element e such that
    ae=ea=a
    for all
    aeR
    .
  2. A ring is called commutative if
    is commutative.
  3. A ring is called an integral domain if it is a commutative ring with identity
    e0
    in which
    ab=0
    implies
    a=0
    or
    b=0
    .
  4. A ring is called a division ring (or skew field) if the nonzero elements of
    R
    form a group under
    .
  5. A commutative division ring is called a field

Polynomials

from elementary algebra, a polynomial is regarded as an expression of the form

a0+a1x++anxn

the

a's are called the coefficients and are usually real or complex numbers.
x
is viewed as a variable. The arithmetic of polynomials is governed by familiar rules. The concept of polynomial and the associated operations can be generalized to a formal algebraic setting in a straightforward manner.

Let

R be an arbitary ring. A polynomial over
R
is an expression of the form

f(x)=i=0naixi=a0+a1x++anxn,

where

n is a nonegative integer, the coefficients
ai,0in
, are elements of
R
, and
x
is a symbol not belonging to
R
called an indeterminate over
R
.

Prime fields

Let

pP be a prime number and
(Zp,+,)
be the ring of modular
p
arithmetic. To differentiate between arbitary modular arithmetic rings we write a prime fields of characteristic
p
as
(Fp,+,)

An impotant proterty of prime fields is that any prime field of charateristic

p has exactly
p
elements which can be represented on a computer with not more than
log2(p)
bits. This is in contracts to fields which may be require an unbounded amount of bits to properly describe an arbitary precession representation.

Prime fields are special case of modular arithmetic rings. Addition and multiplication can be computed by first doing integer addition and multiplication, and then considering the remainder in Euclidean division by

p as the result.

As above, (in Rings), for any prime fields element

xFp, its additive inverse (the negative) is given by
x=pxmod p
.

For

x0, the multiplicative inverse always exists, and is given by
x1=xp2

Division is then defined by multiplication with the multiplicative inverse;

ab=ba1

NOTE:
In modular

n arithmetic, a number
r
has a multiplicative inverse if and only if
n
and
r
are coprime. Since
gcd(n,r)=1
in that case, we know from the Extended Euclidean Algorithm that there are numbers
s
and
t
, such that the following equation holds:
1=sn+tr

If we take the modulus n on both sides, the term
sn
vanishes, which tells us that
tmodn
is the multiplicative inverse of
r
in modular
n
arithmetic.

See: Extended Euclidean Algorithm

Extended field

Pairing based SNARK systems are crucially dependent on certain types of pairings defind on elliptic curves over prime field extensions.

Given some prime number

pP, a natural number
mN
, and a irreducible polynomial
PFp[x]
of degree
k
whith coefficients from the prime field
Fp
, a prime extension
(Fpk,+,)
is defined as follows

The set

Fpk of the prime field extension is given by the set of all polynomials with a degree less than
k
:

Fpk:={ak1xk1+ak2xk2++a1x1+a0|aiFp}

The addition law of the prime field extension

Fpk is given by the usual addition of polynomials:

Let

j=0m1anxn and
j=0m2bnxn
be two polynomials from
R[x]
.

+:Fpk×FpkFpk,(j=0majxj,j=0mbjxj)j=0m(aj+bj)xj

The multiplication law of the prime field extension

Fpk is given by first multiplying the two polynomials

×:Fpk×FpkFpk,(j=0majxj,j=0mbjxj)n=02mi=0n(aibni)xnmodP

The neutral element of the additive group

(Fpk,+) is given by the zero polynomial 0.


Example:
For a field

Fp, an extension field is of the form
Fpk
.

An example is to study a binary extension field

Fpk where
p=2
.

In this example,

F2k has its elements represented a polynomials over the base field
F2
. A polynomial in
F2
is an expression where the coefficients come from the set
{0,1}
, and arithemetic operations are performed modulo 2.

The degree of the polynomial will be less than of equal to

k1.
Taking
k=3
, we can construct extension field
F23
by considering the polynomials of degree 2 over
F2
.
A primitive polynomial for
F23
would be
f(x)=x2+x+1
.

The elements are:

k > element in
F23

0,0,0 >
0
which is also the additive identity.
0,0,1 >
1
which is also a multiplicative identity.
0,1,0 >
x

0,1,1 >
x+1

1,0,0 >
x2

1,0,1 >
x2+1

1,1,0 >
x2+x

1,1,1 >
x2+x+1

addition and multiplication are performed modulo 2.

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Elliptic curve over prime field:

For a prime power

p>3 and
a,bFp
(where
4a3+27b20
a.k.a the degenerate case) let

E(Fp)={(x,y)Fp×Fpsuch that y2=x3+ax+b}

Pairings

within the development of SNARKs the use pairing-maps on commutative groups is a frequently used. A pairing map if a function that takes pairs of elements from the source field(s)

G1 and
G2
, and maps then to elements in a target field
GT
such that the blinearity property holds. i.e.,

Definition:

e(,):G1×G2GT

In other words, a pairing

e:G×GGT is a mapping of points in groups to points in another.

Bilinear in the fact that there is two eponents,

e(ga,gb)=e(g,g)ab
a,bZ,gG

maps generators to generators.

g generates
Ge(g,g)
generates
GT

the example (in reference to the above) is that the group

G is an elliptic curve, and the target group
GT
is a finite field.

GE(Fp),
GTE(Fpk)
, where k = 1,2,3,4,6,10,12

Note:

lets take a finite field under an elliptic curve and call this group

G which has
q
point in the gorup
E(Fp)=G

no lets take an extension

E(Fpk)[q] which can be thought of a elliptic curve over a 2-dimensional set of points.

Tate pairing:

e(P,Q)=fp(Q)(pk1)/q

the function

fp is a polynomial defined by the point
P
, which is a bivariat polynomial whose inputs are the two coordinated of the point
Q
. i.e., treat the coordinate
Q
as
(x,y)
.

In crypto we dont like to have such 2-dimensional fields, we prefer to use a ring. So we define two groups

G1 and
G2
that are non-degenerate, where
e:G1×G2=GT
, this is an asymetric pairing.