Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.crypt > #33084

Re: A shared CISPRNG for casual use

From Jeffrey Goldberg <nobody@goldmark.org>
Newsgroups sci.crypt
Subject Re: A shared CISPRNG for casual use
Date 2015-10-20 11:34 -0500
Message-ID <d8n8o8Fe9eaU1@mid.individual.net> (permalink)
References <n050ti$fa1$1@dont-email.me>

Show all headers | View raw


On 2015-10-20 09:20:49 +0000, Richard Heathfield said:

> CISPRNG - a Cryptographically In-Secure PRNG for sci.crypt use
> 
> Design goals:
> 1) REPRODUCIBLE RESULTS. The PRNG must give the same results on any 
> computer that might reasonably be used by sci.crypt people for typical 
> sci.crypt-related purposes (e.g. illustrating cipher designs, posting 
> challenges, etc).
> 
> 2) SIMPLE IMPLEMENTATION. The PRNG must be no more than a couple of KB 
> of easy-to-follow source code.
> 
> 3) PATENT-FREE. We don't want any copyright or patent stuff making life 
> awkward for people.
> 
> 4) NOT CRYPTOGRAPHICALLY SECURE. This isn't exactly a requirement as 
> such, more the /absence/ of a requirement. This PRNG is not intended 
> for use in situations where you need *serious* random numbers, and thus 
> should not be judged by a CSPRNG criterion.

Hmm.

So you need a small deterministic PRNG, and cryptogrphic security isn't 
a concern.

Here's a deterministic PRNG. It depends on the array S which defines a 
permutation. S will be set up from the seed or key for the PRNG


i := 0
j := 0
while GeneratingOutput:
    i := (i + 1) mod 256
    j := (j + S[i]) mod 256
    swap values of S[i] and S[j]
    K := S[(S[i] + S[j]) mod 256]
    output K
endwhile

And this is for setting up S from the key/seed.

for i from 0 to 255
    S[i] := i
endfor
j := 0
for i from 0 to 255
    j := (j + S[i] + key[i mod keylength]) mod 256
    swap values of S[i] and S[j]
endfor

(I think it should be obvious to many of you that I am not the creator 
of this.)


Cheers,

-j

Back to sci.crypt | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

A shared CISPRNG for casual use Richard Heathfield <rjh@cpax.org.uk> - 2015-10-20 10:20 +0100
  Re: A shared CISPRNG for casual use Rich <rich@example.invalid> - 2015-10-20 10:50 +0000
    Re: A shared CISPRNG for casual use Richard Heathfield <rjh@cpax.org.uk> - 2015-10-20 14:03 +0100
      Re: A shared CISPRNG for casual use Rich <rich@example.invalid> - 2015-10-20 13:19 +0000
        Re: A shared CISPRNG for casual use Richard Heathfield <rjh@cpax.org.uk> - 2015-10-20 14:57 +0100
  Re: A shared CISPRNG for casual use Karl-Uwe Frank <karl.frank@freecx.co.uk> - 2015-10-20 14:02 +0200
    Re: A shared CISPRNG for casual use Richard Heathfield <rjh@cpax.org.uk> - 2015-10-20 14:11 +0100
  Re: A shared CISPRNG for casual use Jeffrey Goldberg <nobody@goldmark.org> - 2015-10-20 11:34 -0500
    Re: A shared CISPRNG for casual use Karl-Uwe Frank <karl.frank@freecx.co.uk> - 2015-10-20 21:16 +0200
      Re: A shared CISPRNG for casual use kg <kristiag+news@math.ntnu.no> - 2015-10-20 19:24 +0000
  Re: A shared CISPRNG for casual use Robert Wessel <robertwessel2@yahoo.com> - 2015-10-20 12:34 -0500
    Re: A shared CISPRNG for casual use gamo <gamo@telecable.es> - 2015-10-22 15:26 +0200
      Re: A shared CISPRNG for casual use Cristiano <cristiapi@NSgmail.com> - 2015-10-22 23:43 +0200
        Re: A shared CISPRNG for casual use Robert Wessel <robertwessel2@yahoo.com> - 2015-10-22 17:41 -0500
          Re: A shared CISPRNG for casual use Cristiano <cristiapi@NSgmail.com> - 2015-10-23 00:57 +0200
          Re: A shared CISPRNG for casual use Cristiano <cristiapi@NSgmail.com> - 2015-10-24 01:08 +0200
  Re: A shared CISPRNG for casual use rsharris.bx.psu.edu@gmail.com - 2015-10-20 13:56 -0700
    Re: A shared CISPRNG for casual use Richard Heathfield <rjh@cpax.org.uk> - 2015-10-20 22:24 +0100
  Re: A shared CISPRNG for casual use rsharris.bx.psu.edu@gmail.com - 2015-10-21 10:14 -0700
  Re: A shared CISPRNG for casual use Rich <rich@example.invalid> - 2015-10-22 03:44 +0000
    Re: A shared CISPRNG for casual use Richard Heathfield <rjh@cpax.org.uk> - 2015-10-22 09:40 +0100
      Re: A shared CISPRNG for casual use Rich <rich@example.invalid> - 2015-10-22 11:00 +0000
    Re: A shared CISPRNG for casual use Richard Heathfield <rjh@cpax.org.uk> - 2015-10-22 09:55 +0100
      Re: A shared CISPRNG for casual use Paulo Marques <pmarques@grupopie.com> - 2015-10-22 11:57 +0100
        Re: A shared CISPRNG for casual use Karl-Uwe Frank <karl.frank@freecx.co.uk> - 2015-10-22 13:05 +0200
        Re: A shared CISPRNG for casual use Richard Heathfield <rjh@cpax.org.uk> - 2015-10-22 12:08 +0100
          Re: A shared CISPRNG for casual use Rich <rich@example.invalid> - 2015-10-22 11:17 +0000
      Re: A shared CISPRNG for casual use Rich <rich@example.invalid> - 2015-10-22 11:11 +0000
        Re: A shared CISPRNG for casual use Richard Heathfield <rjh@cpax.org.uk> - 2015-10-22 12:21 +0100
      Re: A shared CISPRNG for casual use David Thompson <dave.thompson2@verizon.net> - 2015-10-31 06:52 -0400

csiph-web