Skip to content

Commit 86718ad

Browse files
authored
Merge pull request #218 from tomato42/readme-refresh
refresh readme contents
2 parents 4fca61f + 4230f0f commit 86718ad

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

README.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Pure-Python ECDSA
1+
# Pure-Python ECDSA and ECDH
22

33
[![build status](https://travis-ci.org/warner/python-ecdsa.png)](http://travis-ci.org/warner/python-ecdsa)
44
[![Coverage Status](https://coveralls.io/repos/warner/python-ecdsa/badge.svg)](https://coveralls.io/r/warner/python-ecdsa)
@@ -7,16 +7,19 @@
77
![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat)
88

99

10-
This is an easy-to-use implementation of ECDSA cryptography (Elliptic Curve
11-
Digital Signature Algorithm), implemented purely in Python, released under
10+
This is an easy-to-use implementation of ECC (Elliptic Curve Cryptography)
11+
with support for ECDSA (Elliptic Curve Digital Signature Algorithm) and ECDH
12+
(Elliptic Curve Diffie-Hellman), implemented purely in Python, released under
1213
the MIT license. With this library, you can quickly create keypairs (signing
13-
key and verifying key), sign messages, and verify the signatures. The keys
14-
and signatures are very short, making them easy to handle and incorporate
15-
into other protocols.
14+
key and verifying key), sign messages, and verify the signatures. You can
15+
also agree on a shared secret key based on exchanged public keys.
16+
The keys and signatures are very short, making them easy to handle and
17+
incorporate into other protocols.
1618

1719
## Features
1820

19-
This library provides key generation, signing, and verifying, for five
21+
This library provides key generation, signing, verifying, and shared secret
22+
derivation for five
2023
popular NIST "Suite B" GF(p) (_prime field_) curves, with key lengths of 192,
2124
224, 256, 384, and 521 bits. The "short names" for these curves, as known by
2225
the OpenSSL tool (`openssl ecparam -list_curves`), are: `prime192v1`,
@@ -68,12 +71,14 @@ pip install ecdsa[gmpy]
6871
## Speed
6972

7073
The following table shows how long this library takes to generate keypairs
71-
(`keygen`), to sign data (`sign`), and to verify those signatures (`verify`).
74+
(`keygen`), to sign data (`sign`), to verify those signatures (`verify`),
75+
and to derive a shared secret (`ecdh`).
7276
All those values are in seconds.
7377
For convenience, the inverses of those values are also provided:
7478
how many keys per second can be generated (`keygen/s`), how many signatures
75-
can be made per second (`sign/s`) and how many signatures can be verified
76-
per second (`verify/s`). The size of raw signature (generally the smallest
79+
can be made per second (`sign/s`), how many signatures can be verified
80+
per second (`verify/s`), and how many shared secrets can be derived per second
81+
(`ecdh/s`). The size in bytes of a raw signature (generally the smallest
7782
way a signature can be encoded) is also provided in the `siglen` column.
7883
Use `tox -e speed` to generate this table on your own computer.
7984
On an Intel Core i7 4790K @ 4.0GHz I'm getting the following performance:
@@ -186,9 +191,9 @@ following lengths (in bytes):
186191
In 2006, Peter Pearson announced his pure-python implementation of ECDSA in a
187192
[message to sci.crypt][1], available from his [download site][2]. In 2010,
188193
Brian Warner wrote a wrapper around this code, to make it a bit easier and
189-
safer to use. Hubert Kario then included an implementation of elliptic curve
190-
cryptography that uses Jacobian coordinates internally, improving performance
191-
about 20-fold. You are looking at the README for this wrapper.
194+
safer to use. In 2020, Hubert Kario included an implementation of elliptic
195+
curve cryptography that uses Jacobian coordinates internally, improving
196+
performance about 20-fold. You are looking at the README for this wrapper.
192197

193198
[1]: http://www.derkeiler.com/Newsgroups/sci.crypt/2006-01/msg00651.html
194199
[2]: http://webpages.charter.net/curryfans/peter/downloads.html
@@ -580,7 +585,7 @@ vk = VerifyingKey.from_string(bytearray.fromhex(comp_str), curve=NIST256p)
580585
print(vk.to_string("uncompressed").hex())
581586
```
582587

583-
ECDH key exchange with remote party
588+
ECDH key exchange with remote party:
584589

585590
```python
586591
from ecdsa import ECDH, NIST256p

0 commit comments

Comments
 (0)