Quantum-powered

Randomised Password Generator

rainbowFrom Pseudo to Quantum Randomness

Traditional pseudo-random number generators (PRNGs) rely on deterministic algorithms and seeds. True random number generators (TRNGs) use physical noise, while quantum random number generators (QRNGs) exploit fundamental unpredictability of quantum mechanics for irreducible randomness.

batmanCryptographic Need for Secure Randomness

  • Unpredictability: Bits should be impossible to guess.
  • Uniformity: Equal chance for 0 and 1.
  • Forward/backward secrecy: Compromise of some outputs shouldn’t reveal others.
  • Performance: Must generate bits fast enough.
  • Auditability: Verifiable against bias or hidden channels.

einstein cycle Weakness of PRNGs

Even cryptographically secure PRNGs (CSPRNGs) still depend on seeds. Weak entropy sources can lead to repeated keys or predictable outputs, breaking security.

collisionQuantum Mechanics: Source of Randomness

Quantum measurement outcomes are inherently probabilistic. Example: a qubit state ∣ψ⟩ = α|0⟩ + β|1⟩ collapses to 0 or 1 with probabilities |α|² and |β|². With a Hadamard gate (H), starting from |0⟩, we get:

H|0⟩ → (|0⟩ + |1⟩)/√2, giving a 50/50 chance of 0 or 1.

laughing einstein QRNG Hardware Examples

Physical QRNG devices use photon splitting, vacuum fluctuations, or electron tunneling. Example: ANU QRNG generates live random bits from quantum vacuum fluctuations.

atom Step-by-Step Workflow

  1. Initialize qubit in |0⟩.
  2. Apply Hadamard (H) gate → superposition.
  3. Measure → collapse into 0 or 1 with equal probability.
  4. Repeat many times to form bitstrings.
  5. Convert groups of bits into integers.
  6. Map integers to alphanumeric/symbol characters.
  7. Concatenate into a password string.

infinity Qiskit Implementation


from qiskit import QuantumCircuit, execute, Aer
def quantum_bit():
qc = QuantumCircuit(1,1)
qc.h(0) # Hadamard gate
qc.measure(0,0) # Measurement
backend = Aer.get_backend('qasm_simulator')
job = execute(qc, backend, shots=1)
result = job.result()
bit = int(list(result.get_counts().keys())[0])
return bit

Repeating this function gives random bits, which can be combined into secure passwords.

motionWhy Quantum-Based Randomness Matters

  • Resistant against future quantum attacks on cryptography.
  • Meets strict security certifications (e.g., defense, finance).
  • Provides entropy for IoT/embedded devices with limited noise sources.
  • Backed by quantum standards and audits for high confidence.
  • Enables advanced protocols like Quantum Key Distribution (QKD).

gridearth Educational Value

Demonstrating quantum randomness with tools like Qiskit makes abstract quantum ideas tangible. Your project illustrates how a “normal” looking password (e.g. p9#dL7yZ!) can be rooted in the irreducible uncertainty of quantum mechanics.

solarFurther Reading

Click "Generate Password" to start