0.0.6 • Published 10 months ago

jazz-crypto-rs v0.0.6

Weekly downloads
-
License
-
Repository
-
Last release
10 months ago

Jazz Crypto RS

A Rust implementation of cryptographic primitives for the Jazz project, compiled to WebAssembly.

Module Structure

The codebase is organized into the following modules:

src
├── crypto
│   ├── ed25519.rs // Ed25519 functions for signing and verification
│   ├── encrypt.rs // High-level encryption functions
│   ├── seal.rs // High-level sealing and unsealing functions
│   ├── sign.rs // High-level signing and verification functions
│   ├── x25519.rs // X25519 key exchange
│   └── xsalsa20.rs // XSalsa20 and XSalsa20-Poly1305 encryption
├── error.rs // Error types for cryptographic operations
├── hash
│   └── blake3.rs // BLAKE3 hashing functionality
└── lib.rs // Main entry point for the library

Features

  • Ed25519 signing and verification
  • X25519 key exchange
  • XSalsa20 and XSalsa20-Poly1305 encryption
  • BLAKE3 hashing with incremental state updates
  • Secure nonce generation
  • WebAssembly bindings for all operations

Usage

The library exposes WebAssembly-compatible functions for all cryptographic operations. See the individual module files for detailed documentation of available functions.

Installation

Get a working Rust environment (rustup).

rustup install stable
rustup default stable

Install wasm-pack.

Then add wasm target to your toolchain:

rustup target add wasm32-unknown-unknown

Build

wasm-pack build --target web

Development

Install the rust-analyzer extension to get Rust support in VSCode. rust-analyzer expects a Cargo.toml file in the root of the project, so configure the workspace setting with the root directory of the project:

// .vscode/settings.json
{
  "rust-analyzer.linkedProjects": [
    "wasm/Cargo.toml"
  ]
}

Test

Test both Rust source code and Node.js' build.

pnpm test
0.0.6

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1-rc.6

10 months ago

0.0.1-rc.5

10 months ago

0.0.1-rc.4

11 months ago

0.0.1-rc.3

11 months ago

0.0.1-rc.2

11 months ago

0.0.1-rc.1

11 months ago

0.0.1

11 months ago

0.0.0

11 months ago