Download and Install tinyec

This section describes how to install tinyec, which can be done by running the 'pip install tinyec' command.

Installing tinyec is easy. All you need to do is to run this command:

C:\herong> pip install tinyec
Collecting tinyec
Installing collected packages: tinyec
  Running install for tinyec ... done
Successfully installed tinyec-0.3.1

Let's verify the installation with the following Python script:

C:\herong> python

>>> import as ec
>>> import tinyec.registry as reg
>>> c = reg.get_curve("secp192r1")
>>> print(c)
"secp192r1" => y^2 = x^3 
   + 6277101735386680763835789423207666416083908700390324961276x 
   + 2455155546008943817740293915197451784769108058161191238065 
   (mod 6277101735386680763835789423207666416083908700390324961279)

>>> s = c.field
>>> print(s)
Subgroup => generator 
   order: 6277101735386680763835789423176059013767194773182842284081, 
   cofactor: 1 on Field => 
   prime 6277101735386680763835789423207666416083908700390324961279

Ok. tinyec is installed correctly. It supports the named curve of "secp192r1" with a single predefined subgroup.

Last update: 2019.

Table of Contents

 About This Book

 Geometric Introduction to Elliptic Curves

 Algebraic Introduction to Elliptic Curves

 Abelian Group and Elliptic Curves

 Discrete Logarithm Problem (DLP)

 Finite Fields

 Generators and Cyclic Subgroups

 Reduced Elliptic Curve Groups

 Elliptic Curve Subgroups

tinyec - Python Library for ECC

 What Is tinyec

Download and Install tinyec

 Build New Curves with tinyec

 Perform Point Addition with tinyec

 Find Subgroup with Point Addition

 Set Subgroup Order to Higher Value

 EC (Elliptic Curve) Key Pair

 ECDH (Elliptic Curve Diffie-Hellman) Key Exchange

 ECDSA (Elliptic Curve Digital Signature Algorithm)

 ECES (Elliptic Curve Encryption Scheme)



 Full Version in PDF/EPUB