GPU random numbers via the tiny encryption algorithm

Random numbers are extensively used on the GPU. As more computation is ported to the GPU, it can no longer be treated as rendering hardware alone. Random number generators (RNG) are expected to cater general purpose and graphics applications alike. Such diversity adds to expected requirements of a RNG. A good GPU RNG should be able to provide repeatability, random access, multiple independent streams, speed, and random numbers free from detectable statistical bias. A specific application may require some if not all of the above characteristics at one time. In particular, we hypothesize that not all algorithms need the highest-quality random numbers, so a good GPU RNG should provide a speed quality tradeoff that can be tuned for fast low quality or slower high quality random numbers. We propose that the Tiny Encryption Algorithm satisfies all of the requirements of a good GPU Pseudo Random Number Generator. We compare our technique against previous approaches, and present an evaluation using standard randomness test suites as well as Perlin noise and a Monte-Carlo shadow algorithm. We show that the quality of random number generation directly affects the quality of the noise produced, however, good quality noise can still be produced with a lower quality random number generator.

[1]  Randi J. Rost OpenGL shading language , 2004 .

[2]  Robert L. Cook,et al.  Distributed ray tracing , 1998 .

[3]  Carlisle M. Adams,et al.  The CAST-128 Encryption Algorithm , 1997, RFC.

[4]  Takuji Nishimura,et al.  Mersenne twister: a 623-dimensionally equidistributed uniform pseudo-random number generator , 1998, TOMC.

[5]  H. Jensen Realistic Image Synthesis Using Photon Mapping , 2001 .

[6]  Harald Niederreiter,et al.  Monte Carlo and Quasi-Monte Carlo Methods 2006 , 2007 .

[7]  R. Caflisch Monte Carlo and quasi-Monte Carlo methods , 1998, Acta Numerica.

[8]  Li-Yi Wei,et al.  Parallel white noise generation on a GPU via cryptographic hash , 2008, I3D '08.

[9]  Roger M. Needham,et al.  TEA, a Tiny Encryption Algorithm , 1994, FSE.

[10]  Ronald L. Rivest,et al.  The MD5 Message-Digest Algorithm , 1992, RFC.

[11]  David S. Ebert,et al.  Texturing and Modeling: A Procedural Approach , 1994 .

[12]  Ken Perlin,et al.  [Computer Graphics]: Three-Dimensional Graphics and Realism , 2022 .

[13]  David S. Ebert,et al.  Texturing and Modeling , 1998 .

[14]  Donald Ervin Knuth,et al.  The Art of Computer Programming , 1968 .

[15]  Loïc Barthe,et al.  Real-time soft shadow mapping by backprojection , 2006, EGSR '06.

[16]  Elaine B. Barker,et al.  A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applications , 2000 .

[17]  Taku Komura,et al.  Topology matching for fully automatic similarity estimation of 3D shapes , 2001, SIGGRAPH.

[18]  J. P. Lewis,et al.  Algorithms for solid noise synthesis , 1989, SIGGRAPH.

[19]  Ralph B. D'Agostino,et al.  Goodness-of-Fit-Techniques , 2020 .

[20]  Tony DeRose,et al.  Wavelet noise , 2005, SIGGRAPH 2005.

[21]  Fahad Zafar Tiny encryption algorithm for cryptographic gradient noise , 2010 .

[22]  Ken Perlin,et al.  Improving noise , 2002, SIGGRAPH.

[23]  Aaron Knoll,et al.  Better Gradient Noise , 2008 .

[24]  Jim X. Chen,et al.  OpenGL Shading Language , 2009 .

[25]  Wolfgang F. Engel,et al.  Shader X5: Advanced Rendering Techniques , 2006 .

[26]  Manuel Blum,et al.  A Simple Unpredictable Pseudo-Random Number Generator , 1986, SIAM J. Comput..

[27]  Bruce Schneier,et al.  Description of a New Variable-Length Key, 64-bit Block Cipher (Blowfish) , 1993, FSE.

[28]  Robert L. Cook,et al.  Distributed ray tracing , 1984, SIGGRAPH.

[29]  Vikram Reddy Andem A CRYPTANALYSIS OF THE TINY ENCRYPTION ALGORITHM , 2003 .

[30]  Aaron Curtis Real-time soft shadows on the GPU via Monte Carlo sampling , 2009 .

[31]  Ronald L. Rivest,et al.  The RC4 encryption algorithm , 1992 .

[32]  Leonidas J. Guibas,et al.  Metropolis light transport , 1997, SIGGRAPH.

[33]  Ares Lagae,et al.  Procedural noise using sparse Gabor convolution , 2009, SIGGRAPH '09.

[34]  Werner Schindler,et al.  Random Number Generators for Cryptographic Applications , 2009, Cryptographic Engineering.

[35]  Marc Olano Modified noise for evaluation on graphics hardware , 2005, HWWS '05.

[36]  Frédo Durand,et al.  Anisotropic noise , 2008, SIGGRAPH 2008.