I'm looking for software libraries that support 1-2 oblivious transfer of a single bit between two parties.

Googling seems to bring up lecture notes, explanations, and research papers but not implementations.

I'd just implement it myself, but crypto is notoriously hard to get right. I don't know nearly enough about, say, generating primes that won't be trivially factored when multiplied together to go down that route.


Normally things are done in this order:

  1. Cryptographers come up with new ideas for algorithms and publish them.
  2. Other cryptographers break them, then fix them again, and so on, until there is an algorithm which can be deemed "secure enough" by virtue of having survived the process relatively unscathed.
  3. A cryptographer with a practical mind writes a specification which tells how to implement the algorithm, minding details like endianness.
  4. A developer follows the specification and writes code.

Sometimes steps 3 and 4 are done in the reverse order: someone writes the code, and only then the specification is written to match the arbitrary conventions that the original developer decided upon (usually on a whim: e.g. you will get little-endian or big-endian encoding depending on what was simplest to do in the programming framework of that developer).

Oblivious transfer is a concept, and actual algorithms are somewhere between steps 1 and 2 right now. So no usable library: if you find an implementation, then it will be part of some research project (a cryptographer using it for research purposes, such as looking for biases and so on), but not an incarnation of a generally agreed-upon "secure" algorithm, ready for the specification step.

Theoretically, oblivious transfer being just an algorithm, it has no value by itself, but only as part of a wider protocol which uses it (and possibly other algorithms) in some way. For anything which looks like production code, you should first find (or define) that overarching protocol, which may use an oblivious transfer primitive, and from the actual protocol structure will depend the actual required characteristics of the oblivious transfer.

In a way, requesting a "library that supports oblivious transfer" is akin to sending a general request for "a combustion engine" without telling whether this is for a boat, a car, a plane or a power plant. It is a bit unanswerable.

  • Oh. That's really surprising, given that the concept's been known since the eighties (technically the seventies). Thanks. Aug 2 '13 at 17:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.