KyberLock is a new web app, similar to PassLok, making quantum-proof cryptography easy to use. It is based on the recently released standard for post-quantum encryption, and has a strength comparable to that of AES-192. The main method is called Crystals-Kyber by its authors, hence the name of the app.
You may ask, why mess with quantum-proof cryptography now, since quantum computers capable of breaking current methods are not yet expected to be available in the next ten years? Because you may have private data right now that you would not like to be vulnerable even in ten years’ time. Someone might record it in encrypted state, and wait until quantum computers can decrypt it.
You can get it from its GitHub page, or run it from its own page. Don’t forget to look at the code.
Are we still safe with current encryption methods? Yes and no. We are still safe when it comes to logging in to a website because the encrypted messages exchanged back and forth between client computers and servers typically don’t have much value after some time. Even a password, which you’d like to keep reusing for a while, is likely to be changed in a time scale of months. Quantum computers are predicted to become powerful enough to break current asymmetric encryption methods in a matter of ten years, so we are safe there.
But sometimes we exchange private information that has a useful life beyond those ten years. Biometric data comes to mind, as well as account numbers and medical records. A patient interloper could be recording all the encrypted data that we send or receive, in the hope of retrieving something useful when cracking it becomes feasible. Therefore, it makes sense to start using quantum-proof methods now, rather than wait until current methods are insecure.
The US National Institute for Standards and Technology (NIST) knows this, and they have been testing quantum-proof methods for years. A worldwide competition started in 2016 to choose the best methods has just concluded, and a new standard has been issued barely two months ago. The winner is Crystals-Kyber, a method based on the very abstruse math of Module Lattices. The name seems to be a shout-back at the Star Wars world: a kyber crystal is always to be found as the core of a light saber. Alongside the winner for encryption, two winners have been announced for digital signatures: Crystals-Dilithium (here the shout-back is at the Star Trek world), also based on Module Lattices, and SPHINCS+, based on hashes. All are explained in excruciating detail in this document. Read it if you are a mathematician, a Star wars or Star Trek fan, or simply are looking for a quick headache.
Fortunately, folks have already implemented these methods into libraries that developers can use without much knowledge of the math. I like particularly the Noble Cryptography JavaScript libraries, by Paul Miller. I have taken those and added the user interface of PassLok (encryption based on elliptic curves), and the result is KyberLock.
Those familiar with PassLok will feel at ease with KyberLock since its interface is almost the same, but there are a few differences:
- Kyber keys are much larger than the 256 bits of the PassLok keys. Consequently, it is not possible to transmit Kyber public keys through QR codes or as part of an invitation URL. It also impracticable to authenticate them by reading them aloud in their entirety. Instead, KyberLock generates a 256-bit hash of the public key, called the “fingerprint”, which can be read aloud in a video like PassLol keys. Users who receive a KyberLock public key (called a “Lock”) from someone can authenticate them upon reception by calling the sender and asking him/her to read aloud its fingerprint, both before and after entering them into KyberLock. Locks that fail to authenticate can be deleted easily.
- Kyber encryption is inherently anonymous, whereas the Diffie-Hellman key combination used in PassLok inherently authenticates the sender. This means that there are a number of differences under the hood. But these hopefully are completely transparent to the user. One that may be more apparent is that KyberLock users are asked whether they wish a Read-once message to become un-decryptable as soon as decryption takes place, or wait until a reply is encrypted. This decision was made automatically in PassLok.
- Because the result of KyberLock encryption has a minimum size in the thousands of bytes, there is no way to fit it into SMS text messages, so all the short modes of PassLok are gone. Likewise, since the standard output of KyberLock is a block of base64 characters prefaced and followed by large tags, there is no special “email” mode in KyberLock. Gone also are text file output and the ability to choose different color schemes.
- Some PassLok features remain, however. Multiple user identities are still there. Text and image steganography is retained, as well as the functionality to split output into multiple parts that need to be combined. Theoretically unbreakable Pad encryption remains, with a different kind of hashing under the hood. Human mode has been enhanced to use the PolyCrypt cipher, also described in this blog, which has a larger key space.
The version just released is the standalone app which, though downloaded from a server, makes no further contact with it and can run just as well from file without any kind of Internet connection. You can save it to Home screen in a phone or tablet. This will be followed by a browser extension so that the Lock directory can move securely across machines. Then I have plans for a KyberLock Universal similar to PassLok Universal, which will integrate more tightly with browsers.