\input texinfo @c %**start of header @afourpaper @finalout @documentencoding ISO-8859-1 @setfilename libTMCG_bug.info @settitle The LibTMCG Reference Manual (Bug) @c %**end of header @copying This is the reference manual of LibTMCG. Revision 20180905. Copyright @copyright{} 2005--2007, 2009, 2015--2018 Heiko Stamer <@email{HeikoStamer@@gmx.net}>. @quotation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. @end quotation @end copying @titlepage @title The LibTMCG Reference Manual @subtitle Bug Hunting by @email{bug-texinfo@@gnu.org} @subtitle @today{} @author Heiko Stamer <@email{HeikoStamer@@gmx.net}> @page @vskip 0pt plus 1filll @insertcopying @end titlepage @contents @ifnottex @node Top @top LibTMCG Reference Manual @menu * Application Programming Interface:: @end menu @insertcopying @end ifnottex @node Application Programming Interface @c ********************************************************** @c ************************* API ************************** @c ********************************************************** @chapter Application Programming Interface Now we start with a description of some important global symbols and structures. @menu * Basic Structures:: @end menu @c ********************************************************** @node Basic Structures @section Basic Structures This section describes all public data types, communication interfaces, and classes of high-level protocols that are necessary to create a secure card game. Private methods and only internally used members are not explained. @menu * Communication Interfaces:: @end menu @node Communication Interfaces @subsection Communication Interfaces @cindex Communication Interfaces Note that headers @code{aiounicast_nonblock.hh} or @code{aiounicast_select.hh} must be included in addition to @code{libTMCG.hh}, however, @code{aiounicast_select} is strongly recommended. Then the following classes can be instantiated by your application. @deftp {Class} aiounicast_nonblock This class works with non-blocking file descriptors, i.e., the pipes or sockets have to be opened with the @code{O_NONBLOCK} flag. The methods use continiuous polling on the descriptors to achieve asynchronous I/O that results in exorbitant CPU load. The class should be used only, if no select system call is available or appropriate for the application. @defop {Constructor} aiounicast_nonblock aiounicast_nonblock (@code{const size_t} n_in, @code{const size_t} j_in, @code{const std::vector&} fd_in_in, @code{const std::vector& } fd_out_in, @code{const std::vector& } key_in, @code{const size_t} aio_default_scheduler_in @code{=aio_scheduler_roundrobin}, @code{const time_t} aio_default_timeout_in @code{=aio_timeout_long}, @code{const bool} aio_is_authenticated_in @code{=true}, @code{const bool} aio_is_encrypted_in @code{=true}) The constructor initializes internal queues and data structures for asynchronous point-to-point channels connecting @math{n} parties (i.e. @var{n_in}). The index of the calling party within this set is given by @var{j_in}. It is followed by a vector @var{fd_in_in} of exactly @math{n} input file descriptors that are ready for reading and writing, and by a vector @var{fd_out_in} of exactly @math{n} output file descriptors. Finally, the vector @var{key_in} with exactly @math{n} address@hidden key derivation function PBKDF2 is applied with an iteration count of 25.000 and a different constant salt to derive the authentication and the encryption key, respectively.} or pre-shared keys is neccesary, if @var{aio_is_authenticated_in} or @var{aio_is_encrypted_in} is set @code{true}, which is the default behaviour. The default values for timeout (in seconds) and the receive scheduler can be modified carefully according to the desired usage scenario. @end defop @end deftp @bye