Tag Archives: Elliptic curve

Using TI Nspire to explore mathematics behind blockchain technology

The TI Nspire is a great tool for exploring mathematics through its calculation and graphing capability. One of the emerging technologies that is based on mathematics is blockchain. It gained popularity through bitcoin that caused much debate and controversy in the field of banking, economics and finance. Until recently more and more established research and technology firms started to look at it seriously and its underlying core technology, blockchain, is gaining momentum for being adopted by traditional financial institutions.

In a previous installment, the property of the Elliptic Curve is explored using TI Nspire. As shown in the dynamic graph below, the curve exhibit several properties that form the two basic operations of asymmetric encryption – point addition and point doubling – for public and private key pair generation.

ecanim

Using a=0, and b=7 as in Bitcoin, the two properties are basically illustrated in the following graphs.

Point Addition
blockchainecc1c

Point Doubling
blockchainecc2c2

However, in reality, the Elliptic Curve Digital Signature Algorithm (ECDSA) algorithm to generate public and private key relied also on another mathematical concept known as the finite field. This is basically a limit imposed on the numbers that are available for use in the calculation, and in this case, positive integers from a modulo calculation. The prime modulo for Bitcoin (as in secp256k1) is set to  2256 – 232 – 29 – 28 – 27 – 26 – 24 – 1. Having this in place, the graph will not look like the above but some scattered points on a fixed region, and overflows will wrap around. However, the symmetry will still be preserved and recognized visually on graph.

With this mathematical backed technology as the foundation, blockchain can provides open ledger for secure transaction service.

Advertisements

Exploring Elliptic Curve in TI Nspire

Elliptic curve is the core mathematical function in elliptic curve cryptography (ECC). By utilizing its properties over finite field, namely the discrete logarithm problem, ECC works in a way different from traditional public key system where the basis is built upon large prime numbers and factorization.

The equation for elliptic curve is in this form

y2 = x3 + a • x + b

which is known as Weierstrass equation. The plot with a = -1 and b = 1 is shown in the below graph.

ec1

As can be seen from the plot, the curve is symmetric over the X-axis. Taking another example with a=1 and b=1, and a prime field of GF(5) for the equation y2 = x3 + a • x + b, there are 9 points on the curve, namely

(0,1),(0,4),(2,1),(2,4),(3,1),(3,4),(4,3),(4,2),∞

and therefore the order or cardinality is 9.

Nspire Graph application can be utilized to dynamically visualize and explore the properties of this curve. With the help of two sliders controlling variable a and b, the shape of the curve can be manipulated in real time.

ecanim