Curva - ECIES based on AES and HKDF
Repos: http://github.com/origamizyt/curva
Simple library for Elliptic-Curve Integrated Encryption Scheme with Rijndael and Hmac-based Key Deriviation Function.
Replacement for blowcurve since blowfish is deprecated now.
Installation
This module uses ecdsa and PyCryptodome module as backend. No DLLs are needed.
This module is avaiable on PyPI:
$ pip install curva
Or you can download the source .tar.gz and execute setup.py manually:
$ python setup.py install
Usage
This module exposes interfaces for key agreement, signatures and encryptions.
Use class curva.Curva to access all interfaces:
>>> c1 = Curva() # create instance, generate keys
>>> c2 = Curva()
Use its export / exportHex method to export local public key, and load / loadHex method to load remote public key:
>>> c1.load(c2.export()) # bytes
>>> c2.loadHex(c1.exportHex()) # hex string
After exchanging public keys, a shared secret can now be established:
>>> c1.secret() == c2.secret() # shared secret (bytes)
True
Use the sign / verify method to create signatures and verify them:
>>> data = b'data'
>>> signature = c1.sign(data)
>>> c2.verify(data, signature)
True
>>> c2.verify(b'attack!', signature)
False
Use the encrypt / decrypt method to encrypt / decrypt data:
>>> data = b'data'
>>> encrypted = c1.encrypt(data)
>>> c2.decrypt(encrypted)
b'data'
Metadata
Release files for curva 1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| curva-1.1.tar.gz | 4.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| curva-1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.9 kB
Release files / curva-1.1.tar.gz
| Download URL | curva-1.1.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1d92ba53f0e512b3148c3cd3212842f608886d21b6248fafc729607a798b3b97
|
|
BLAKE2b-256 checksum How to use checksums |
378716e56a4c3bab5e745e5404d34dabb1a963af823887a6de2504883e2b224b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5
|
Release files / curva-1.1-py3-none-any.whl
| Download URL | curva-1.1-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
775a0d1ed673b6584578c73beedaed0f25d593e28d716c3e3c6ec868a4f4c977
|
|
BLAKE2b-256 checksum How to use checksums |
15fa1de514c9852558e3bab4978c3251c786fd22ef64526cc3db08a194eedb15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5
|