/libkop

Library for (KEM-based OT)-based) PET

Primary LanguageC

libkop

KOP stands for (KEM-based OT)-based PEC, which uses the following acronyms:

  • KEM: Key Encapsulation Mechanism
  • OT: Oblivious Transfer
  • PEC: Private Equality Confirmation

The KOP allows secure comparison of low-entropy values, which can be used (for example) in Off-the-Record Messaging (OTR) for user authentication. In OTR version 2/3/4, this is done with the Socialist Millionaire Protocol. That protocol is based on the Diffie-Hellman key-exchange, which is not secure against quantum adversaries.

Instead the KOP protocol can (in principle) be instantiated with any KEM, including the post-quantum secure ones currently being developed. The current prototype uses Kyber, as provided by liboqs. The protocol must be executed over a pseudo-authenticated channel, which is instantiated with Dilithium signatures.

This work accompanies my thesis and relies on the work done by Masny, Rindal and Rosulek rr17, mr19.

Compiling

In order to compile the library, make sure that the following libraries are installed:

  • libXKCP (make sure the KeccakHash interface is enabled)
  • libdecaf
  • liboqs (make sure Kyber and Dilithium are enabled)

Testing

Once compiled, build the all target to build all test-files. Run each test_* target to test the corresponding functionality. (test_kop tests the overall functionality). Run test_speed for benchmarking the code.

References

  • Peter Rindal and Mike Rosulek, 2017. Malicious-Secure Private Set Intersection via Dual Execution. ePrint
  • Daniel Masny and Peter Rindal, 2019. Endemic Oblivious Transfer. ePrint
  • Boaz Barak, Ran Canetti, Yehuda Lindell, Rafael Pass, and Tal Rabin, 2007. Secure Computation Without Authentication. ePrint
  • Douglas Stebila, Michele Mosca. Post-quantum key exchange for the Internet and the Open Quantum Safe project. In Roberto Avanzi, Howard Heys, editors, Selected Areas in Cryptography (SAC) 2016, LNCS, vol. 10532, pp. 1–24. Springer, October 2017. oqs
  • Cryptographic Suite for Algebraic Lattices (CRYSTALS). Kyber, Dilithium