crypto101 / book

Crypto 101, the introductory book on cryptography.
https://www.crypto101.io/
Other
3.01k stars 192 forks source link

Chapter 14 in depth look MersenneTwister confusing wording #414

Closed tstoertenbecker closed 3 years ago

tstoertenbecker commented 3 years ago

On page 156 it says:

1.An optional initialization function, which produces an initial state from a small random value called a seed. 2.A state generation function, which produces a new state from the old state. 3.An extraction function, also called the tempering function, that produces a random number from the current element of the state (the element pointed at by the index i). Whenever the extraction function is called, the index to the current integer is incremented. When all of the current elements of the state have been used to produce a number,the state initialization function is called again. The state initialization function is also called right before the first number is

Shouldn't it say When all of the current elements of the state have been used to produce a number, the state generation function is called again? Or am I misunderstanding something? Anyways thanks for writing the book, has been lots of fun reading it.

lvh commented 3 years ago

Oops, yes, absolutely. Would you mind submitting a PR?

gliptak commented 3 years ago

can this issue be closed?

lvh commented 3 years ago

Yep! Thanks @gliptak !