Generisanje slučajnih brojeva — разлика између измена

Садржај обрисан Садржај додат
Нема описа измене
Ред 27:
Postoje dve glavne metode koje se koriste za generisanje slučajnih brojeva. Prva metoda meri neku fizički pojavu za koju se očekuje da će biti slučajna, a zatim se u procesu merenja eliminiše ne-slučajnost. Izvorni primeri uključuju merenje atmosferskog šuma, termičkog šuma, i ostalih eksternih elektromagnetnih i kvantnih pojava. Na primer, kosmičko pozadinsko zračenje ili radioaktivni raspad mereni tokom kratkih perioda predstavljaju izvor prirodne entropije.
 
Brzina kojom entropija može da bude skupljena iz prirodnih izvora zavisi od osnovnih fizičkih pojava koje se mere. Prema tome, za izvore prirodnih pojavljivanja „prave“ entropije se kaže da su blokirajući – oni su ograničeni dok nije sakupljeno dovoljno zahtevane entropije. Na nekim sistemima sličnim Unixu, uključujući većinu [[Линукс|Linux]] distribucije, pseudo datoteka /dev/random će blokirati dok nije sakupljeno dovoljno entropije iz okoline. Zbog ovog blokiranja, velika sjedinjena čitanja iz /dev/random, kao što je popunjavanje hard diska sa slučajnim bitovima, može često da uspori sistem koji koriste ovaj tip izvora entropije.
 
Druga metoda koristi računarske algoritme koji mogu da proizvedu duge nizove od navodno slučajnih rezultata, koji su u stvari u potpunosti određeni manjom početnom vrednošću, poznata kao semena vrednost ili ključ. Kao rezultat, ukupni pseudo-slučajni niz se može stvoriti ako je semena vrednost poznata. Ovaj tip generisanja slučajnih brojeva se često naziva pseudo-slučajni generator brojeva. Ovaj tip generatova se ne oslanja na prirodno pojavljivanje entropije, iako može periodično biti ubačeno seme od strane prirodnih izvora. Ovaj tip generatora ne može da blokira, pa nisu ograničeni eksternim događajima, što čini velika sjedinjena čitanja mogućim.
Ред 66:
=== Računarske metode ===
 
Većina računski generisanih slučajnih brojeva koristi [[:en:Pseudorandom number generator|pseudo-slučajne generatore brojeva]] (PSGB) koji su [[Алгоритам|algoritmi]] u mogućnosti da automatski generišu dugačke nizove brojeva sa dobrim nasumičnim svojstvima ali se eventualno niz ponavlja (ili količina utrošene memorije raste bez granica). Ovaj tip slučajnih brojeva su dovoljno dobri u mnogim situacijama ali nisu slučajni koliko i bacanje novčića i kockica<ref>{{Cite web|title = RANDOM.ORG - True Random Number Service|url = https://www.random.org/|website = www.random.org|access-date = 2016-01-14}}</ref>. Niz vrednosti generisan ovakvim algoritmima je obično odredjen fiksiranom vrednošću koja se naziva '''seme''' ({{jez-en|'''seed'''}}). Jedan od najrasprostranjenijih PSGB je [[:en:linear congruential generator|linearni kongruentalni generator]], koji koristi rekurentnost
<!--
 
Most computer generated random numbers use [[Pseudorandom number generator]]s (PRNGs) which are [[algorithm]]s that can automatically create long runs of numbers with good random properties but eventually the sequence repeats (or the memory usage grows without bound).This kind of random numbers are fine in many situations but are not as random as coin tosses and dice rolls.<ref>{{Cite web|title = RANDOM.ORG - True Random Number Service|url = https://www.random.org/|website = www.random.org|access-date = 2016-01-14}}</ref> The series of values generated by such algorithms is generally determined by a fixed number called a '''seed.''' One of the most common PRNG is the [[linear congruential generator]], which uses the recurrence
 
 
:<math>X_{n+1} = (a X_n + b)\, \textrm{mod}\, m</math>
 
to generate numbers, where {{mvar|a}}, {{mvar|b}} and {{mvar|m}} are large integers, and <math>X_{n+1}</math> is the next in {{mvar|X}} as a series of pseudo-random numbers. The maximum number of numbers the formula can produce is the [[Modulus (algebraic number theory)|modulus]], {{mvar|m}}. To avoid certain non-random properties of a single linear congruential generator, several such random number generators with slightly different values of the multiplier coefficient, {{mvar|a}}, can be used in parallel, with a "master" random number generator that selects from among the several different generators.{{Citation needed|date=December 2009}}
 
A simple pen-and-paper method for generating random numbers is the so-called [[middle square method]] suggested by [[John von Neumann]]. While simple to implement, its output is of poor quality. It has a very short period and severe weaknesses, such as the output sequence almost always converging to zero.
 
da bi generisao brojeve, gde su <math>a</math>, <math>b</math> and <math>m</math> veliki brojevi, i <math>X_{n+1}</math> je sledeći u <math>X</math> seriji pseudo-slučajnih brojeva. Najveći broj brojeva koje ova formula može proizvesti je [[Модуларна_аритметика|modulo]] <math>m</math>. Da bi se izbegla neka ne-slučajna svojstva linearnog kongruentalnog generatora, nekoliko takvih generatora brojeva sa malo drukčijim vrednostima koeficijenta umnozitelja<math>a</math>, se mogu koristiti paralelno, sa "master" generatorom brojeva koji odabira između mnoštva drugih generatora.{{Citation needed|date=May 2016}}
Most computer programming languages include functions or library routines that provide random number generators. They are often designed to provide a random byte or word, or a [[floating point]] number [[Uniform distribution (continuous)|uniformly distributed]] between 0 and 1.
 
Metod olovke i papira za generisanje slučajnih brojeva je takozvani [[:en:Middle-square_method|metod srednjeg kvadrata]] kojeg je za upotrebu predložio [[Џон_фон_Нојман|Džon fon Nojman]]. Iako je dati metod jednostavan za implementaciju, njegove izlazne vrednosti su niskog kvaliteta i imaju ozbiljne nedostatke, jedan od tih nedostataka je da dati izlazni niz skoro uvek konvergira ka nuli.
The quality i.e. randomness of such library functions varies widely from completely predictable output, to cryptographically secure. The default random number generator in many languages, including Python, Ruby, R, IDL and PHP is based on the [[Mersenne Twister]] algorithm and is ''not'' sufficient for cryptography purposes, as is explicitly stated in the language documentation. Such library functions often have poor statistical properties and some will repeat patterns after only tens of thousands of trials. They are often initialized using a computer's [[real time clock]] as the seed, since such a clock generally measures in milliseconds, far beyond the person's [[Accuracy and precision|precision]]. These functions may provide enough randomness for certain tasks (for example video games) but are unsuitable where high-quality randomness is required, such as in cryptography applications, statistics or numerical analysis.{{Citation needed|reason=Why unsuitable for numerical analysis?|date=May 2014}}
 
Većina programskih jezika sadrži funkcije ili datoteteke zaglavlja sa rutinama koja obezbeđuju generatore slučajnih brojeva. Oni su obično dizajnirani da obezbede slučajan bajt, reč ili [[:en:Floating_point|broj u pokretnom zarezu]] ravnomerno raspodeljen između 0 i 1.
Much higher quality random number sources are available on most operating systems; for example [[/dev/random]] on various BSD flavors, Linux, Mac OS X, IRIX, and Solaris, or [[CryptGenRandom]] for Microsoft Windows. Most programming languages, including those mentioned above, provide a means to access these higher quality sources.
 
-->
Kvalitet slučajnosti ovih funkcija datoteka zaglavlja varira od u potpunosti predvidivih izlaznih vrednosti do kriptografski sigurnih vrednosti. Uobičajen generator slučajnih brojeva u mnogim jezicima, uključujući -{Python, Ruby, R, IDL}- i -{PHP}- je zasnovan na algoritmu [[:en:Mersenne_Twister|Mersenne Twister]] i ''nije'' dovoljan za kriptografske namene, kao što je i rečeno u dokumentaciji nabrojanih programskih jezika. Takve funkcije datoteka zaglavlja obično imaju loša statistička svojstva i neke će ponavljati šablone nakon samo nekoliko desetina hiljada pokušaja. Ove funkcije se obično inicijaliziraju koristeći [[Časovnik|časovnik]] samog računara kao seme, pošto takav časovnik obično izračunava vreme u milisekundama, što je daleko više od [[Прецизност_и_тачност|preciznosti]] čoveka. Date funkcije mogu da obezbede dovoljno slučajnosti za neke zadatke(npr. [[Видео-игра|video igre]]) ali su neprikladne za zadatke koji zahtevaju slučajnost visokog kvaliteta, kao što je slučaj u kriptografiji, statistici i numeričkoj analizi.{{citation needed|date=May 2016}}
 
Izvori slučajnih brojeva mnogo višeg kvaliteta su dostupni na većini operativnih sistema; npr. [[:en:/dev/random|/dev/random]] na mnogim unix baziranim operativnim sistemima kao što su,-{Linux, Mac OS X, IRIX}- i -{Solaris}-, ili [[:en:CryptGenRandom|CryptGenRandom]] za -{Microsoft Windows}-. Većina programskih jezika, uključujući gore navedene, obezbeđuju načine za generisanje visoko kvalitetnih slučajnih brojeva.
 
=== Generisanje iz raspodele verovatnoće ===
 
Postoji nekoliko metoda generisanja slučajnog broja baziranih na [[Расподела_вероватноће|raspodeli verovatnoće]]. Ove metode uključuju transformisanje homogenog slučajnog broja na neki način. Zbog ovoga, date metode rade podjednako dobro i prilikom generisanja pseudo-slučajnih brojeva i "pravih" slučajnih brojeva. Jedna metoda, koja se naziva metoda inverzije, uključuje integrisanje do površine veće ili jednake slučajnom broju (koja bi trebala da bude generisana izmedju 0 i 1 radi pravilne raspodele). Druga metoda, koja se naziva [[:en:Rejection_sampling|metoda prihvatanja-odbijanja]], uključuje odabiranje <math>x</math> i <math>y</math> vrednosti i testiranja da li je funkcija od <math>x</math> veća od vrednosti <math>y</math>. Ako jeste, prihvata se vrednost <math>x</math>, u surpotnom <math>x</math> vrednost se odbija i algoritam se pokreće ponovo.<ref>{{cite web
<!--
There are a couple of methods to generate a random number based on a [[probability density function]]. These methods involve transforming a uniform random number in some way. Because of this, these methods work equally well in generating both pseudo-random and true random numbers. One method, called the [[Inverse transform sampling|inversion method]], involves integrating up to an area greater than or equal to the random number (which should be generated between 0 and 1 for proper distributions). A second method, called the [[Rejection sampling|acceptance-rejection method]], involves choosing an x and y value and testing whether the function of x is greater than the y value. If it is, the x value is accepted. Otherwise, the x value is rejected and the algorithm tries again.<ref>{{cite web
| last = The MathWorks | first = | title = Common generation methods | work = | url=http://www.mathworks.de/help/toolbox/stats/br5k9hi-1.html | accessdate = 2011-10-13 }}</ref><ref>{{ cite web | last = The Numerical Algorithms Group | first = | title = G05 – Random Number Generators | work = NAG Library Manual, Mark 23 | url = http://www.nag.co.uk/numeric/fl/nagdoc_fl23/pdf/G05/g05intro.pdf | accessdate = 2012-02-09 }}</ref>
-->
 
=== Ručne metode ===
 
<!--
Generisanje slučajnih brojeva se može obaviti od strane ljudi, razne ulazne vrednosti se prikupljaju od krajnjih korisnika i koriste kao izvor za generaciju slučajnosti. Medutim, većina istraživanja su pronašla da ljudi imaju neki stepen predvidivosti prilikom pokušaja generisanja slučajnog niza npr. brojeva ili slova
Random number generation may also be performed by humans, in the form of collecting various inputs from [[end user]]s and using them as a randomization source. However, most studies find that human subjects have some degree of non randomness when attempting to produce a random sequence of e.g. digits or letters. They may alternate too much between choices when compared to a good random generator;<ref>{{Cite journal
<ref>{{Cite journal
| author = W. A. Wagenaar
| title = Generation of random sequences by human subjects: a critical survey of the literature
Линија 100 ⟶ 101:
| pages = 65–72
| doi = 10.1037/h0032060
}}</ref>. thus,Tako thisda approachovaj ispristup notnije widelyu usedširokoj upotrebi.
-->
 
== Naknadno procesiranje i statističke provere ==
 
Čak i kada je dat izvor verovatno nasumičnih brojeva (dat od strane generatora zasnovanih na kvantnoj mehanici), dobijanje brojeva koji su u potpunosti nasumični zahteva obazrivost. Pored toga, ponašanje ovih generatora se često menja ujedno sa temperaturom, voltažom napajanja, starošću uređaja ili usled drugih spoljašnjih faktora. Slično tome, softverski bag u algoritmu za generisanje pseudo-slučajnih brojeva, ili hardverski bag u hardveru na kome generator radi, može biti komplikovan za otkrivanje.
 
Generisani slučajni brojevi su ponekad izloženi statističkim proverama pre upotrebe da bi se garantovalo da osnovni izvor još uvek radi, a onda se taj niz brojeva i naknadno procesuira da bi se poboljšala njegova statistička svojstva. Primer bi bio -{TRNG9803}-<ref>{{cite web|last=Dömstedt|first=B.|title=TRNG9803 True Random Number Generator|url=http://www.trng98.se/serial_trng_9803.html|publisher=www.TRNG98.se|location=Manufacturer|year=2009}}</ref> uredaj za generisanje slucajnih brojeva, koji koristi veličinu entropije kao hardverski test, a onda naknadno procesuira slučajni niz pomeračko registarskim šifrantom. Obično je teško koristiti statističke testove radi validacije generisanih slučajnih brojeva. Vang i Nikol <ref>{{cite web|last=Wang|first=Yongge|title=Statistical Properties of Pseudo Random Sequences and Experiments with PHP and Debian OpenSSL|url=http://link.springer.com/chapter/10.1007%2F978-3-319-11203-9_26|publisher=Springer LNCS|location=Heidelberg|year=2014}}</ref> su predložili metodu statističkog testiranja baziranog na distanci kako bi se ustanovile slabosti nekih generatora slučajnosti.
<!--
Even given a source of plausible random numbers (perhaps from a quantum mechanically based hardware generator), obtaining numbers which are completely unbiased takes care. In addition, behavior of these generators often changes with temperature, power supply voltage, the age of the device, or other outside interference. And a software bug in a pseudo-random number routine, or a hardware bug in the hardware it runs on, may be similarly difficult to detect.
 
Generated random numbers are sometimes subjected to statistical tests before use to ensure that the underlying source is still working, and then post-processed to improve their statistical properties. An example would be the TRNG9803<ref>{{cite web|last=Dömstedt|first=B.|title=TRNG9803 True Random Number Generator|url=http://www.trng98.se/serial_trng_9803.html|publisher=www.TRNG98.se|location=Manufacturer|year=2009}}</ref> hardware random number generator, which uses an entropy measurement as a hardware test, and then post-processes the random sequence with a shift register stream cipher. It is generally hard to use statistical tests to validate the generated random numbers. Wang and Nicol<ref>{{cite web|last=Wang|first=Yongge|title=Statistical Properties of Pseudo Random Sequences and Experiments with PHP and Debian OpenSSL|url=http://link.springer.com/chapter/10.1007%2F978-3-319-11203-9_26|publisher=Springer LNCS|location=Heidelberg|year=2014}}</ref> proposed a distance-based statistical testing technique that is used to identify the weaknesses of several random generators.
-->
 
== Ostala razmatranja ==
<!--
Random numbers uniformly distributed between 0 and 1 can be used to generate random numbers of any desired distribution by passing them through the inverse [[cumulative distribution function]] (CDF) of the desired distribution(see [[Inverse_transform_sampling]]). Inverse CDFs are also called [[quantile function]]s. To generate a pair of [[Statistical independence|statistically independent]] [[Normal distribution|standard normally distributed]] random numbers (''x'', ''y''), one may first generate the [[polar coordinates]] (''r'', ''θ''), where ''r''~[[Chi-squared distribution|χ<sub>2</sub><sup>2</sup>]] and ''θ''~[[Uniform distribution (continuous)|UNIFORM(0,2π)]] (see [[Box–Muller transform]]).
 
Slučajni brojevi ravnomerno raspodeljeni izmedju 0 i 1 mogu biti korišceni za generisanje slučajnih brojeva bilo koje željene raspodeljenosti njihovim provlačenjem kroz inverznu [[Функција_расподеле|funkciju raspodele]] željene raspodele (pogledati [[:en:Inverse_transform_sampling|Inverse_transform_sampling]]). Inverzne funkcije raspodele se takodje nazivaju [[:en:quantile function|kvantilne funkcije]]. Da bi se generisao par [[:en:Statistical independence|statisticki nezavisnih]] [[Нормална_расподела|normalno raspodeljenih]] slučajnih brojeva (''x'', ''y''), prvo je potrebno generisati [[Поларни_координатни_систем|polarne koordinate]] (''r'', ''ϴ''), gde je ''r''~[[:en:Chi-squared distribution|χ<sub>2</sub><sup>2</sup>]] i ''θ''~[[:en:Uniform distribution (continuous)|uniformno(0,2π)]] (pogledati [[:en:Box–Muller transform|Boks-Miler transformaciju]]).
Some 0 to 1 RNGs include 0 but exclude 1, while others include or exclude both.
 
Neki 0 do 1 generatori slučajnih brojeva uključuju 0 ali isključuju 1, dok drugi uključuju ili isključuju oba.
The outputs of multiple independent RNGs can be combined (for example, using a bit-wise [[XOR]] operation) to provide a combined RNG at least as good as the best RNG used. This is referred to as [[Hardware random number generator#Software whitening|software whitening]].
 
Izlazi većeg broja nezavisnih generatora slučajnih brojeva se mogu kombinovati (na primer, upotrebom bitovske [[Искључива_дисјункција|XOR]] operacije) da bi se obezbedila nasumičnost brojeva koja je dobra bar toliko koliko je dobar najbolji od pojedinačnih generatora slučajnih brojeva. Ovo se još i naziva [[:en:Hardware random number generator#Software whitening|beljenje softvera]].
Computational and hardware random number generators are sometimes combined to reflect the benefits of both kinds. Computational random number generators can typically generate pseudo-random numbers much faster than physical generators, while physical generators can generate "true randomness."
-->
== Slabo diskrepantni nizovi kao alternativa ==
 
Računski i hardverski generatori slučajnih brojeva se nekada kombinuju radi odražavanja kvaliteta oba tipa. Računski generatori obično generišu pseudo-slučajne brojeve mnogo brže nego hardverski generatori, dok hardverski generatori mogu generisati "pravu nasumičnost".
 
== Slabo diskrepantni nizovi kao alternativa ==
<!--
 
Some computations making use of a random number generator can be summarized as the computation of a total or average value, such as the computation of integrals by the [[Monte Carlo method]]. For such problems, it may be possible to find a more accurate solution by the use of so-called [[low-discrepancy sequence]]s, also called [[quasirandom]] numbers. Such sequences have a definite pattern that fills in gaps evenly, qualitatively speaking; a truly random sequence may, and usually does, leave larger gaps.
Neka izračunavanja koja koriste generatore slučajnih brojeva se mogu sažeti na izračunavanja konačne ili srednje vrednosti, kao što su izračunavanja integrala [[Монте_Карло_метода| Monte Karlovom metodom]]. Za ovakve probleme moguće je naći preciznija rešenja upotrebom [[:en:low-discrepancy sequence|nizova male nedoslednosti]] koji se još nazivaju [[:en:low-discrepancy sequence|kvazi-nasumičnim]] brojevima. Takvi nizovi imaju određeni obrazac koji ravnomerno popunjava praznine, kvalitativno govoreći; pravi slučajni niz može imati, a obično i ima, veće praznine.
-->
 
== Aktivnosti i demonstriranja ==
<!--
The following sites make available Random Number samples:
# The [[SOCR]] resource pages contain a number of [http://wiki.stat.ucla.edu/socr/index.php/SOCR_EduMaterials_Activities_RNG hands-on interactive activities and demonstrations] of random number generation using Java applets.
# The Quantum Optics Group at the [[ANU]] generates random numbers sourced from quantum vacuum. You can download a sample of random numbers by visiting their [http://photonics.anu.edu.au/qoptics/Research/qrng.php quantum random number generator ] research page.
# [http://Random.Org Random.Org] makes available random numbers that are sourced from the randomness of atmospheric noise. [http://www.random.org/ Visit their page] to obtain a sample.
# The [http://random.irb.hr/ Quantum Random Bit Generator Service] at the [[Ruđer Bošković Institute]] harvests randomness from the quantum process of photonic emission in semiconductors. They supply a variety of ways of fetching the data, including libraries for several programming languages.
-->
 
Navedene stranice obezbeđuju uzorke slučajnih brojeva:
==Бекдор==
 
<!--
#[[:en:SOCR|SOCR]] sadrži brojne [http://wiki.stat.ucla.edu/socr/index.php/SOCR_EduMaterials_Activities_RNG interaktivne aktivnosti i demonstracije] generisanja slučajnih brojeva upotrebom Java apleta.
{{Main|Бекдор}}
 
Since much cryptography depends on a cryptographically secure random number generator for key and [[cryptographic nonce]] generation, if a random number generator can be made predictable, it can be used as [[backdoor (computing)|backdoor]] by an attacker to break the encryption.
# Kvantna Optička Grupa ({{jez-en|The Quantum Optics Group}}) na [[Аустралијски_национални_универзитет|ANU]] generiše slučajne brojeve poreklom iz kvantnog vakuuma. Vi možete skinuti primerak slučajnih brojeva posetom njihove stranice istraživanja [http://photonics.anu.edu.au/qoptics/Research/qrng.php kvantnih generatora slučajnih brojeva].
 
# [http://Random.Org Random.Org] generiše slučajne brojeve čiji je izvor nasumičnost u atmosferskom šumu. [http://www.random.org/ Posetite njihovu stranicu] da biste dobili uzorak.
 
# [http://random.irb.hr/ Quantum Random Bit Generator Service] na [[:sh:Institut_Ruđer_Boškovic|Institutu Ruđer Bošković]] prikuplja nasumičnost iz kvantnog procesa emisije fotona u poluprovodnicima. Oni obezbeđuju raznovrsne načine prikupljanja podatakam, uključujuci i datoteke zaglavlja za nekoliko programskih jezika.
 
==Bekdor==
 
 
Pošto kriptografija velikim delom zavisi od kriptografski bezbednog generatora slučajnih brojeva za generisanje ključa i [[:en:Cryptographic_nonce|kriptografskog broja]], ukoliko je generator brojeva predvidiv, on se može koristiti kao [[Бекдор|bekdor]] od strane napadača radi razbijanja [[Enkripcija|enkripcije]].
 
Smatra se da je [[НСА|Državna bezbednosna služba ]]({{јез-енгл|National Security Agency / NSA}}) umetnula bekdor u [[:sh:Nacionalni_institut_za_standarde_i_tehnologiju|NIST]]-ov [[:en:Cryptographically_secure_pseudorandom_number_generator|kriptografski bezbedan generator brojeva]] [[:en:Dual_EC_DRBG|Dual_EC_DRBG]]. Ako se na primer -{SSL}- veza formira koristeći ovaj generator slučajnih brojeva, onda bi po Metju Grin-u to omogućilo NSA da odredi stanje generatora slučajnih brojeva, i time eventualno bude u stanju da očita sve podatke poslate preko -{SSL}- veze.<ref>{{cite web|url=http://blog.cryptographyengineering.com/2013/09/the-many-flaws-of-dualecdrbg.html|title=The Many Flaws of Dual_EC_DRBG|author=matthew Green}}</ref> Iako je bilo očigledno da je Dual_EC_DRBG bio jako loš i moguće je da je bio bekdorovan još dugo pre nego što je -{NSA}- bekdor bio potvrđen 2013, dati algoritam je video značajnu upotrebu u praksi do 2013, na primer od strane istaknute bezbednosne kompanije -{RSA Security}-<ref name="green">{{cite web|url=http://blog.cryptographyengineering.com/2013/09/rsa-warns-developers-against-its-own.html|title=RSA warns developers not to use RSA products|author=Matthew Green}}</ref>. Potom je bilo i optužbi da je -{RSA Security}- namerno uključila NSA bekdor u svoju produkciju. -{RSA}- je porekla namerno uključivanje bekdora u svoje proizvode.<ref>{{cite web|url=http://arstechnica.com/security/2013/09/we-dont-enable-backdoors-in-our-crypto-products-rsa-tells-customers/|title=We don’t enable backdoors in our crypto products, RSA tells customers|publisher=Ars Technica}}</ref>
 
Takođe je bilo teoretisano da se hardverski generatori slučajnih brojeva mogu tajno modifikovati da imaju manji stepen entropije nego što je navedeno, što bi dovelo do toga da enkripcija koristeći hardverske generatore slučajnih brojeva bude podležna napadima. Jedan od takvih metoda koji je publikovan radi modifikovanjem čipa, što bi bilo neprimetno optičkom obrnutom-inženjeringu.<ref>{{cite web|url=http://arstechnica.com/security/2013/09/researchers-can-slip-an-undetectable-trojan-into-intels-ivy-bridge-cpus/|title=Researchers can slip an undetectable trojan into Intel’s Ivy Bridge CPUs|publisher=Ars Technica}}</ref> Na primer, za generisanje slučajnih brojeva na -{Linux}--u, smatra se neprihvatljivim da se koristi [[Интел|Intel-ov]] [[:en:RdRand|RdRand]] hardver generator slučajnih brojeva bez mešanja RdRand izlaza sa drugim izvorima entropije da bi se neutralisao bilo koji bekdor u hardverskom generatoru slučajnih brojeva, posebno nakon otkrića NSA-ovog Bullrun programa.<ref>{{cite web|url=https://plus.google.com/117091380454742934025/posts/SDcoemc9V3J|title=I am so glad I resisted pressure from Intel engineers to let /dev/random rely only on the RdRand instruction. |publisher=Google Plus|author=Theodore Ts'o}}</ref><ref>{{cite web|url=https://lwn.net/Articles/567077/|title=Re: [PATCH] /dev/random: Insufficient of entropy on many architectures|publisher=LWN|author=Theodore Ts'o}}</ref>
The NSA is reported to have inserted a backdoor into the [[National Institute of Standards and Technology|NIST]] certified [[cryptographically secure pseudorandom number generator]] [[Dual_EC_DRBG]]. If for example an SSL connection is created using this random number generator, then according to [[Matthew Green (cryptographer)|Matthew Green]] it would allow NSA to determine the state of the random number generator, and thereby eventually be able to read all data sent over the SSL connection.<ref>{{cite web|url=http://blog.cryptographyengineering.com/2013/09/the-many-flaws-of-dualecdrbg.html|title=The Many Flaws of Dual_EC_DRBG|author=matthew Green}}</ref> Even though it was apparent that Dual_EC_DRBG was a very poor and possibly backdoored pseudorandom number generator long before the NSA backdoor was confirmed in 2013, it had seen significant usage in practice until 2013, for example by the prominent security company [[RSA Security]].<ref name="green">{{cite web|url=http://blog.cryptographyengineering.com/2013/09/rsa-warns-developers-against-its-own.html|title=RSA warns developers not to use RSA products|author=Matthew Green}}</ref> There have subsequently been accusations that RSA Security knowingly inserted a NSA backdoor into its products, possibly as part of the [[Bullrun (decryption program)|Bullrun]] program. RSA has denied knowingly inserting a backdoor into its products.<ref>{{cite web|url=http://arstechnica.com/security/2013/09/we-dont-enable-backdoors-in-our-crypto-products-rsa-tells-customers/|title=We don’t enable backdoors in our crypto products, RSA tells customers|publisher=Ars Technica}}</ref>
 
===Manipulisanje generisanjem slučajnih brojeva===
It has also been theorized that hardware RNGs could be secretly modified to have less entropy than stated, which would make encryption using the hardware RNG susceptible to attack. One such method which has been published works by modifying the dopant mask of the chip, which would be undetectable to optical reverse-engineering.<ref>{{cite web|url=http://arstechnica.com/security/2013/09/researchers-can-slip-an-undetectable-trojan-into-intels-ivy-bridge-cpus/|title=Researchers can slip an undetectable trojan into Intel’s Ivy Bridge CPUs|publisher=Ars Technica}}</ref> For example, for random number generation in Linux, it is seen as unacceptable to use Intel's [[RdRand]] hardware RNG without mixing in the RdRand output with other sources of entropy to counteract any backdoors in the hardware RNG, especially after the revelation of the NSA Bullrun program.<ref>{{cite web|url=https://plus.google.com/117091380454742934025/posts/SDcoemc9V3J|title=I am so glad I resisted pressure from Intel engineers to let /dev/random rely only on the RdRand instruction. |publisher=Google Plus|author=Theodore Ts'o}}</ref><ref>{{cite web|url=https://lwn.net/Articles/567077/|title=Re: [PATCH] /dev/random: Insufficient of entropy on many architectures|publisher=LWN|author=Theodore Ts'o}}</ref>
-->
 
Edi Tipton, bivši šef bezbednosti Lutrijske Asocijacije Amerike ({{јез-енгл| US Multi-State Lottery Association}}), je instalirao softver koji mu je omogućio da manipuliše generisanjem dobitnih kombinacija za lutriju.
==Manipulisan generator slučajnih brojeva==
<ref>https://www.theguardian.com/technology/2016/apr/08/man-hacked-random-number-generator-rig-lotteries-investigators-say</ref>
<!--
Eddie Tipton, the former security director of the US Multi-State Lottery Association, installed software code that allowed him to predict winning numbers on specific days of the year.<ref>https://www.theguardian.com/technology/2016/apr/08/man-hacked-random-number-generator-rig-lotteries-investigators-say</ref>
-->
 
==U popularnoj kulturi==
<!--
The process of random number generation in games, especially in [[Roguelike|roguelike games]], is often referred to as being controlled by a "Random Number God" or "RN-Jesus". The term was originally coined by players of the games [[Angband (video game)|Angband]] and [[NetHack]],<ref>{{cite web|url=http://tvtropes.org/pmwiki/pmwiki.php/Main/RandomNumberGod|title=Random Number God - TV Tropes|publisher=TV Tropes}}</ref> and also references the belief that certain actions can either appease or anger the "God", leading to number generation seemingly skewed for or against the player.-->
 
Za proces generisanja slučajnih brojeva u igrama, posebno u [[:en:Roguelike|roguelike igrama]] se često kaže da je pod kontrolom "Random Number God"-a ili "RN-Jesus"-a. Dati pojam je izvorno skovan od strane igrača igara [[:en:Angband (video game)|Angband]] i [[:en:NetHack|NetHack]],<ref>{{cite web|url=http://tvtropes.org/pmwiki/pmwiki.php/Main/RandomNumberGod|title=Random Number God - TV Tropes|publisher=TV Tropes}}</ref> i poziva se na verovanje da određena dejstva mogu umiriti ili naljutiti Boga, što zauzvrat dovodi do generisanja brojeva koji su naizgled za ili protiv igrača.
== Vidi još ==
{{Portal|Computer security}}
 
{{Div col||22em}}
* [[Flipism]]
* [[List of random number generators]]
* [[PP (complexity)]]
* [[Procedural generation]]
* [[Randomization]]
* [[Randomized algorithm]]
* [[Random number generator attack]]
* [[Random password generator]]
* [[Random variable]], contains a chance-dependent value
* [[Randomness]]
{{Div col end}}
 
== Reference ==