Fast(er) AES-based constructions for WebAssembly and Rust.

Overview

Docs.rs crates.io

Fast(er) AES-based constructions for Rust and WebAssembly

  • AEGIS-128L
  • AEGIS-256
  • AES-128-CTR
  • AES-256-CTR
  • AES-128-OCB
  • AES-256-OCB
  • AES-128-GCM
  • AES-256-GCM
  • CMAC-AES-128

This is a set of AES-based constructions (AEAD, stream cipher, MAC) for WebAssembly applications written in Rust.

They are trivial to use and this crate has zero dependencies.

Benchmarks

Benchmarks can be run with the cargo wasi bench command.

Performance results using Wasmtime 9.0.1 on Apple M1

algorithm crate throughput
aes256-gcm (aes crate) 49.63 M/s
aes256-gcm this crate 112.81 M/s
aes128-gcm (aes crate) 59.87 M/s
aes128-gcm this crate 112.24 M/s
aes256-ocb this crate 168.43 M/s
aes128-ocb this crate 215.23 M/s
aegis-256 this crate 478.57 M/s
aegis-128l (aegis crate) 62.84 M/s
aegis-128l this crate 695.85 M/s
aes128-ctr (ctr crate) 104.63 M/s
aes128-ctr this crate 214.81 M/s
cmac-aes128 (cmac crate) 53.99 M/s
cmac-aes128 this crate 233.34 M/s

Performance results using Wasmtime 9.0.1 on Ryzen 7

algorithm crate throughput
aes256-gcm (aes crate) 63.79 M/s
aes256-gcm this crate 149.01 M/s
aes128-gcm (aes crate) 75.09 M/s
aes128-gcm this crate 149.31 M/s
aes256-ocb this crate 200.93 M/s
aes128-ocb this crate 260.56 M/s
aegis-256 this crate 497.97 M/s
aegis-128l (aegis crate) 73.15 M/s
aegis-128l this crate 696.61 M/s
aes128-ctr (ctr crate) 151.26 M/s
aes128-ctr this crate 275.51 M/s
cmac-aes128 (cmac crate) 78.63 M/s
cmac-aes128 this crate 260.23 M/s
You might also like...
🥷🩸 Madara is a ⚡ blazing fast ⚡ Starknet sequencer, based on substrate, powered by Rust 🦀
🥷🩸 Madara is a ⚡ blazing fast ⚡ Starknet sequencer, based on substrate, powered by Rust 🦀

Report a Bug - Request a Feature - Ask a Question ⚡ Madara: Starknet Sequencer on Substrate 🦀 Welcome to Madara, a blazing fast ⚡ Starknet sequencer

A Secure Capability-Based Runtime for JavaScript Based on Deno
A Secure Capability-Based Runtime for JavaScript Based on Deno

Secure Runtime secure-runtime, as the name implies, is a secure runtime for JavaScript, designed for the multi-tenant serverless environment. It is an

Fast and efficient ed25519 signing and verification in Rust.
Fast and efficient ed25519 signing and verification in Rust.

ed25519-dalek Fast and efficient Rust implementation of ed25519 key generation, signing, and verification in Rust. Documentation Documentation is avai

A fast, simple and powerful open-source cross platform utility tool for generating strong, unique and random passwords

password-generator-pro A fast, simple and powerful open-source cross platform utility tool for generating strong, unique and random passwords. Feature

Selendra is a multichains interoperable nominated Proof-of-Stake network for developing and running Substrate-based and EVM compatible blockchain applications.

Selendra An interoperable nominated Proof-of-Stake network for developing and running Substrate-based and EVM compatible blockchain applications. Read

An extensible and practical demonstration of constructing evm-based sandwich attacks built with ethers-rs and Huff language.
An extensible and practical demonstration of constructing evm-based sandwich attacks built with ethers-rs and Huff language.

subway-rs • Construct evm-based sandwich attacks using Rust and Huff. Getting Started subway-rs is a port of libevm's original subway, implemented wit

Built on the Substrate-based runtime, this repository develops the Paralink Network, a cross-chain Oracle platform for secure and scalable data integration. Our goal is to create a robust infrastructure that ensures efficient and reliable data transmission across blockchain networks.
Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.

foundry Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust. Foundry consists of: Forge: Ethe

A lightning-fast password generator and manager written in Rust
A lightning-fast password generator and manager written in Rust

Passlane A lightning-fast password manager for the command line Features Generate passwords Place the generated password into the clipboard Save previ

Owner
Frank Denis
Get my public keys here: https://sk.tl/7CPRo8kn
Frank Denis
A young, simple and naive file crypto lib based on AES.

naive-file-crypto A young, simple and naive file crypto lib based on AES. The MAC implementation is not standard GCM, so it may be vulnerable. All cpu

DF_XYZ 1 Jan 16, 2022
A blazingly fast, ShareX uploader coded in Rust (using actix web) which utilizes AES-256-GCM-SIV to securely store uploaded content.

Magnesium Oxide ❔ What is this? Magnesium-Oxide (MGO) is a secure file uploader with support for ShareX. ?? Features ?? Blazingly fast uploads and enc

Nitrogen Development 26 Nov 25, 2022
A simple and secure rust command-line tool to protect your text by encrypting and decrypting it using the robust AES-256 algorithm.

Secret Keeper A simple and secure command-line tool to protect your text by encrypting and decrypting it using the robust AES-256 algorithm. Built wit

Kunal Bagaria 9 May 11, 2023
🔐 UPLINK is a Rust lightweight (2MB) tool for file transfer and remote management that uses AES-GCM and Envelope Encryption over WebSockets.

UPLINK ░▒▓█▓▒░░▒▓█▓▒░▒▓███████▓▒░░▒▓█▓▒░ ░▒▓█▓▒░▒▓███████▓▒░░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█

Krystian Bajno 5 Sep 28, 2024
A simple key-value store with a log-structured, append-only storage architecture where data is encrypted with AES GCM.

akvdb A simple key-value store with a log-structured, append-only storage architecture where data is encrypted with AES GCM. Modified from the actionk

Olle W 3 Oct 10, 2022
A simple to use, cross-platform aes encryption

About Project End to End encryption (AES) for multiple languages (cross-platform) with CBC Icon Item ?? Upcoming ⚖️ License ?? ChangeLog Usage (rust)

Zot Cryptography 2 Dec 15, 2022
miners is a fast Rust library for the Maximal Information-based Nonparametric Exploration (MIC and MINE family)

miners miners is a fast Rust library for the Maximal Information-based Nonparametric Exploration (MIC and MINE family). miners using rayon and vectori

CuteSocks 7 Nov 2, 2023
WebAssembly wrapper of the rage encryption library

rage-wasm: WebAssembly wrapper of rage rage is a simple, modern, and secure file encryption tool, using the age format. It features small explicit key

Kan-Ru Chen 35 Dec 16, 2022
computed data's hash by webAssembly

wasm-hasher computed data's hash by webAssembly support md5,sha1,sha2-224,sha2-356,sha2-384,sha2-512,sha3-224,sha3-256,sha3-384,sha3-512,china-sm3 typ

fuyoo 2 Oct 13, 2022
evm2near compiles Solidity contracts into NEAR WebAssembly contracts.

EVM → NEAR evm2near is a project for compiling EVM bytecode into wasm bytecode, with the particular goal of having that wasm artifact be executable on

Aurora 125 Dec 3, 2022