You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Elliptic Curve Integrated Encryption Scheme for secp256k1 in Rust, based on [pureRust implementation](https://github.com/paritytech/libsecp256k1) of secp256k1.
10
+
Elliptic Curve Integrated Encryption Scheme for secp256k1/x25519 in Rust, based on pure-Rust secp256k1/x25519 implementation.
11
11
12
-
ECIES functionalities are built upon AES-256-GCM and HKDF-SHA256.
12
+
ECIES functionalities are built upon AES-256-GCM/XChaCha20-Poly1305 and HKDF-SHA256.
13
13
14
14
This is the Rust version of [eciespy](https://github.com/ecies/py).
15
15
@@ -40,6 +40,14 @@ assert_eq!(
40
40
);
41
41
```
42
42
43
+
## Optional x25519 Support
44
+
45
+
You can choose to use x25519 (key exchange function on curve25519) instead of secp256k1:
to speed up AES encryption/decryption. This would be no longer necessary when [`aes-gcm` supports automatic CPU detection](https://github.com/RustCrypto/AEADs/issues/243#issuecomment-738821935).
73
+
It can speed up AES encryption/decryption. This would be no longer necessary when [`aes-gcm` supports automatic CPU detection](https://github.com/RustCrypto/AEADs/issues/243#issuecomment-738821935).
74
+
75
+
On ARM CPUs, consider building with
76
+
77
+
```bash
78
+
RUSTFLAGS="--cfg aes_armv8"# Rust 1.61+
79
+
```
66
80
67
81
## WASM compatibility
68
82
69
-
It's also possible to build to the `wasm32-unknown-unknown` target with the pure Rust backend. Check out [this repo](https://github.com/ecies/rs-wasm) for more details.
83
+
It's also possible to build to the `wasm32-unknown-unknown` target (or `wasm32-wasip2`) with the pure Rust backend. Check out [this repo](https://github.com/ecies/rs-wasm) for more details.
70
84
71
85
## Configuration
72
86
@@ -82,6 +96,8 @@ You can also enable a pure Rust [XChaCha20-Poly1305](https://github.com/RustCryp
let sk2 = decode_hex("0000000000000000000000000000000000000000000000000000000000000002");
119
+
let encrypted = decode_hex("0x04e314abc14398e07974cd50221b682ed5f0629e977345fc03e2047208ee6e279ffb2a6942878d3798c968d89e59c999e082b0598d1b641968c48c8d47c570210d0ab1ade95eeca1080c45366562f9983faa423ee3fd3260757053d5843c5f453e1ee6bb955c8e5d4aee8572139357a091909357a8931b");
0 commit comments