Skip to content

Instantly share code, notes, and snippets.


David Wong mimoo

View GitHub Profile
mimoo /
Last active Sep 10, 2020
quantum computers opinions


2018-11-15 - Mikhail Dyakonov - The Case Against Quantum Computing

Could we ever learn to control the more than 10300 continuously variable parameters defining the quantum state of such a system? My answer is simple. No, never.

2015 - Bela Bauer of StationQ Research said in a joint statement with five other researchers

Recent improvements in control of quantum systems make it seem feasible to finally build a quantum computer within a decade.”

mimoo /
Last active Aug 15, 2020
Zero-Knowledge Proofs FAQ

What's a ZK-SNARK?

A Zero-Knowledge Succinct Non-interactive adaptive ARgument of Knowledge is a term coined by Nir Bitansky† Ran Canetti‡ Alessandro Chiesa§ Eran Tromer in 2011 (From extractable collision resistance to succinct non-interactive arguments of knowledge, and back again).

What are succint proofs?

the ZKProof reference documents different types of succintness:

  • Fully succinct: Proof length independent of statement size. O(1) crypto elements (fully)
  • Polylog succinct: Polylogarithmic number of crypto elements
mimoo /
Last active Aug 9, 2020
Moving Out From SF

Moving Out From San Francisco

San Francisco is not a great city

San Francisco is one of the most horrifying showcases of the US homelessness crisis; the rents are absurdly high; the weather is not great, I pretty much never have the opportunity to wear my shorts and flip flops, I always need a sweater, and if I want to stay out later in the night then I need a jacket; It is not very dense, meaning that you can't really walk around and see shops and restaurants and bars, unless you are fine with limiting yourself to a single street of a neighborhood. In conclusion, SF is really not that great of a city, for someone who likes to live in a city.


Cute Cryptography Stories

Lamport says:

I have long felt that, because it was posed as a cute problem about philosophers seated around a table, Dijkstra's dining philosopher's problem received much more attention than it deserves. (For example, it has probably received more attention in the theory community than the readers/writers problem, which illustrates the same principles and has much more practical importance.) I believed that the problem introduced in [41] was very important and deserved the attention of computer scientists. The popularity of the dining philosophers problem taught me that the best way to attract attention to a problem is to present it in terms of a story.

This page attempts to list these stories.

  • Alice and Bob

    For our scenarios we suppose that A and B (also known as Alice and Bob) are two users of a public-key cryptosystem.

View gist:2878889192e54f9650215414470e98a8
  • process_local_timeout(round: Round)
    • if round_state.round does not match round, return
    • (if the timer is an interval timer, we do not need this step)
    • if round_state.vote_sent is empty, this is the first timeout this round (we haven't already voted for a timeout):
      • create a NIL block by calling nil_block = proposal_generator.generate_nil_block(round)
      • execute and store the block by calling executed_block = block_store.execute_and_insert_block(nil_block)
      • obtain a signed vote by calling
      • store the vote in round_state.vote_sent
    • if has an empty timeout_signature:
      • create a timeout payload with the current epoch and round:
mimoo /
Last active Jun 6, 2020
broadcast protocols

Broadcast Protocols


  • broadcast protocols are about sending a request to enough peers, and the peers successfuly receiving it

  • there are different types of broadcasts protocols, and byzantine broadcast protocols work in the presence of adversaries

  • an atomic broadcast is what people refer to as a consensus protocol

  • byzantine broadcast protocols

    • the sender can be byzantine
mimoo /
Last active May 31, 2020
Short Authenticated Strings


cross-authentication protocols using short authenticated strings:

  • pretty much an unauthenticated key exchange between two devices
  • followed by comparing a short value (6 digits usually) displayed by the devices to authenticate the transcript/output of the key exchange
  • this short value is public, but cannot be tampered with

Attacker Model


1. learn your ingredients

To cook great food, you need to know what are the different spices at your disposition, the different types of herbs, roots, mushrooms, and sauces. All of that.

example: how boring would cooking be if coconut milk didn't exist? or choriander? or fish sauce? etc.

Not only this: you must understand how they taste, how they taste on their own, how they taste when mixed with others, and how they taste raw, once heated, boiled, grilled, etc.

mimoo /
Last active Apr 8, 2020
patents in crypto

Infamous patents in cryptography

  • 1976-1977 - Diffie-Hellman - the patent was filled more than a year after the idea was circulated/published, thus was invalid. The invalid patent expired in 1997.
  • 1991 - Schnorr signatures - Schnorr is obviously the best signature scheme we have, yet the NIST went ahead and standardized the sub-primitives DSA and ECDSA to circumvent Schnorr's patents (Schnorr was not happy 1, 2). In 2008 the patents expired and EdDSA and other schnorr-based signatures started flourishing again.
  • 1996 - NTRU - The algorithm was placed in the public domain in 2017.

    A note on patents. One reason that NTRU is not more widely deployed is that there have been patents restricting its usage fo


User <-> Machine Authentication


  • PKI
  • PAKE
  • SAS


You can’t perform that action at this time.