DIY: Physical Random Number Generators & Double Slit Experiment

One of the benefits of Quantum Computing is their ability to generate truly random numbers.

Since classical computers are deterministic machines, governed by algorithms, they are inherently predictable. Therefor any number generated by a classical computer, even if it seems complex is actually based on a set of conditions or algorithm, which therefor makes it a “pseudo random number”, rather than truly random.

To generate truly random numbers you need to rely on a physical processor or phenomena that are unpredictable, examples of this include radioactive decay, electronic noise or even atmospheric noise.

Since QC is essentially based on a physical process and the probabilistic nature of quantum mechanics, its qubits can exist in a superposition state, this means they can represent a combination of 0 and 1 simultaneously, this state/property can be harnessed by QRNG (Quantum random number generators) to produce truly random numbers.

As a fun project, I decided to build a small physical QRNG using an Arduino, laser diode, beam splitter and two photo resistors. The basic premise is that you pulse the laser, it sends a wave/particle (both!) through the beam splitter, 50% of the time it should hit one of the two photo resistors, providing you with a random string of “1”s or “0”s.

While a very simple, basic and small example, it is a fun experiment. Check out OpenQbit.com if you would like to build your own. To make this a little easier, I laser cut a template/outline for the beam splitter for holding each of the components.

Enjoy Randomness? Check out these blog, sites, references: http://www.reallyreallyrandom.com

Non Quantum RNG generator using zener noise: http://www.reallyreallyrandom.com/zener/breadboard/

Nice video explaining the seed variables used and middle squares: https://www.khanacademy.org/computing/computer-science/cryptography/crypt/v/random-vs-pseudorandom-number-generators

Side Project: qubit²

Over the past couple of years I have had a keen interest in quantum computing and the optimism of its benefits over traditional computing methods. I have read countless papers, articles and spent a considerable amount of time deciding how I would explain it to a 5 year old.

ELI5: A normal computer is like a light switch is either on or off. A quantum computer is more like a dimmer switch, it can be partially on, or partially off.

It’s overly simplistic but gives a simple understanding of the potential states that the device can be in. I also wonder how I would explain QC to friends or technology friends. Trying to find the right words that quantify both its elementary simplicity and its quantitative complexity is difficult, especially when you yourself don’t fully grasp it. But like other technologies, the best way to learn is by doing … experimenting, researching and proofing. Leading to your own understanding and comprehension of existing anecdotes and theories or new ones. read more

A simplistic Node.js implementation of RSA encryption/decryption

This is a basic and simplistic implementation of RSA in JS which used to understand the implementation/math required for encryption/decryption and opportunities for hacking RSA using Quantum Computing.

If you are looking for a nice article on RSA and a small practical example, this might be helpful https://simple.wikipedia.org/wiki/RSA_algorithm

Hacking RSA using Prime Number Factorization

Hacking RSA uses the numeric public exponent from the public key and tries to calculate its largest common multiple factors (p and q) – from those two numbers you can calculate the Private Key. Using traditional computing to hack “small” RSA public keys can be done with a few modern algorithms, including the currently fastest General Number Field Sieve.

A nice library for General Number Field Sieves is http://cado-nfs.gforge.inria.fr/

You can use this site to factor a prime without having to install anything https://asecuritysite.com/encryption/factors. Enter the Public Key which gets generated by the code (should be < 100 bits for the site to be able to factor)

Installation

npm install

Usage

Edit the index.js file if you would like to edit the size or message being encrypted:

// Message
const message = 'Hello';

// Generate RSA keys (bits), max is 232 digits (768 bits)
const keys = RSA.generate(80);

Run the code

npm run start

Example Output

Public Key Exponent (e):65537 Random Prime (p): 798000088811 Random Prime (q): 563631878177 Totient (lcm of (p-1)(q-1)): 224889144420297550405280 ------------------------------------------------- Keys Public Key (n = p * q): 449778288841956732777547 Public Key Length: 24 digits (79 bits) Private Key (d = e multiplicative inverse (totient)): 210473481577786144493313 Private Key Length: 24 digits (78 bits) ------------------------------------------------- Message: Hello Encoded: 72101108108111 Encrypted (c = encoded message (m) ^ e modulo n): 426078873740860671226694 Decrypted (m = encrypted message (c) ^ d modulo n): 72101108108111 Decoded: Hello Correct? true read more

Plaid

Plaid is a company in the financial technology, or more commonly known as the “fintech” space, which was founded in 2013, pivoted sometime in 2014 and was purchased by Visa in January 2020 for $5.3 billion dollars.

Plaid was founded by two entrepreneurs who set out to develop a consumer app in the budgeting and account reconciliation field. A mobile or app-based version of Quicken or Intuits Quick Books where users could provide their credit cards and bank account and the interface would allow them to get some insights into their spending habits and create budgets and reports to better manage their personal finances. The startup entered and won a prestigious grand prize award during a TechCrunch Disrupt hackathon in New York in 2013 with their application which at that time was called “Rambler”. During the development process the founders recognized that one of the biggest challenges to building “Rambler” was the bank connectivity component – it was time consuming and resource intensive to develop a solution which connected to each financial institution. The duo wanted their application to connect to the majority of US banks and this required writing code which would need to securely connect and consume the banks exposed API’s for retrieving account information, transaction reports and transaction details. This development exercise was required for each new financial institution the company wanted to include in their app. read more

Open Source Project & Paper: Blockchain proof of concept

Late last year I wrote a small paper (for my MBA program) and developed an accompanying proof of concept (Javascript/Node/P2P) on the implementation of blockchain in the retail or food distribution network around protecting goods from food fraud.

Source Code: https://github.com/paschmann/blockchain_origin

Abstract

Food fraud is a crime which has the potential to negatively affect the brand image, financial resources and impact multiple parties in the supply chain paradigm of food distribution. The ability to track and trace the origin and touch points of products throughout the network is imperative to limit the impact caused by a food fraud incident or a food safety issue. Blockchain has the potential to disrupt multiple industries by providing a shared and trusted ledger of transactions which no single company controls. One practical application of blockchain is utilizing the platform as a static register – a distributed database for storing reference data. In this paper I will describe a technical implementation of a blockchain in a practical scenario which shares the details and a proof of concept of a food origin scenario. The implementation will share a simplistic JavaScript application of a digital ledger based blockchain allowing manufacturers to register data on the food origin in the static registry and vested parties the ability to augment and view the data for the purpose of traceability and accuracy. read more

The Odebrecht Group: Ethical Insight

Here is a paper I wrote (with 3 colleagues) on the graft and fraud within The Odebrecht Group.

December 11, 2018

Executive Summary

The Odebrecht Group, established in 1944, was once a flourishing family run business that grew into a $40 billion conglomerate. The company operates within the construction and engineering industry through the development of infrastructure and energy projects. During a money laundering investigation in 2015, The Odebrecht Group was found to be a key company at the center of one of the largest bribery and corruption scandals in the world. The company admitted to using deceitful tactics to gain business around the globe. These tactics proved not only to be contradictory to the company’s guiding principles, but also against the law in many countries. Since this unethical behavior came to light, the company has faced many financial and reputational repercussions. However, The Odebrecht Group is currently making strides to better its compliance programs and leadership. To further these efforts, the company should establish practices to improve the company’s overall ethical culture, enhance ethical leadership commitment and build upon compliance monitoring structures. read more

Personality Traits?

Did you know that heredity is the most dominant factor in your personality? An intriguing example of this is the “Jim Twins”:

https://mctfr.psych.umn.edu/research/UM%20research.html

One example of the amazing similarity of twins reared apart is the so-called “Jim twins”. These twins were adopted at the age of four weeks. Both of the adopting couples, unknown to each other, named their son James. Upon reunion of the twins when they were 39 years old, Jim and Jim have learned that:

  • Both twins are married to women named Betty and divorced from women named Linda.
  • One has named his first son James Alan while the other named his first son James Allan.
  • Both twins have an adopted brother whose name is Larry.
  • Both named their pet dog “Toy.”
  • Both had some law-enforcement training and had been a part-time deputy sheriff in Ohio.
  • Each did poorly in spelling and well in math.
  • Each did carpentry, mechanical drawing, and block lettering.
  • Each vacation in Florida in the same three-block-long beach area.
  • Both twins began suffering from tension headaches at eighteen, gained ten pounds at the same time, and are six feet tall and 180 pounds.
  • read more