viff

changeset 737:75f932a949eb

Merged first two paragraphs in module docstrings. This looks much better in the output generated by Sphinx and epydoc. Epydoc still extracts the first sentence as the summary attribute for each module.
author Martin Geisler <mg@daimi.au.dk>
date Fri, 25 Apr 2008 09:12:21 +0200
parents 0f6bc89072ae
children 99dce2c3cbdd
files viff/config.py viff/field.py viff/matrix.py viff/prss.py viff/runtime.py viff/shamir.py viff/util.py
diffstat 7 files changed, 29 insertions(+), 40 deletions(-) [+]
line diff
     1.1 --- a/viff/config.py	Fri Apr 25 08:25:28 2008 +0200
     1.2 +++ b/viff/config.py	Fri Apr 25 09:12:21 2008 +0200
     1.3 @@ -15,12 +15,11 @@
     1.4  # You should have received a copy of the GNU Lesser General Public
     1.5  # License along with VIFF. If not, see <http://www.gnu.org/licenses/>.
     1.6  
     1.7 -"""Functions for loading and saving player configurations.
     1.8 -
     1.9 -Each player participating in a protocol execution must know some
    1.10 -information about the other players, namely their hostname and port
    1.11 -number. The player also needs to know something about itself, namely
    1.12 -the keys used for pseudo-random secret sharing (PRSS).
    1.13 +"""Functions for loading and saving player configurations. Each player
    1.14 +participating in a protocol execution must know some information about
    1.15 +the other players, namely their hostname and port number. The player
    1.16 +also needs to know something about itself, namely the keys used for
    1.17 +pseudo-random secret sharing (PRSS).
    1.18  
    1.19  The :class:`Player` class encapsulates this information. Generating a
    1.20  player configuration is done using the :func:`generate_configs`
     2.1 --- a/viff/field.py	Fri Apr 25 08:25:28 2008 +0200
     2.2 +++ b/viff/field.py	Fri Apr 25 09:12:21 2008 +0200
     2.3 @@ -15,11 +15,10 @@
     2.4  # You should have received a copy of the GNU Lesser General Public
     2.5  # License along with VIFF. If not, see <http://www.gnu.org/licenses/>.
     2.6  
     2.7 -"""Modeling of Galois (finite) fields.
     2.8 -
     2.9 -The GF function creates classes which implements Galois (finite)
    2.10 -fields of prime order whereas the :class:`GF256` class implements the
    2.11 -the GF(2^8) field with characteristic 2.
    2.12 +"""Modeling of Galois (finite) fields. The GF function creates classes
    2.13 +which implements Galois (finite) fields of prime order whereas the
    2.14 +:class:`GF256` class implements the the GF(2^8) field with
    2.15 +characteristic 2.
    2.16  
    2.17  All fields work the same: instantiate an object from a field to get
    2.18  hold of an element of that field. Elements implement the normal
     3.1 --- a/viff/matrix.py	Fri Apr 25 08:25:28 2008 +0200
     3.2 +++ b/viff/matrix.py	Fri Apr 25 09:12:21 2008 +0200
     3.3 @@ -15,13 +15,11 @@
     3.4  # You should have received a copy of the GNU Lesser General Public
     3.5  # License along with VIFF. If not, see <http://www.gnu.org/licenses/>.
     3.6  
     3.7 -"""Matrix operations.
     3.8 -
     3.9 -This module contains basic matrix operations as well as a function to
    3.10 -build square hyper-invertible matrices. The matrix implementation
    3.11 -provides operator overloading and works with any type that acts like a
    3.12 -number, including :class:`viff.field.GF256` and :func:`viff.field.GF`
    3.13 -elements.
    3.14 +"""Matrix operations. This module contains basic matrix operations as
    3.15 +well as a function to build square hyper-invertible matrices. The
    3.16 +matrix implementation provides operator overloading and works with any
    3.17 +type that acts like a number, including :class:`viff.field.GF256` and
    3.18 +:func:`viff.field.GF` elements.
    3.19  """
    3.20  
    3.21  __docformat__ = "restructuredtext"
     4.1 --- a/viff/prss.py	Fri Apr 25 08:25:28 2008 +0200
     4.2 +++ b/viff/prss.py	Fri Apr 25 09:12:21 2008 +0200
     4.3 @@ -17,12 +17,10 @@
     4.4  # You should have received a copy of the GNU Lesser General Public
     4.5  # License along with VIFF. If not, see <http://www.gnu.org/licenses/>.
     4.6  
     4.7 -u"""Methods for pseudo-random secret sharing.
     4.8 -
     4.9 -Normal Shamir sharing (see the :mod`viff.shamir` module) requires
    4.10 -secure channels between the players for distributing shares. With
    4.11 -pseudo-random secret sharing one can share a secret using a single
    4.12 -broadcast instead.
    4.13 +u"""Methods for pseudo-random secret sharing. Normal Shamir sharing
    4.14 +(see the :mod`viff.shamir` module) requires secure channels between
    4.15 +the players for distributing shares. With pseudo-random secret sharing
    4.16 +one can share a secret using a single broadcast instead.
    4.17  
    4.18  PRSS relies on each player having access to a set of previously
    4.19  distributed pseudo-random functions (PRFs) --- or rather the seeds for
     5.1 --- a/viff/runtime.py	Fri Apr 25 08:25:28 2008 +0200
     5.2 +++ b/viff/runtime.py	Fri Apr 25 09:12:21 2008 +0200
     5.3 @@ -17,11 +17,9 @@
     5.4  # You should have received a copy of the GNU Lesser General Public
     5.5  # License along with VIFF. If not, see <http://www.gnu.org/licenses/>.
     5.6  
     5.7 -"""VIFF runtime.
     5.8 -
     5.9 -This is where the virtual ideal functionality is hiding! The runtime
    5.10 -is responsible for sharing inputs, handling communication, and running
    5.11 -the calculations.
    5.12 +"""VIFF runtime. This is where the virtual ideal functionality is
    5.13 +hiding! The runtime is responsible for sharing inputs, handling
    5.14 +communication, and running the calculations.
    5.15  
    5.16  Each player participating in the protocol will instantiate a
    5.17  :class:`Runtime` object and use it for the calculations.
     6.1 --- a/viff/shamir.py	Fri Apr 25 08:25:28 2008 +0200
     6.2 +++ b/viff/shamir.py	Fri Apr 25 09:12:21 2008 +0200
     6.3 @@ -15,10 +15,9 @@
     6.4  # You should have received a copy of the GNU Lesser General Public
     6.5  # License along with VIFF. If not, see <http://www.gnu.org/licenses/>.
     6.6  
     6.7 -"""Shamir secret sharing and recombination.
     6.8 -
     6.9 -Based on the paper *How to share a secret* by Adi Shamir in
    6.10 -*Communications of the ACM* **22** (11): 612-613.
    6.11 +"""Shamir secret sharing and recombination. Based on the paper *How to
    6.12 +share a secret* by Adi Shamir in *Communications of the ACM* **22**
    6.13 +(11): 612-613.
    6.14  """
    6.15  
    6.16  __docformat__ = "restructuredtext"
     7.1 --- a/viff/util.py	Fri Apr 25 08:25:28 2008 +0200
     7.2 +++ b/viff/util.py	Fri Apr 25 09:12:21 2008 +0200
     7.3 @@ -15,13 +15,11 @@
     7.4  # You should have received a copy of the GNU Lesser General Public
     7.5  # License along with VIFF. If not, see <http://www.gnu.org/licenses/>.
     7.6  
     7.7 -"""Miscellaneous utility functions.
     7.8 -
     7.9 -This module contains various utility functions used in all parts of
    7.10 -the VIFF code. The most important is the :data:`rand` random generator
    7.11 -which is seeded with a known seed each time. Using this generator for
    7.12 -all random numbers ensures that a protocol run can be reproduced at a
    7.13 -later time.
    7.14 +"""Miscellaneous utility functions. This module contains various
    7.15 +utility functions used in all parts of the VIFF code. The most
    7.16 +important is the :data:`rand` random generator which is seeded with a
    7.17 +known seed each time. Using this generator for all random numbers
    7.18 +ensures that a protocol run can be reproduced at a later time.
    7.19  """
    7.20  
    7.21  __docformat__ = "restructuredtext"