All Projects → jedisct1 → aes-stream

jedisct1 / aes-stream

Licence: BSD-2-Clause license
A fast AES-PRF based secure random-number generator

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to aes-stream

Rijndael256
AES cryptographic library for .NET Framework and .NET Core
Stars: ✭ 33 (+120%)
Mutual labels:  aes, aes-256, aes-128
aesCbc
aes-cbc加密解密
Stars: ✭ 68 (+353.33%)
Mutual labels:  aes, aes-256, aes-128
stenc
SCSI Tape Encryption Manager - stenc (formerly on https://sourceforge.net/projects/stenc/)
Stars: ✭ 41 (+173.33%)
Mutual labels:  aes, aes-256, aes-128
FlashPaper
One-time encrypted password/secret sharing
Stars: ✭ 85 (+466.67%)
Mutual labels:  aes, aes-256
fastrand
10x faster than crypto/rand
Stars: ✭ 76 (+406.67%)
Mutual labels:  random, csprng
cryptalk
HTML5/Node.js based, client side (E2EE) encrypted instant chat
Stars: ✭ 73 (+386.67%)
Mutual labels:  aes, aes-256
Random compat
PHP 5.x support for random_bytes() and random_int()
Stars: ✭ 7,950 (+52900%)
Mutual labels:  random, csprng
openssl
A functions wrapping of OpenSSL library for symmetric and asymmetric encryption and decryption.
Stars: ✭ 199 (+1226.67%)
Mutual labels:  aes, aes-256
libVES.c
VESvault End-to-End Encryption API: Encrypt Everything Without Fear of Losing the Key
Stars: ✭ 28 (+86.67%)
Mutual labels:  aes, aes-256
Qml Snippet
some qml snippet.
Stars: ✭ 9 (-40%)
Mutual labels:  aes, random
Phoenix Ecto Encryption Example
🔐 A detailed example for how to encrypt data in a Phoenix (Elixir) App before inserting into a database using Ecto Types
Stars: ✭ 166 (+1006.67%)
Mutual labels:  aes
Ksprefs
🚀⚡ Kotlin SharedPreferences wrapper & cryptographic preferences android library.
Stars: ✭ 176 (+1073.33%)
Mutual labels:  aes
Privy
An easy, fast lib to correctly password-protect your data
Stars: ✭ 230 (+1433.33%)
Mutual labels:  aes
Laravel Database Encryption
A package for automatically encrypting and decrypting Eloquent attributes in Laravel 5.5+, based on configuration settings.
Stars: ✭ 238 (+1486.67%)
Mutual labels:  aes
Crypto Notepad
🔑 Simple notepad for Windows with encryption features
Stars: ✭ 160 (+966.67%)
Mutual labels:  aes
Qt Aes
Native Qt AES encryption class
Stars: ✭ 207 (+1280%)
Mutual labels:  aes
Practical Cryptography For Developers Book
Practical Cryptography for Developers: Hashes, MAC, Key Derivation, DHKE, Symmetric and Asymmetric Ciphers, Public Key Cryptosystems, RSA, Elliptic Curves, ECC, secp256k1, ECDH, ECIES, Digital Signatures, ECDSA, EdDSA
Stars: ✭ 2,400 (+15900%)
Mutual labels:  aes
Hltool
Go 开发常用工具库, Google2步验证客户端,AES加密解密,RSA加密解密,钉钉机器人,邮件发送,JWT生成解析,Log,BoltDB操作,图片操作,json操作,struct序列化
Stars: ✭ 151 (+906.67%)
Mutual labels:  aes
Encryption Algorithm
DES、AES、Present、Extended Euclidean Algorithm、Miller-Rabin( 常用密码学算法)推荐书籍《现代密码学趣味之旅》---彭长根
Stars: ✭ 140 (+833.33%)
Mutual labels:  aes
rainbow-bash-prompt
Make your bash prompt dynamically and randomly rainbow
Stars: ✭ 49 (+226.67%)
Mutual labels:  random

AES-STREAM

A simple, but fast AES-PRF-based random number generator.

Fast, designed to fill large buffers with random data. Does fast key erasure.

Requires a modern Intel or AMD CPU with AES-NI support.

API

Pretty straightforward:

#include "aes-stream.h"

#define AES_STREAM_SEEDBYTES 32

void aes_stream_init(aes_stream_state *st, const unsigned char seed[AES_STREAM_SEEDBYTES]);

void aes_stream(aes_stream_state *st, unsigned char *buf, size_t buf_len);

Call aes_stream_init() with a seed, then aes_stream() to fill buf with buf_len random bytes.

aes_stream() can be called indefinitely without having to reseed the generator.

Compilation

Do not forget to tell your compiler to enable support for AES opcodes with the -maes flag.

Recommended: -Ofast -maes -march=native

Clang 7 appears to produce faster code than gcc 8.

Key erasure is performed after every call to stream(). If you are dealing with many short keys, implement a pool on top of this.

Uses AES-128 by default. Define AES_STREAM_ROUNDS=14 in order to use AES-256 instead.

References

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].