# Tag Info

5

One of the key properties we want out of PRNGs is that they produce results that follow a desired probability distribution. Nearly all of the time we want our PRNGs to produce data with uniform distribution—all of the possible output values should have equal probability. So let's assume that we are given a seq sequence whose values are samples drawn from a ...

2

Given any finite sequence $(a_0,a_1,\ldots,a_{N-1})$ we may be interested in generating exactly that sequence, or generating the minimal degree (periodic) sequence which has that sequence as its' starting bits. Trivially, the circulating shift register of length $L$, initially loaded by $(a_0,\ldots,a_{L-1})$, will generate this sequence, by implementing ...

2

If this can code can help you understanding the Linear Shift Register. (^ represents Exclusive OR) byte[] register = new byte[] { 0, 1, 0, 1 }; byte[] plain = new byte[] { 1, 0, 1, 0, 1, 0, 1, 0, 1, 1 }; ; byte[] cipher = new byte[plain.Length]; for (int i = 0; i < plain.Length; i++) { //plaintext ^ ...

2

Read the drawing assuming: each of the four (about) square boxes $a_j$ initially (at $t=0$) holds one of the four bits of $S_0$ (in reading order, unless otherwise stated); information follows arrows (almost) instantly, except when getting into a square box where that is delayed until $t$ has grown by $1$ (in time unit or clock period); notice this ...

3

The problem with answering this question as posed is that one would need to have a definition of "cryptographic quality" that applies to 1/f noise. You'd need to talk about something like how many data points an intelligent adversary would need to observe to be able to distinguish your pseudorandom 1/f noise generator from truly random 1/f noise. I suspect ...

2

If you want the encryption to be information-theoretically secure, then you need an information-theoretically secure RNG. And therein lies the problem—how do you establish that a given RNG is information-theoretically secure? Science may say that there are some types of events that are physically unpredictable, but that by itself is insufficient to get a ...

0

Short answer: @Stephan Touset's answer is of course correct: if this is just for your learning, then it doesn't matter, use whatever's convenient. Anything that's not this should be fine: *Mandatory XKCD The longer answer is that philosophers like to debate whether "truly random", as you put it, actually exists, and if it does, does it apply to ...

4

You're never going to release this, right? If so, it doesn't matter. Use a pseudorandom stream from /dev/urandom and "pretend" that it's truly random for the sake of learning about the concepts involved.

2

If, for example, the PRNG can only be seeded with $2^{32}$ bits, then it cannot possibly produce all the $52!$ distinct permutations. In addition, even if we could meet the 226 bits needed for a 52-card deck, the distribution may not be uniform. This is true, but a good PRNG (even non-cryptographic) will give you a random sample from a uniform distribution....

1

I have modified this Ruby script to not require public keys and to allow direct (r,s) input. Funnily enough, I stumbled on this thread (created two hours ago as of writing) on Google searching for the exact same problem. Note that I am using Secp192r1 (due to a CTF challenge), so feel free to modify that to your likings: require 'ecdsa' msghash1_hex = '...

Top 50 recent answers are included