Skip to content

Commit

Permalink
update doc (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
kigawas authored Dec 13, 2020
1 parent bbdfa0e commit f5cf533
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Weiliang Li
Copyright (c) 2019-2020 Weiliang Li

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# eciespy

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/2a11aeb9939244019d2c64bce3ff3c4e)](https://www.codacy.com/app/ecies/py)
[![CI](https://img.shields.io/circleci/project/github/ecies/py.svg)](https://circleci.com/gh/ecies/py)
[![CI](https://img.shields.io/github/workflow/status/ecies/py/Build)](https://github.com/ecies/py/actions)
[![Codecov](https://img.shields.io/codecov/c/github/ecies/py.svg)](https://codecov.io/gh/ecies/py)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/eciespy.svg)](https://pypi.org/project/eciespy/)
[![PyPI](https://img.shields.io/pypi/v/eciespy.svg)](https://pypi.org/project/eciespy/)
Expand All @@ -14,8 +14,9 @@ Other language versions:
- [Rust](https://github.com/ecies/rs)
- [TypeScript](https://github.com/ecies/js)
- [Golang](https://github.com/ecies/go)
- [WASM](https://github.com/ecies/rs-wasm)

You can also check a fastapi web backend demo [here](https://github.com/kigawas/eciespy-demo).
You can also check a FastAPI web backend demo [here](https://github.com/kigawas/eciespy-demo).

## Install

Expand Down Expand Up @@ -114,7 +115,9 @@ This library combines `secp256k1` and `AES-256-GCM` (powered by [`coincurve`](ht

1. Use [ECDH](https://en.wikipedia.org/wiki/Elliptic-curve_Diffie–Hellman) to exchange an AES session key;

> Notice that the sender public key is generated every time when `ecies.encrypt` is invoked, thus, the AES session key varies.
> Notice that the sender public key is generated every time when `ecies.encrypt` is invoked, thus, the AES session key varies.
>
> We are using HKDF-SHA256 instead of SHA256 to derive the AES keys.
2. Use this AES session key to encrypt/decrypt the data under `AES-256-GCM`.

Expand All @@ -134,7 +137,7 @@ Basically the encrypted data will be like this:

### Secp256k1

#### Glance at ecdh
#### Glance at ECDH

So, **how** do we calculate the ECDH key under `secp256k1`? If you use a library like [`coincurve`](https://github.com/ofek/coincurve), you might just simply call `k1.ecdh(k2.public_key.format())`, then uh-huh, you got it! Let's see how to do it in simple Python snippets:

Expand Down Expand Up @@ -248,13 +251,11 @@ b'helloworld'
## Release Notes

### 0.3.1 ~ 0.3.8
### 0.3.1 ~ 0.3.9

- Support Python 3.8, 3.9
- Support Python 3.8, 3.9 and phase out 3.5
- Bump dependencies
- Update documentation
- Poetry
- Phase out Python 3.5

### 0.3.0

Expand Down

0 comments on commit f5cf533

Please sign in to comment.