https://github.com/scroll-tech/ecies-rs
https://github.com/scroll-tech/ecies-rs
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/scroll-tech/ecies-rs
- Owner: scroll-tech
- License: mit
- Created: 2025-08-06T07:28:37.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2025-08-20T13:36:13.000Z (5 months ago)
- Last Synced: 2025-09-05T13:59:47.578Z (4 months ago)
- Language: Rust
- Size: 151 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ecies-rs
Elliptic Curve Integrated Encryption Scheme for secp256k1, written in Rust with **minimal** dependencies.
This is the Rust version of [ecies/py](https://github.com/ecies/py) with a built-in class-like secp256k1 API,
you may go there for detailed documentation of the mechanism under the hood.
## Install
`cargo add --git https://github.com/scroll-tech/ecies-rs`
## Quick Start
```rust
fn main() {
let secret_key = ecies::SecretKey::random(&mut rand::rng());
let public_key = secret_key.public_key();
let mut ciphertext = public_key.encrypt(b"THIS IS THE TEST");
let plaintext = secret_key.decrypt_in_place(&mut ciphertext);
assert_eq!(plaintext, b"THIS IS THE TEST");
}
```