LibTMCG is a C++ library for creating secure and fair online card games. The library contains a sort of useful classes, algorithms, and high-level protocols to support an application programmer in writing such software.
The most remarkable feature is the absence of a trusted third party, i.e., neither a central game server nor trusted hardware components are necessary. Thus, it is well-suited for peer-to-peer (P2P) environments.
The implementation is based primarily on two academic research papers:
First, Christian Schindelhauer, A Toolbox for Mental Card Games, Technical Report A-98-14, University of Lübeck, 1998, and second, Adam Barnett, Nigel P. Smart, Mental Poker Revisited, Cryptography and Coding 2003, Lecture Notes in Computer Science 2898, pages 370-383, 2003.
Of course, we cannot avoid that malicious players share information about their private cards, but the protocols ensure that the shuffle of the deck is performed randomly (presumed that at least one player is honest) and thus the cards will be distributed uniformly among the players. Further, no coalition can learn the private cards of a player against his will (except for trivial conclusions). The corresponding cryptographic problem, actually called ``Mental Poker'', has been studied since 1979 (Shamir, Rivest, and Adleman) by many authors. LibTMCG provides the first practical implementation of such protocols.
The security and the fairness rely on advanced cryptographic techniques---the so-called zero-knowledge proofs. Using these `building blocks' the high-level protocols minimize the effect of coalitions and preserve the confidentiality of the players' strategy, i.e., the players are not required to reveal their cards at the end of the game to show that they did not cheat. This important property is often required in card games like Poker.
These details are provided for information only. No information here is legal advice and should not be used as such.