Thanks to visit codestin.com
Credit goes to github.com

Skip to content

crunchdao/crunch-encrypt

Repository files navigation

Crunch Encrypt Tool

PyTest

This Python library is designed for the CrunchDAO Platform, exposing the encryption tools in a very small CLI.

Installation

Use pip to install the crunch-encrypt.

pip install --upgrade crunch-encrypt

Usage for ECIES

This encryption requires two keys:

  • a private key for decryption
  • and a public key for encryption.

An ephemeral key is also derived from the public key for each file. In order for the file to be decrypted, this ephemeral key must be provided.

Generate a Key Pair

crunch-encrypt ecies key-pair

Encrypt a file

crunch-encrypt ecies encrypt hello.txt hello.txt.enc

Tip

To generate a dummy file, do the following:

echo 'Hello World!' > hello.txt

Decrypt a file

crunch-encrypt ecies decrypt hello.txt.enc hello.txt.dec

Tip

Use the diff tool to validate the decryption:

diff hello.txt hello.txt.dec

Contributing

Pull requests are always welcome! If you find any issues or have suggestions for improvements, please feel free to submit a pull request or open an issue in the GitHub repository.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published