Elliptic Curve Integrated Encryption Scheme for secp256k1 in Rust, based on pure Rust implementation of...

Elliptic Curve Integrated Encryption Scheme for secp256k1 in Rust, based on eciespy

eciesrs

Elliptic Curve Integrated Encryption Scheme for secp256k1 in Rust, based on pure Rust implementation of secp256k1.

ECIES functionalities are built upon AES-GCM-256 and HKDF-SHA256.

This is the Rust version of eciespy.

This library can be compiled to the WASM target at your option, see WASM compatibility.

Quick Start

Optional pure Rust AES backend

You can choose to use OpenSSL implementation or pure Rust implementation of AES-256-GCM:

Due to some performance problem, OpenSSL is the default backend.

Pure Rust implementation is sometimes useful, such as building on WASM:

If you select the pure Rust backend on modern CPUs, consider building with

to speed up AES encryption/decryption. This would be no longer necessary when aes-gcm supports automatic CPU detection.

WASM compatibility

It's also possible to build to the wasm32-unknown-unknown target with the pure Rust backend. Check out this repo for more details.

Security

Why AES-GCM-256 and HKDF-SHA256

AEAD scheme like AES-GCM-256 should be your first option for symmetric ciphers, with unique IVs in each encryption.

For key derivation functions on shared points between two asymmetric keys, HKDFs are proven to be more secure than simple hash functions like SHA256.

Cross-language compatibility

All functionalities are mutually checked among different languages: Python, Rust, JavaScript and Golang.

Security audit

Following dependencies are audited:

  • aes-gcm
  • OpenSSL

Benchmark

The result shows that the pure Rust backend is around 20% ~ 50% slower compared to OpenSSL on MacBook Pro mid-2015 (2.8 GHz Quad-Core Intel Core i7).

OpenSSL backend

Pure Rust backend

Release Notes

0.2.2

  • Bump dependencies
  • Migrate to edition 2021

0.2.1

  • Revamp error handling

0.2.0

  • Revamp documentation
  • Optional pure Rust AES backend
  • WASM compatibility

0.1.1 ~ 0.1.5

  • Bump dependencies
  • Update documentation
  • Fix error handling

0.1.0

  • First beta version release
Issues

Collection of the latest Issues

yeti-g

yeti-g

enhancement
2

It would be very nice to support environments without standard library. Embedded devices like target=thumbv6m-none-eabi need no_std

Versions

Find the latest versions by id

v0.2.2 - Nov 23, 2021

  • Bump dependencies
  • Migrate to edition 2021

v0.2.1 - Jan 14, 2021

  • Revamp error handling

v0.2.0 - Dec 09, 2020

  • Revamp documentation
  • Optional pure Rust AES backend
  • WASM compatibility

v0.1.5 - Dec 04, 2020

  • Bump dependencies
  • Update documentation

v0.1.4 - Mar 25, 2020

  • Bump dependencies

v0.1.3 - Feb 08, 2020

  • Fix error handling

v0.1.2 - Dec 25, 2019

  • Bump dependencies
  • Update documentation

v0.1.1 - Dec 25, 2019

v0.1.0 - Dec 25, 2019

Information - Updated May 25, 2022

Stars: 15
Forks: 18
Issues: 1

Repositories & Extras

Now available on stable Rust at crates

0 and above use stable Rust

Now available on stable Rust at crates

cargo-cov: Source coverage for Rust

cargo-cov is a cargo subcommand which performs source coverage collection and reporting for Rust crates

cargo-cov: Source coverage for Rust

Interledger implementation in Rust :money_with_wings:

All crates require Rust 2018 edition and are tested on the following channels:

Interledger implementation in Rust :money_with_wings:

cargo-raze: Bazel BUILD generation for Rust Crates

An experimental support Cargo plugin for distilling a workspace-level

cargo-raze: Bazel BUILD generation for Rust Crates

Rust bindings for plthook

This crates provides Rust bindings for the API documentation and the description in the

Rust bindings for plthook

This repository holds a Rust port of Google's Tink cryptography library

This repository holds a Rust port of Google's RustCrypto crates – this repo focuses on making

This repository holds a Rust port of Google's Tink cryptography library

rust crates for parsing stuff

Tokenizers for math expressions, splitting text, lexing lisp-like stuff, etc

rust crates for parsing stuff

cargo rssc - Rust scripts for crates building

will copy the template_basic into scripts_rssc folder

cargo rssc - Rust scripts for crates building

rust-semverver is a tool to check semver-compliance in Rust library crates

the tool has been developed as a student project during the Google Summer of Code 2017

rust-semverver is a tool to check semver-compliance in Rust library crates

Rust crates for working with healthchecks

io pinging and management APIs

Rust crates for working with healthchecks
Facebook Instagram Twitter GitHub Dribbble
Privacy