Guessing The Key Pseudo Random Number Generation Lab

Posted : admin On 15.12.2020

In theoretical computer science and cryptography, a pseudorandom generator (PRG) for a class of statistical tests is a deterministic procedure that maps a random seed to a longer pseudorandom string such that no statistical test in the class can distinguish between the output of the generator and the uniform distribution. The random seed is typically a short binary string drawn from the uniform distribution.

Many different classes of statistical tests have been considered in the literature, among them the class of all Boolean circuits of a given size.It is not known whether good pseudorandom generators for this class exist, but it is known that their existence is in a certain sense equivalent to (unproven) circuit lower bounds in computational complexity theory.Hence the construction of pseudorandom generators for the class of Boolean circuits of a given size rests on currently unproven hardness assumptions.

Definition[edit]

SEED Labs – Pseudo Random Number Generation Lab 3 $ date -d '2018-04-15 15:00:00' +%s 2.3 Task 3: Measure the Entropy of Kernel In the virtual world, it is difficult to create randomness, i.e., software alone is hard to create random numbers. Cryptography, Statistics and Pseudo-Randomness (Part I). In the classical approach to pseudo-random number generators, a generator is. An adversary may for example guess the secret key with sig.

  1. Dec 13, 2018  The value of Number determines how Rnd generates a pseudo-random number: For any given initial seed, the same number sequence is generated because each successive call to the Rnd function uses the previous number as a seed for the next number in the sequence.
  2. The likelihood of two randomly generated code colliding is basically the same as a user guessing a valid code - and you cannot prevent users from guessing. So you must have a key space so much larger than the number of actually used codes that random collisions are extremely unlikely as well (though, thanks to the birthday paradox, probably not.
  3. Start studying computer security ch7. Learn vocabulary, terms, and more with flashcards, games, and other study tools. we use a pseudo-random number generator (PRNG) to generate the key stream. Generates a key stream from the input key - Attackers can't guess other parts of the key stream even if they recover some parts of it.
  4. Pseudo Random Number Generator: A pseudo random number generator (PRNG) refers to an algorithm that uses mathematical formulas to produce sequences of random numbers. PRNGs generate a sequence of numbers approximating the properties of random numbers. This is determined by a small group of initial values. PRNGs are fundamental to the use of.

Let A={A:{0,1}n{0,1}}{displaystyle {mathcal {A}}={A:{0,1}^{n}to {0,1}^{*}}} be a class of functions.These functions are the statistical tests that the pseudorandom generator will try to fool, and they are usually algorithms.Sometimes the statistical tests are also called adversaries or distinguishers.[1]

A function G:{0,1}{0,1}n{displaystyle G:{0,1}^{ell }to {0,1}^{n}} with n{displaystyle ell leq n} is a pseudorandom generator against A{displaystyle {mathcal {A}}} with biasϵ{displaystyle epsilon } if, for every A{displaystyle A} in A{displaystyle {mathcal {A}}}, the statistical distance between the distributions A(G(U)){displaystyle A(G(U_{ell }))} and A(Un){displaystyle A(U_{n})} is at most ϵ{displaystyle epsilon }, where Uk{displaystyle U_{k}} is the uniform distribution on {0,1}k{displaystyle {0,1}^{k}}.

The quantity {displaystyle ell } is called the seed length and the quantity n{displaystyle n-ell } is called the stretch of the pseudorandom generator.

A pseudorandom generator against a family of adversaries (An)nN{displaystyle ({mathcal {A}}_{n})_{nin mathbb {N} }} with bias ϵ(n){displaystyle epsilon (n)} is a family of pseudorandom generators (Gn)nN{displaystyle (G_{n})_{nin mathbb {N} }}, where Gn:{0,1}(n){0,1}n{displaystyle G_{n}:{0,1}^{ell (n)}to {0,1}^{n}} is a pseudorandom generator against An{displaystyle {mathcal {A}}_{n}} with bias ϵ(n){displaystyle epsilon (n)} and seed length (n){displaystyle ell (n)}.

In most applications, the family A{displaystyle {mathcal {A}}} represents some model of computation or some set of algorithms, and one is interested in designing a pseudorandom generator with small seed length and bias, and such that the output of the generator can be computed by the same sort of algorithm.

Pseudorandom generators in cryptography[edit]

In cryptography, the class A{displaystyle {mathcal {A}}} usually consists of all circuits of size polynomial in the input and with a single bit output, and one is interested in designing pseudorandom generators that are computable by a polynomial-time algorithm and whose bias is negligible in the circuit size.These pseudorandom generators are sometimes called cryptographically secure pseudorandom generators (CSPRGs).

It is not known if cryptographically secure pseudorandom generators exist.Proving that they exist is difficult since their existence implies P ≠ NP, which is widely believed but a famously open problem.The existence of cryptographically secure pseudorandom generators is widely believed as well[citation needed] and they are necessary for many applications in cryptography.

The pseudorandom generator theorem shows that cryptographically secure pseudorandom generators exist if and only if one-way functions exist.

Uses[edit]

Pseudorandom generators have numerous applications in cryptography. For instance, pseudorandom generators provide an efficient analog of one-time pads. It is well known that in order to encrypt a message m in a way that the cipher text provides no information on the plaintext, the key k used must be random over strings of length m . Perfectly secure encryption is very costly in terms of key length. Key length can be significantly reduced using a pseudorandom generator if perfect security is replaced by semantic security. Common constructions of stream ciphers are based on pseudorandom generators.

Pseudorandom generators may also be used to construct symmetric key cryptosystems, where a large number of messages can be safely encrypted under the same key. Such a construction can be based on a pseudorandom function family, which generalizes the notion of a pseudorandom generator.

In the 1980s, simulations in physics began to use pseudorandom generators to produce sequences with billions of elements, and by the late 1980s, evidence had developed that a few common generators gave incorrect results in such cases as phase transition properties of the 3D Ising model and shapes of diffusion-limited aggregates. Then in the 1990s, various idealizations of physics simulations—based on random walks, correlation functions, localization of eigenstates, etc., were used as tests of pseudorandom generators.[2]

Pseudorandom generators testing[edit]

NIST announced SP800-22 Randomness tests to test whether a pseudorandom generator produces high quality random bits. Yongge Wang showed that NIST testing is not enough to detect weak pseudorandom generators and developed statistical distance based testing technique LILtest.[3]

Pseudorandom generators for derandomization[edit]

A main application of pseudorandom generators lies in the derandomization of computation that relies on randomness, without corrupting the result of the computation.Physical computers are deterministic machines, and obtaining true randomness can be a challenge.Pseudorandom generators can be used to efficiently simulate randomized algorithms with using little or no randomness.In such applications, the class A{displaystyle {mathcal {A}}} describes the randomized algorithm or class of randomized algorithms that one wants to simulate, and the goal is to design an 'efficiently computable' pseudorandom generator against A{displaystyle {mathcal {A}}} whose seed length is as short as possible.If a full derandomization is desired, a completely deterministic simulation proceeds by replacing the random input to the randomized algorithm with the pseudorandom string produced by the pseudorandom generator.The simulation does this for all possible seeds and averages the output of the various runs of the randomized algorithm in a suitable way.

Constructions[edit]

Pseudorandom generators for polynomial time[edit]

A fundamental question in computational complexity theory is whether all polynomial timerandomized algorithms for decision problems can be deterministically simulated in polynomial time. The existence of such a simulation would imply that BPP = P. To perform such a simulation, it is sufficient to construct pseudorandom generators against the family F of all circuits of size s(n) whose inputs have length n and output a single bit, where s(n) is an arbitrary polynomial, the seed length of the pseudorandom generator is O(log n) and its bias is ⅓.

In 1991, Noam Nisan and Avi Wigderson provided a candidate pseudorandom generator with these properties. In 1997 Russell Impagliazzo and Avi Wigderson proved that the construction of Nisan and Wigderson is a pseudorandom generator assuming that there exists a decision problem that can be computed in time 2O(n) on inputs of length n but requires circuits of size 2Ω(n).

Pseudorandom generators for logarithmic space[edit]

While unproven assumption about circuit complexity are needed to prove that the Nisan–Wigderson generator works for time-bounded machines, it is natural to restrict the class of statistical tests further such that we need not rely on such unproven assumptions.One class for which this has been done is the class of machines whose work space is bounded by O(logn){displaystyle O(log n)}.Using a repeated squaring trick known as Savitch's theorem, it is easy to show that every probabilistic log-space computation can be simulated in space O(log2n){displaystyle O(log ^{2}n)}.Noam Nisan (1992) showed that this derandomization can actually be achieved with a pseudorandom generator of seed length O(log2n){displaystyle O(log ^{2}n)} that fools all O(logn){displaystyle O(log n)}-space machines.Nisan's generator has been used by Saks and Zhou (1999) to show that probabilistic log-space computation can be simulated deterministically in space O(log1.5n){displaystyle O(log ^{1.5}n)}.This result is still the best known derandomization result for general log-space machines in 2012.

Pseudorandom generators for linear functions[edit]

When the statistical tests consist of all multivariate linear functions over some finite fieldF{displaystyle mathbb {F} }, one speaks of epsilon-biased generators.The construction of Naor & Naor (1990) achieves a seed length of =logn+O(log(ϵ1)){displaystyle ell =log n+O(log(epsilon ^{-1}))}, which is optimal up to constant factors.Pseudorandom generators for linear functions often serve as a building block for more complicated pseudorandom generators.

Pseudorandom generators for polynomials[edit]

Viola (2008) proves that taking the sum of d{displaystyle d} small-bias generators fools polynomials of degree d{displaystyle d}.The seed length is =dlogn+O(2dlog(ϵ1)){displaystyle ell =dcdot log n+O(2^{d}cdot log(epsilon ^{-1}))}.

Pseudorandom generators for constant-depth circuits[edit]

Constant depth circuits that produce a single output bit.[citation needed]

Limitations on the probability of pseudorandom generators[edit]

The pseudorandom generators used in cryptography and universal algorithmic derandomization have not been proven to exist, although their existence is widely believed. Proofs for their existence would imply proofs of lower bounds on the circuit complexity of certain explicit functions. Such circuit lower bounds cannot be proved in the framework of natural proofs assuming the existence of stronger variants of cryptographic pseudorandom generators.

References[edit]

  1. ^Katz, Jonathan (2014-11-06). Introduction to modern cryptography. Lindell, Yehuda (Second ed.). Boca Raton. ISBN9781466570269. OCLC893721520.
  2. ^Wolfram, Stephen (2002). A New Kind of Science. Wolfram Media, Inc. p. 1085. ISBN978-1-57955-008-0.
  3. ^'Statistical Testing Techniques for Pseudorandom generation'.
  • Sanjeev Arora and Boaz Barak, Computational Complexity: A Modern Approach, Cambridge University Press (2009), ISBN9780521424264.
  • Oded Goldreich, Computational Complexity: A Conceptual Perspective, Cambridge University Press (2008), ISBN978-0-521-88473-0.
  • Oded Goldreich, Foundations of Cryptography: Basic Tools, Cambridge University Press (2001), ISBN9780521791724.
  • Naor, Joseph; Naor, Moni (1990), 'Small-bias Probability Spaces: efficient constructions and Applications', Proceedings of the 22nd Annual ACM Symposium on Theory of Computing, STOC 1990: 213–223, CiteSeerX10.1.1.421.2784, doi:10.1145/100216.100244, ISBN978-0897913614
  • Viola, Emanuele (2008), 'The sum of d small-bias generators fools polynomials of degree d'(PDF), Proceedings of the 23rd Annual Conference on Computational Complexity (CCC 2008): 124–127, CiteSeerX10.1.1.220.1554, doi:10.1109/CCC.2008.16, ISBN978-0-7695-3169-4
  • This article incorporates material from Pseudorandom generator on PlanetMath, which is licensed under the Creative Commons Attribution/Share-Alike License.
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Pseudorandom_generator&oldid=931444553'
(Redirected from Random guess)
Shell game is a scam portrayed as a guessing game.

A guess (or an act of guessing) is a swift conclusion drawn from data directly at hand, and held as probable or tentative, while the person making the guess (the guesser) admittedly lacks material for a greater degree of certainty.[1] A guess is also an unstable answer, as it is 'always putative, fallible, open to further revision and interpretation, and validated against the horizon of possible meanings by showing that one interpretation is more probable than another in light of what we already know'.[2] In many of its uses, 'the meaning of guessing is assumed as implicitly understood',[3] and the term is therefore often used without being meticulously defined. Guessing may combine elements of deduction, induction, abduction, and the purely random selection of one choice from a set of given options. Guessing may also involve the intuition of the guesser,[4] who may have a 'gut feeling' about which answer is correct without necessarily being able to articulate a reason for having this feeling.

Gradations of guessing[edit]

Calling a coin toss to determine which team will take the offense at a sporting event is a paradigm case of a guess that requires minimal consideration of forces influencing the outcome.
The exact number of mushrooms in this jar cannot be determined by looking at it, because not all of the mushrooms are visible. The amount, however, can be guessed or estimated.

Philosopher Mark Tschaepe, who has written extensively on the scientific and epistemological role of guessing, has noted that there are often-overlooked 'gradations' of guessing - that is, different kinds of guesses susceptible to different levels of confidence. Tschaepe defines guessing as 'an initial, deliberate originary activity of imaginatively creating, selecting, or dismissing potential solutions to problems or answers to questions as a volitional response to those problems or questions when insufficient information is available to make merely a deduction and/or induction to the solution or answer'. He objects to definitions that describe guessing as either forming a 'random or insufficiently formed opinion', which Tschaepe deems too ambiguous to be helpful, or 'to instantaneously happen upon an opinion without reasoning'. Tschaepe notes that in the latter case, the guess might appear to occur without reasoning, when in fact a reasoning process may be occurring so quickly in the mind of the guesser that it does not register as a process.[3] This reflects the observation made centuries before by Gottfried Leibniz, that 'when I turn one way rather than another, it is often because of a series of tiny impressions of which I am not aware'.[5] Tschaepe quotes the description given by William Whewell, who says that this process 'goes on so rapidly that we cannot trace it in its successive steps'.[3][6]

A guess that 'is merely a hunch or is groundless... is arbitrary and of little consequence epistemologically'.[7] A guess made with no factual basis for its correctness may be called a wild guess. Jonathan Baron has said that '[t]he value of a wild guess is l/N + l/N - l/N = l/N', meaning that taking a true wild guess is no different than choosing an answer at random.[8] Philosopher David Stove described this process as follows:

A paradigm case of guessing is, when captains toss a coin to start a cricket match, and one of them 'calls', say 'heads'. This cannot be a case of knowledge, scientific knowledge or any other, if it is a case of guessing. If the captain knows that the coin will fall heads, it is just logically impossible for him also to guess that it will. More than that, however: guessing, at least in such a paradigm case, does not even belong on what may be called the epistemic scale. That is, if the captain, when he calls 'heads', is guessing, he is not, in virtue of that, believing, or inclining to think, or conjecturing, or anything of that sort, that the coin will fall heads. And in fact, of course, he normally is not doing any of these things when he guesses. He just calls. And this is guessing, whatever else is.[9]

In such an instance, there not only is no reason for favoring 'heads' or 'tails', but everyone knows this to be the case. Tschaepe also addresses the guess made in a coin flip, contending that it merely represents an extremely limited case of guessing a random number. Tschaepe examines such guesses at greater length with the instance of guessing a number between 1 and 100, for which Tschaepe notes that the guesser 'has to look for clues that are specific to what or whom is ordering them to guess, as well as possible past scenarios that involved guessing numbers', and once these are exhausted, 'there comes a point very early in the process wherein no other clue to an answer exists'.[3] As an exemplary case of guessing that involves progressively more information from which to make a further guess, Tschaepe notes the game of Twenty Questions, which he describes as 'similar to guessing a number that the other person is thinking, but unlike guessing a number as a singular action... allows for combining abductive reasoning with deductive and inductive reasoning'.[3]

An apparently unreasoned guess that turns out to be correct may be called a happy guess,[3] or a lucky guess,[10] and it has been argued that 'a 'lucky guess' is a paradigm case of a belief that does not count as knowledge'.[11] In Jane Austen's Emma, however, the author has the character, Emma, respond to a character calling a match that she made a 'lucky guess' by saying that 'a lucky guess is never merely luck. There is always some talent in it'.[12] As Tschaepe notes, William Whewell stated that certain scientific discoveries 'are not improperly described as happy Guesses; and that Guesses, in these as in other instances, imply various suppositions made, of which some one turns out to be the right one'.[6]

By contrast, a guess made using prior knowledge to eliminate clearly wrong possibilities may be called an informed guess or an educated guess. Uninformed guesses can be distinguished from the kind of informed guesses that lead to the development of a scientific hypothesis. Tschaepe notes that '[t]his process of guessing is distinct from that of a coin toss or picking a number'.[3] It has also been noted that '[w]hen a decision must be made, the educated guess of the experts will be the best basis for a decision — an educated guess is better than an uneducated guess'.[13]

An estimate is one kind of educated guess, although often one that involves making a numerical determination, and using some knowledge of known or observable variables to determine the most likely number or range of numbers. A guess, however, may also be purely a matter of selecting one possible answer from the set of possible answers, with little or no basis for making the selection. Another kind of guessing is conjecture, particularly as used in mathematics to refer to a conclusion or proposition which appears to be correct based on incomplete information, but for which no proof has been found.[14][15]

Uses of guessing[edit]

Tschaepe notes that 'guessing has been indicated as an important part of scientific processes, especially with regard to hypothesis-generation'.[3] Regarding scientific hypothesis-generation, Tschaepe has stated that guessing is the initial, creative process involved in abductive reasoning wherein new ideas are first suggested. Following the work of Charles S. Peirce, guessing is 'a combination of musing and logical analysis.'[16]

Science is done by making educated guesses about how the world works and then testing those guesses by doing experiments. Such an educated guess is called a hypothesis.[17]

People learn to guess at an early age, and there are many guessing games played by children. In practice, children may find themselves in situations where 'guessing is the only strategy they have available to them'.[18] In order to cope with these situations, children develop two abilities, '(1) the ability to recognize situations in which guessing is the only reasonable strategy even though it provides no more than a gross estimate; (2) the ability to recognize that different levels of accuracy are possible and acceptable in different situations'.[18]

Certain kinds of exams, particularly those that involve multiple choice questions, attempt to penalize exam takers for guessing by giving a small negative score for each wrong answer, so that the average number of correct guesses will be offset by the combined penalty for the average number of incorrect guesses. In such a scenario, however, a guesser who can eliminate one or two wrong answers can still gain overall by guessing from the remaining pool of answers.[19]

According to Polanyi, guessing is the end result of a problem, observations of clues, and directedness toward solving the problem. Guessing is the action that brings about “a definite solution” (139). here is a definite process to guessing in Polanyi's account, although he does tend towards Whewell and Hempel in the comparison he makes between discovering hypotheses and Gestalt perception (144).[3]

Guessing has been asserted to be necessary in literary theory, where 'we have to guess the meaning of the text because the author's intention is beyond our reach'. Because the reader can never put themselves in exactly the situation the author was in when the text was written, to construe the meaning of the text 'is to make a guess'.[20]

Guessing games[edit]

Game of Charades involves single person acting out a phrase, with the rest of the group guessing the phrase.

A guessing game is a game in which the object is to use guessing to discover some kind of information, such as a word, a phrase, a title, or the identity or location of an object.[21] A guessing game has as its core a piece of information that one player knows, and the object is to coerce others into guessing that piece of information without actually divulging it in text or spoken word. Charades is probably the most well-known game of this type, and has spawned numerous commercial variants that involve differing rules on the type of communication to be given, such as Catch Phrase, Taboo, Pictionary, and similar. The genre also includes many game shows such as Win, Lose or Draw, Password and $25,000 Pyramid.

Many of the games are played co-operatively. In some games some player(s) know the answer, but cannot tell the other(s), instead they must help them to guess it. Guessing games are 'readily adaptable for classroom use', as such a game 'creates just enough tension to remain exciting, challenging, and competitive' for children, so long as the teacher designs effective rules 'to eliminate unruly or unsportsmanship behavior'.[21] It has been noted, however, that children in therapy may initiate guessing games as a way to avoid talking about distressing issues, and that therapists who are using other kinds of games to facilitate communication should avoid being drawn into them.[22]

Examples of guessing games include:

Two people playing Guess Who? at Spiel 2008.

Error guessing[edit]

In software testing, error guessing is a test method in which test cases used to find bugs in programs are established based on experience in prior testing.[23] The scope of test cases usually rely on the software tester involved, who uses past experience and intuition to determine what situations commonly cause software failure, or may cause errors to appear.[24] Typical errors include divide by zero, null pointers, or invalid parameters. Error guessing has no explicit rules for testing; test cases can be designed depending on the situation, either drawing from functional documents or when an unexpected/undocumented error is found while testing operations.[23]

Social impact of guessing[edit]

A study of guessing in social situations (for example, guessing someone's test score or potential salary) determined that there are situations where it is beneficial to intentionally either overguess (guess a higher amount) or underguess (guess a lower amount).[25] The study noted that students who knew the score they had received on a test were happier when another person who did not know the score guessed a lower number; the lower guess gave the student the positive feeling of having exceeded expectations.[25]

Pseudo Random Number Generator Online

See also[edit]

References[edit]

  1. ^James Champlin Fernald, English Synonyms and Antonyms (1914), p. 287.
  2. ^David M. Kaplan, Ricoeur's Critical Theory (2003), p. 68.
  3. ^ abcdefghiMark Tschaepe, 'Gradations of Guessing: Preliminary Sketches and Suggestions', in John R. Shook, Contemporary Pragmatism Volume 10, Number 2, (December 2013), p. 135-154.
  4. ^Sandra E. Hockenbury, Susan A. Nolan, Don H. Hockenbury, Psychology (2015), p. 279.
  5. ^Gottfried Leibniz, in New Essays on Human Understanding, tr. Peter Remnant and Jonathan Bennett (download1705) [1981]), p. 115-16.
  6. ^ abWilliam Whewell, The Philosophy of the Inductive Sciences: Founded Upon Their History, Volume 2 (1840), p. 206-207.
  7. ^Martin Schiralli, Constructive Postmodernism: Toward Renewal in Cultural and Literary Studies (1999), p. 67.
  8. ^Jonathan Baron, Rationality and Intelligence (2005), p. 146.
  9. ^David Stove, Popper and After: Four Modern Irrationalists (1982), p. 15.
  10. ^Oliver Ibe, Fundamentals of Applied Probability and Random Processes (2014), p. 25, defining a lucky guess in the context of a person making random guesses as 'among the questions whose answers she guessed at random'.
  11. ^Duncan Pritchard, Lee John Whittington, The Philosophy of Luck (2015), p. 186.
  12. ^Jane Austen, Emma (1815), p. 8.
  13. ^Daniel E. Wueste, Professional Ethics and Social Responsibility (1994), p. 96.
  14. ^Oxford Dictionary of English (2010 ed.).
  15. ^Schwartz, JL (1995). Shuttling between the particular and the general: reflections on the role of conjecture and hypothesis in the generation of knowledge in science and mathematics. p. 93.
  16. ^Mark Tschaepe, 'Guessing and Abduction' Transactions of the Charles S. Peirce Society. 50(1) (2014), p. 125.
  17. ^Daniel Larson, The Nature of Matter (2007), p. 20.
  18. ^ abHarold L. Schoen, Marilyn Zweng, Estimation and Mental Computation: 1986 Yearbook' (1986), p. 75-76.
  19. ^Mike McClenathan, PWN the SAT: Math Guide: 3rd Edition (2014), p. 19.
  20. ^Paul Ricoeur, Interpretation Theory: Discourse and the Surplus of Meaning (1976), p. 75-76.
  21. ^ abVicki Cohen, John Cowen, Literacy for Children in an Information Age: Teaching Reading, Writing, and Thinking (2007), p. 267.
  22. ^Garry L. Landreth, Play Therapy: The Art of the Relationship (2012), p. 294.
  23. ^ abBernard Homès, Fundamentals of Software Testing (2013), sec. 4.5.3.
  24. ^R.G. Evans, Supercomputational Science (2012), p. 39.
  25. ^ abLuxi Shen, Christopher K. Hsee, Jiao Zhang, The Art and Science of Guessing, Emotion (2011), Vol. 11, No. 6, p. 1462–1468.

Random Number Generation In Java

External links[edit]

Look up guess or guessing in Wiktionary, the free dictionary.
Wikiquote has quotations related to: Guessing
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Guessing&oldid=928693803'