gkasprow / RNG

5Gbit/s Random Number Generator
0 stars 1 forks source link

comments #1

Open jordens opened 5 years ago

jordens commented 5 years ago

Nice project. I know this is just an experiment, and without any ill will and not wanting to come across as lecturing here, a couple of notes on the digital aspects:

gkasprow commented 5 years ago

Thanks for the comment. I already built it. 2019-10-22 23 58 56

Here is the 1GHz scope output. 2019-10-22 23 59 04

And the spectrum 2019-10-22 23 58 46

Good catch wit the hysteresis. What I want to do is to sample it with Artix free-running GTP Here is the project https://github.com/gkasprow/RNG_RPI

It's a hobby project. I want to dig deeper into a controversial project that was led at the Princeton university years ago. It is still collecting the data. They came to some bizarre conclusion. I want to generate roughly a million times better statistics, and try to understand what they did wrong. For this purpose, I built RNGs, an FPGA processing hat that sits on top of RPI. Data are tagged with GPS. I plan to place roughly 20 such units around the world, of course providing that I get some anomalies with my generators, which I doubt. They generate about 1k samples with a Zener diode. I want to use a similar way of producing random numbers. Moreover, they are doing a XOR operation every 1 byte. I will do parallel XOR operations on the same data with various bit periods to have some form of primitive FFT. And, I will use their software to make sure we treat the data in the same way. For some people, the thing I do may sound silly, but there are people who build crazy para-science theories on this GCP research data that I cannot simply stay still.

gkasprow commented 5 years ago

The circuit was oscillating at 5GHz, but with a shield it is calm.

gkasprow commented 5 years ago

btw, I split my repo into two parts. THe second part is here https://github.com/elhep/

jordens commented 5 years ago

Flat within 10 dB out to 2.2 GHz. Good! Go for the highest GTP rate and run as many of the standard statistical tests on it as you can. Then whiten.

GCP is disappointing on so many levels. ;) I don't even want to discuss the flaws with it now. Maybe after a couple of beers.

A high quality fast random bit stream is of crucial importance to everything in quantum communication. This device would be a great addition to Sinara as well. If you could get a gigabit net out of this while passing the tests without doing dirty tricks it would be awesome.

jordens commented 5 years ago

The electrolytics are not rated high enough by the way... They may die well before you get your data.

gkasprow commented 5 years ago

True, but it does not produce a lot of heat, so these capacitors will last for years. They are specified to last 2k hours in 105 degrees. Every 6 degrees their lifetime doubles. Since we will operate in less than 30 degrees I wouldn't worry too much. To get gigabit data out you can use one of free GTPs. In the next revision, I can add gigabit PHY if there is a use case. This FPGA board is based on another RPI hat, so I left Ethernet, SD, and memory even though I don't need them. Just in case I would like it without the RPI. The processing box will get data from up to 4 RNGs to eliminate local bias, but it is another stage of the project. First, I'd like to replicate their effects and then start looking for possible flaws. The generators in GCP are built in a very similar way, but they operate in acoustic bandwidth. I didn't want to make too good RNG to be able to study the potential effects they might create with their equipment.

gkasprow commented 5 years ago

I used general-purpose Zener diode. With low capacitance one, the BW would be wider.

jordens commented 5 years ago

With net I meant a gigabit whitened.

Whitening by duplicating the digital hardware isn't that efficient compared to software whitening with reduced bitrate. Good whitening algorithms are just better.

And I bet you'll be able to replicate the effects they see. Those effects are sensitive to human bias and properly correcting for look-elsewhere/multiple comparison is hard.

gkasprow commented 5 years ago

what do you mean that these effects are sensitive to human bias? Do you mean that people influence the RNGs? These generators are placed in over 100 places around the world and data are acquired automatically. They are looking for events that are detected by multiple units in different parts of the world in the same time interval. At least this is my understanding of the project. My hypothesis is that they unintentionally built a large detector of some cosmic particles which influence the electronics once a few days when they have some events in most of their detectors. Since the effects are barely measurable, imagine that some i.e. muons or GRB photons could change the statistics in the generators. The generators have DC bias removal so the event would need to have an oscillatory character. An atmospheric shower could cause such an effect. That's why I want to measure various XOR-ing periods. Since they could not find a better explanation, they started looking for correlations with various events that are related with thousands of people. But correlation is not a causation.

jordens commented 5 years ago

Multiple comparison/look elsewhere is prevalent through their process. Just two examples from 5 minutes of reading their texts:

After the first few months, during which several statistical recipes were tried, the network variance (netvar) became the standard method which was adopted for almost all events in the formal series.

There are cases where excluding data is a judgment call.

This means that the choice of "recipe" and the exclusion of data are severely biased. If you go through their description you'll find plenty of other examples of bias which are not controlled for in the analysis. It's hilariously bad.

Or take their 9/11 data. They just wait until the observable exceeds their threshold. It's trivially true that it will exceed the threshold at some time. Just as it is trivially true that after their excess it will stop exceeding the threshold at some time. Their choice of "until 4 hours after" is a multiple comparison. Also they make multiple hypotheses about 9/11 and obviously are content with only one exceeding their threshold. It's full of problematic and unmotivated decisions.

And their generation of data appears to be highly questionable as well. None of this is reasoned about. They just make arbitrary choices. Simple example: If you repeat a short (~500 bit) fixed pattern xor (to control the mean as they say), then you'll obviously have massive aliasing problems (500 bit and harmonics end up at 0 and bias the mean).

jordens commented 5 years ago

And let's take 9/11: you can postulate that many people went indoors and started watching the news. What's the upper limit on the effect of increased power grid flluctuations, air conditioning noise, temperature fluctuations, increased CFL/TV EMI emissions on the RNGs?

gkasprow commented 5 years ago

I'm not interested in correlations with some events like 9/11 at all. It's bullshit. I'm only looking at physical deviations that are observed by all or most devices at the same time. I want to study the effects they report to understand what they possibly could measure. I don't precisely know how their RNGs work. It's trivial and amateur equipment. That's why I built my own. I can also place a mezzanine with true quantum RNG from IDQuantiq. The obvious influence is a grid. WIth XORing every 500bits, the 50Hz can influence the RNGs. That's why I want to do statistics on multiple channels in parallel, also ones without any ZORing. I placed quite big FPGA and RPI to enable easy remote access to them.

jordens commented 5 years ago

I don't understand why electron noise of a Zener diode is less "true quantum" than photon noise. There is no inherent benefit in shot noise. From both a technical and physical perspective the randomness is equal but a Zener diode is likely much easier and better for implementation. Your setup is a really good approach for building a high quality fast HWRNG. It's a perfect platform for studying the quality of that random data. I'd just look at the myriad of simple bias hypotheses first (bandwidth, temperature, power, aging, feedback, daily/yearly variations, numerics...) before going anywhere else.

gkasprow commented 5 years ago

It's easier to influence the Zener diode than single photon source :)

jordens commented 5 years ago

I doubt that. The lasers are not single photon sources anyway. The photon statistics of lasers is limited as well. They are easily modulated by all kinds of things and they have feedback. Same goes for the photon detectors. Their QE and background counts are modulated. I'm not aware of a comprehensive comparison of purely electronic noise sources and photo-electronic noise sources.

gkasprow commented 5 years ago

That's true. Most of the recent attacks on QKD use subtle features of lasers and detectors. The attacker can seriously influence or even intercept quantum communication without even playing with quantum physics.