All Projects → bashtage → randomgen

bashtage / randomgen

Licence: other
Numpy-compatible bit generators and add some random variate distributions missing from NumPy.

Programming Languages

c
50402 projects - #5 most used programming language
python
139335 projects - #7 most used programming language
C++
36643 projects - #6 most used programming language
cython
566 projects

Projects that are alternatives of or similar to randomgen

RNG
A simple state-of-the-art C++ random number generator
Stars: ✭ 19 (-76.83%)
Mutual labels:  prng, rng, random-number-generators, xoroshiro
prvhash
PRVHASH - Pseudo-Random-Value Hash. Hash functions, PRNG with unlimited period, randomness extractor. (Codename Gradilac/Градилак)
Stars: ✭ 194 (+136.59%)
Mutual labels:  prng, random-number-generators
rust-zipf
Rust implementation of a fast, bounded, Zipf-distributed random number generator
Stars: ✭ 24 (-70.73%)
Mutual labels:  random-number-generators, random-number-distributions
secrets.clj
A library designed to generate cryptographically strong random numbers.
Stars: ✭ 64 (-21.95%)
Mutual labels:  prng, rng
Jh flutter demo
a flutter demo
Stars: ✭ 229 (+179.27%)
Mutual labels:  aes
Securedefaults
A lightweight wrapper over UserDefaults/NSUserDefaults with an additional layer of AES-256 encryption
Stars: ✭ 179 (+118.29%)
Mutual labels:  aes
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 (+102.44%)
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 (+2826.83%)
Mutual labels:  aes
jsrand
A seeded pseudo-random number generator for JavaScript.
Stars: ✭ 19 (-76.83%)
Mutual labels:  prng
Wjcryptlib
Public Domain C Library of Cryptographic functions. Including: MD5, SHA1, SHA256, SHA512, RC4, AES, AES-CTR, AES-OFB, AES-CBC
Stars: ✭ 250 (+204.88%)
Mutual labels:  aes
Qt Aes
Native Qt AES encryption class
Stars: ✭ 207 (+152.44%)
Mutual labels:  aes
Cry
Cross platform PoC ransomware written in Go
Stars: ✭ 179 (+118.29%)
Mutual labels:  aes
Jsrsasign
The 'jsrsasign' (RSA-Sign JavaScript Library) is an opensource free cryptography library supporting RSA/RSAPSS/ECDSA/DSA signing/validation, ASN.1, PKCS#1/5/8 private/public key, X.509 certificate, CRL, OCSP, CMS SignedData, TimeStamp, CAdES JSON Web Signature/Token in pure JavaScript.
Stars: ✭ 2,760 (+3265.85%)
Mutual labels:  aes
Ksprefs
🚀⚡ Kotlin SharedPreferences wrapper & cryptographic preferences android library.
Stars: ✭ 176 (+114.63%)
Mutual labels:  aes
aes-stream
A fast AES-PRF based secure random-number generator
Stars: ✭ 15 (-81.71%)
Mutual labels:  aes
Crypto Notepad
🔑 Simple notepad for Windows with encryption features
Stars: ✭ 160 (+95.12%)
Mutual labels:  aes
Encrypt
🔒 A set of high-level APIs over PointyCastle for two-way cryptography.
Stars: ✭ 199 (+142.68%)
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 (+190.24%)
Mutual labels:  aes
Encrypt Body Spring Boot Starter
(停止维护,替代品搜索:https://github.com/search?l=Java&q=encrypt&type=Repositories )SpringBoot控制器统一的响应体加密与请求体解密的注解处理方式,支持MD5/SHA/AES/DES/RSA
Stars: ✭ 198 (+141.46%)
Mutual labels:  aes
Aescipher Ios
AES encryption working between Objective-C and Java.
Stars: ✭ 198 (+141.46%)
Mutual labels:  aes

RandomGen

This package contains additional bit generators for NumPy's Generator and an ExtendedGenerator exposing methods not in Generator.

Continuous Integration

Build Status Appveyor Build Status Build Status FreeBSD Status on Cirrus

Coverage

codecov

Latest Release

PyPI version Anacnoda Cloud

License

NCSA License BSD License DOI

This is a library and generic interface for alternative random generators in Python and NumPy.

New Features

The the development documentation for the latest features, or the stable documentation for the latest released features.

WARNINGS

Changes in v1.24

Generator and RandomState have been removed.

Changes from 1.18 to 1.19

Generator and RandomState have been officially deprecated in 1.19, and will warn with a FutureWarning about their removal. They will also receive virtually no maintenance. It is now time to move to NumPy's np.random.Generator which has features not in randomstate.Generator and is maintained more actively.

A few distributions that are not present in np.random.Generator have been moved to randomstate.ExtendedGenerator:

  • multivariate_normal: which supports broadcasting
  • uintegers: fast 32 and 64-bit uniform integers
  • complex_normal: scalar complex normals

There are no plans to remove any of the bit generators, e.g., AESCounter, ThreeFry, or PCG64.

Changes from 1.16 to 1.18

There are many changes between v1.16.x and v1.18.x. These reflect API decision taken in conjunction with NumPy in preparation of the core of randomgen being used as the preferred random number generator in NumPy. These all issue DeprecationWarnings except for BasicRNG.generator which raises NotImplementedError. The C-API has also changed to reflect the preferred naming the underlying Pseudo-RNGs, which are now known as bit generators (or BigGenerators).

Future Plans

  • Add some distributions that are not supported in NumPy. Ongoing
  • Add any interesting bit generators I come across. Recent additions include the DXSM and CM-DXSM variants of PCG64 and the LXM generator.

Included Pseudo Random Number Generators

This module includes a number of alternative random number generators in addition to the MT19937 that is included in NumPy. The RNGs include:

  • Cryptographic cipher-based random number generator based on AES, ChaCha20, HC128 and Speck128.
  • MT19937, the NumPy rng
  • dSFMT a SSE2-aware version of the MT19937 generator that is especially fast at generating doubles
  • xoroshiro128+, xorshift1024*φ, xoshiro256**, and xoshiro512**
  • PCG64
  • ThreeFry and Philox from Random123
  • Other cryptographic-based generators: AESCounter, SPECK128, ChaCha, and HC128.
  • Hardware (non-reproducible) random number generator on AMD64 using RDRAND.
  • Chaotic PRNGS: Small-Fast Chaotic (SFC64) and Jenkin's Small-Fast (JSF).

Status

  • Builds and passes all tests on:
    • Linux 32/64 bit, Python 3.7, 3.8, 3.9, 3.10
    • Linux (ARM/ARM64), Python 3.8
    • OSX 64-bit, Python 3.9
    • Windows 32/64 bit, Python 3.7, 3.8, 3.9, 3.10
    • FreeBSD 64-bit

Version

The package version matches the latest version of NumPy when the package is released.

Documentation

Documentation for the latest release is available on my GitHub pages. Documentation for the latest commit (unreleased) is available under devel.

Requirements

Building requires:

  • Python (3.6, 3.7, 3.8, 3.9, 3.10)
  • NumPy (1.17+)
  • Cython (0.29+)
  • tempita (0.5+), if not provided by Cython

Testing requires pytest (6+).

Note: it might work with other versions but only tested with these versions.

Development and Testing

All development has been on 64-bit Linux, and it is regularly tested on Travis-CI (Linux-AMD64, Linux-PPC-LE, Linus-S390X, and OSX), Appveyor (Windows 32/64), Cirrus (FreeBSD) and Drone.io (ARM/ARM64 Linux).

Tests are in place for all RNGs. The MT19937 is tested against NumPy's implementation for identical results. It also passes NumPy's test suite where still relevant.

Installing

Either install from PyPi using

python -m pip install randomgen

or, if you want the latest version,

python -m pip install git+https://github.com/bashtage/randomgen.git

or from a cloned repo,

python -m pip install .

If you use conda, you can install using conda forge

conda install -c conda-forge randomgen

SSE2

dSFTM makes use of SSE2 by default. If you have a very old computer or are building on non-x86, you can install using:

export RANDOMGEN_NO_SSE2=1
python -m pip install . 

Windows

Either use a binary installer, or if building from scratch, use Python 3.6/3.7 with Visual Studio 2015 Build Toolx.

License

Dual: BSD 3-Clause and NCSA, plus sub licenses for components.

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