Skip to content

Commit

Permalink
Revamp doc (#51)
Browse files Browse the repository at this point in the history
* vscode setting

* revamp doc
  • Loading branch information
kigawas authored Dec 9, 2020
1 parent 3562bd1 commit d29597e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"spellright.language": ["en"],
"spellright.documentTypes": ["markdown", "latex", "plaintext", "rust"],
"spellright.documentTypes": ["markdown", "latex", "plaintext", "rust", "toml"],
"rust-analyzer.cargo.features": ["pure"],
"rust-analyzer.cargo.noDefaultFeatures": true,
"rust-analyzer.procMacro.enable": true,
Expand Down
3 changes: 3 additions & 0 deletions .vscode/spellright.dict
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ sandybridge
ssse
bindgen
NONINFRINGEMENT
md
typenum
rs
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ ECIES functionalities are built upon AES-GCM-256 and HKDF-SHA256.

This is the Rust version of [eciespy](https://github.com/ecies/py).

This library can be compiled to the WASM target at your option, see [WASM compatibility](#wasm-compatibility).

## Quick Start

```rust
Expand Down Expand Up @@ -44,11 +46,17 @@ Pure Rust implementation is sometimes useful, such as building on WASM:
cargo build --no-default-features --features pure --target=wasm32-unknown-unknown
```

If you select the pure Rust backend on modern CPUs, consider building with `RUSTFLAGS="-Ctarget-cpu=sandybridge -Ctarget-feature=+aes,+sse2,+sse4.1,+ssse3"` to speed up AES encryption/decryption. This would be no longer necessary when `aes-gcm` supports automatic CPU detection.
If you select the pure Rust backend on modern CPUs, consider building with

```bash
RUSTFLAGS="-Ctarget-cpu=sandybridge -Ctarget-feature=+aes,+sse2,+sse4.1,+ssse3"
```

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).

## WASM compatibility

It's also possible to build on the `wasm32-unknown-unknown` target with the pure Rust backend. Check out [this repo](https://github.com/ecies/rs-wasm) for more details.
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.

## Security notes

Expand All @@ -75,7 +83,7 @@ Following dependencies are audited:

- Revamp documentations
- Optional pure Rust AES backend
- WASM support
- WASM compatibility

### 0.1.1 ~ 0.1.5

Expand Down
12 changes: 10 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
//!
//! This is the Rust version of [eciespy](https://github.com/ecies/py).
//!
//! This library can be compiled to the WASM target at your option, see [WASM compatibility](#wasm-compatibility).
//!
//! # Quick Start
//!
//! ```rust
Expand Down Expand Up @@ -36,11 +38,17 @@
//! cargo build --no-default-features --features pure --target=wasm32-unknown-unknown
//! ```
//!
//! If you select the pure Rust backend on modern CPUs, consider building with `RUSTFLAGS="-Ctarget-cpu=sandybridge -Ctarget-feature=+aes,+sse2,+sse4.1,+ssse3"` to speed up AES encryption/decryption. This would be no longer necessary when `aes-gcm` supports automatic CPU detection.
//! If you select the pure Rust backend on modern CPUs, consider building with
//!
//! ```bash
//! RUSTFLAGS="-Ctarget-cpu=sandybridge -Ctarget-feature=+aes,+sse2,+sse4.1,+ssse3"
//! ```
//!
//! 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).
//!
//! # WASM compatibility
//!
//! It's also possible to build on the `wasm32-unknown-unknown` target with the pure Rust backend. Check out [this repo](https://github.com/ecies/rs-wasm) for more details.
//! 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.
pub use secp256k1::{util::FULL_PUBLIC_KEY_SIZE, Error as SecpError, PublicKey, SecretKey};

Expand Down

0 comments on commit d29597e

Please sign in to comment.