Elliptic Curve Cryptography: a gentle introduction

来源:互联网 发布:matlab提取矩阵一部分 编辑:程序博客网 时间:2024/06/05 09:00

Those of you who know what public-key cryptography is may have already heard ofECC, ECDH or ECDSA. The first is an acronym for Elliptic Curve Cryptography, the others are names for algorithms based on it.

Today, we can find elliptic curves cryptosystems in TLS, PGP andSSH, which are just three of the main technologies on which the modern web and IT world are based. Not to mentionBitcoin and other cryptocurrencies.

Before ECC become popular, almost all public-key algorithms were based on RSA and DSA, alternative cryptosystems based on prime number factorization. RSA and friends are still very important today, and often are used alongside ECC. However, while the magic behind RSA and friends can be easily explained, is widely understood, and rough implementations can be written quite easily, the foundations of ECC are still a mystery to most.

With a series of blog posts I’m going to give you a gentle introduction to the world of elliptic curve cryptography. My aim is not to provide a complete and detailed guide to ECC (the web is full of information on the subject), but to providea simple overview of what ECC is and why it is considered secure, without losing time on long mathematical proofs or boring implementation details. I will also givehelpful examples together with visual interactive tools and scripts to play with.

Specifically, here are the topics I’ll touch:

  1. Elliptic curves over real numbers and the group law (covered in this blog post)
  2. Elliptic curves over finite fields and the discrete logarithm problem
  3. Key pair generation and two ECC algorithms: ECDH and ECDSA
  4. Algorithms for breaking ECC security, and a comparison with RSA

In order to understand what’s written here, you’ll need to know some basic stuff of set theory, geometry and modular arithmetic, and have familiarity with symmetric and asymmetric cryptography. Lastly, you need to have a clear idea of what an “easy” problem is, what a “hard” problem is, and their roles in cryptography.

Ready? Let’s start!

Elliptic Curves

First of all: what is an elliptic curve? Wolfram MathWorld gives an excellent and completedefinition. But for our aims, an elliptic curve will simply bethe set of points described by the equation:

y^2 = x^3 + ax + b

where 4a3 + 27b2 ≠ 0 (this is required to excludesingular curves). The equation above is what is called Weierstrass normal form for elliptic curves.

Different shapes for different elliptic curvesDifferent shapes for different elliptic curves (b = 1, a varying from 2 to -3).Types of singularitiesTypes of singularities: on the left, a curve with a cusp (y2 =x3). On the right, a curve with a self-intersection (y2 =x3 – 3x + 2). None of them is a valid elliptic curve.

Depending on the value of a and b, elliptic curves may assume different shapes on the plane. As it can be easily seen and verified, elliptic curves are symmetric about thex-axis.

For our aims, we will also need a point at infinity (also known as ideal point) to be part of our curve. From now on, we will denote our point at infinity with the symbol 0 (zero).

If we want to explicitly take into account the point at infinity, we can refine our definition of elliptic curve as follows:

\left\{ (x, y) \in \mathbb{R}^2\ |\ y^2 = x^3 + ax + b,\ 4 a^3 + 27 b^2 \ne 0 \right\}\ \cup\ \left\{ 0 \right\}

Groups

A group in mathematics is a set for which we have defined a binary operation that we call “addition” and indicate with the symbol +. In order for the set

0 0
原创粉丝点击