viff

changeset 1404:0504115641a3

doc: fix a ton of broken links
author Martin Geisler <mg@cs.au.dk>
date Thu, 10 Dec 2009 13:39:00 +0100
parents aa82aa9b79aa
children 1a1ff80f026c
files doc/bibliography.txt doc/comparison.txt doc/constants.txt doc/overview.txt doc/program-counters.txt doc/runtime.txt viff/comparison.py viff/orlandi.py viff/passive.py viff/runtime.py
diffstat 10 files changed, 76 insertions(+), 69 deletions(-) [+]
line diff
     1.1 --- a/doc/bibliography.txt	Thu Dec 10 13:21:18 2009 +0100
     1.2 +++ b/doc/bibliography.txt	Thu Dec 10 13:39:00 2009 +0100
     1.3 @@ -30,8 +30,8 @@
     1.4  
     1.5  * The pseudo-random secret sharing (PRSS) in ``viff.prss`` is
     1.6    described in [CDI05]_. The
     1.7 -  :meth:`~viff.runtime.Runtime.prss_share_bit_double` method uses a
     1.8 -  protocol described in [Damgård08]_.
     1.9 +  :meth:`~viff.passive.PassiveRuntime.prss_share_bit_double` method
    1.10 +  uses a protocol described in [Damgård08]_.
    1.11  
    1.12  * The protocol for equality testing with secret shared result is from
    1.13    [Nishide07]_.
     2.1 --- a/doc/comparison.txt	Thu Dec 10 13:21:18 2009 +0100
     2.2 +++ b/doc/comparison.txt	Thu Dec 10 13:39:00 2009 +0100
     2.3 @@ -3,14 +3,16 @@
     2.4  ====================
     2.5  
     2.6  Two comparison protocols have been implemented in VIFF. They are
     2.7 -available in the classes :class:`ComparisonToft05Mixin` and
     2.8 -:class:`ComparisonToft07Mixin`. Both protocols have been designed by
     2.9 -Tomas Toft.
    2.10 +available in the classes
    2.11 +:class:`~viff.comparison.ComparisonToft05Mixin` and
    2.12 +:class:`~viff.comparison.ComparisonToft07Mixin`. Both protocols have
    2.13 +been designed by Tomas Toft.
    2.14  
    2.15  The classes are *mixin* classes which means that they are meant to be
    2.16  used ("mixed") with other classes to build a finished usable class.
    2.17 -Two standard "flavors" are provided in the :class:`Toft05Runtime` and
    2.18 -:class:`Toft07Runtime`.
    2.19 +Two standard "flavors" are provided in the
    2.20 +:class:`~viff.comparison.Toft05Runtime` and
    2.21 +:class:`~viff.comparison.Toft07Runtime`.
    2.22  
    2.23  .. autoclass:: viff.comparison.ComparisonToft05Mixin
    2.24     :members: greater_than_equal
     3.1 --- a/doc/constants.txt	Thu Dec 10 13:21:18 2009 +0100
     3.2 +++ b/doc/constants.txt	Thu Dec 10 13:39:00 2009 +0100
     3.3 @@ -10,15 +10,17 @@
     3.4                    PAILLIER
     3.5                    TEXT
     3.6  
     3.7 -      Constants used by :class:`ShareExchanger` and others when sending 
     3.8 -      shares and other messages. They serve to distinguish messages sent 
     3.9 -      with the same program counter from one another.
    3.10 +      Constants used by :class:`~viff.runtime.ShareExchanger` and
    3.11 +      others when sending shares and other messages. They serve to
    3.12 +      distinguish messages sent with the same program counter from one
    3.13 +      another.
    3.14  
    3.15     .. attribute::INCONSISTENTHASH
    3.16                    OK
    3.17                    HASH
    3.18                    SIGNAL
    3.19  
    3.20 -      Constants used by :class:`HashBroadcastMixin` when sending shares
    3.21 -      and other messages. They serve to distinguish messages sent with
    3.22 -      the same program counter from one another.
    3.23 +      Constants used by
    3.24 +      :class:`~viff.hash_broadcast.HashBroadcastMixin` when sending
    3.25 +      shares and other messages. They serve to distinguish messages
    3.26 +      sent with the same program counter from one another.
     4.1 --- a/doc/overview.txt	Thu Dec 10 13:21:18 2009 +0100
     4.2 +++ b/doc/overview.txt	Thu Dec 10 13:39:00 2009 +0100
     4.3 @@ -71,15 +71,15 @@
     4.4  addition, multiplication, etc. These methods operate on :class:`Share
     4.5  <viff.runtime.Share>` instances.
     4.6  
     4.7 -Shares hold either :class:`GFElement <viff.field.GF>` or :class:`GF256
     4.8 -<viff.field.GF256>` elements and are created from the
     4.9 -:meth:`shamir_share <viff.runtime.Runtime.shamir_share>` or
    4.10 -:meth:`prss_share <viff.runtime.Runtime.prss_share>` :class:`Runtime
    4.11 -<viff.runtime.Runtime>` methods. Shares overload the standard
    4.12 +Shares hold either :class:`GFElement <viff.field.GF>` or
    4.13 +:class:`~viff.field.GF256` elements and are created from the
    4.14 +:meth:`~viff.passive.PassiveRuntime.shamir_share` or
    4.15 +:meth:`~viff.passive.PassiveRuntime.prss_share`
    4.16 +:class:`~viff.runtime.Runtime` methods. Shares overload the standard
    4.17  arithmetic operators, so you can write ``a + b - c * d`` with four
    4.18  shares, and it will be translated correctly into the appropriate
    4.19 -method calls on the :class:`Runtime <viff.runtime.Runtime>` associated
    4.20 -with the shares.
    4.21 +method calls on the :class:`~viff.runtime.Runtime` associated with the
    4.22 +shares.
    4.23  
    4.24  A field element contain the concrete value on which we do
    4.25  calculations. This is just a normal Python (long) integer. The value
     5.1 --- a/doc/program-counters.txt	Thu Dec 10 13:21:18 2009 +0100
     5.2 +++ b/doc/program-counters.txt	Thu Dec 10 13:39:00 2009 +0100
     5.3 @@ -78,10 +78,10 @@
     5.4  The solution used now in VIFF has two ingredients. First, callbacks
     5.5  that depend on the program counter (like `func`:shamir_share in our
     5.6  example above) are not added with :meth:`addCallback` but instead with
     5.7 -the special :meth:`~viff.runtime.BasicRuntime.schedule_callback`
     5.8 -method. This method saves the program counter in effect at the time of
     5.9 -the its call, and ensures that the saved program counter is
    5.10 -temporarily made active when the callback is called.
    5.11 +the special :meth:`~viff.runtime.Runtime.schedule_callback` method.
    5.12 +This method saves the program counter in effect at the time of the its
    5.13 +call, and ensures that the saved program counter is temporarily made
    5.14 +active when the callback is called.
    5.15  
    5.16  Secondly, the program counter is a *list* of counters. This is
    5.17  necessary to ensure that we can allocate new fresh counters at any
    5.18 @@ -92,12 +92,12 @@
    5.19  cases:
    5.20  
    5.21  * when a callback is scheduled using
    5.22 -  :meth:`~viff.runtime.BasicRuntime.schedule_callback`, a new
    5.23 -  sub-program counter is allocated. A sub-program counter is simply a
    5.24 -  program counter with another digit. Because of the asynchronous
    5.25 -  network, the callback will be invoked at an unknown later time. When
    5.26 -  invoked, it sees the sub-program counter. This ensures that that the
    5.27 -  parties agree on any network traffic produced in the callback.
    5.28 +  :meth:`~viff.runtime.Runtime.schedule_callback`, a new sub-program
    5.29 +  counter is allocated. A sub-program counter is simply a program
    5.30 +  counter with another digit. Because of the asynchronous network, the
    5.31 +  callback will be invoked at an unknown later time. When invoked, it
    5.32 +  sees the sub-program counter. This ensures that that the parties
    5.33 +  agree on any network traffic produced in the callback.
    5.34  
    5.35    When a piece of code like this::
    5.36  
     6.1 --- a/doc/runtime.txt	Thu Dec 10 13:21:18 2009 +0100
     6.2 +++ b/doc/runtime.txt	Thu Dec 10 13:39:00 2009 +0100
     6.3 @@ -37,8 +37,9 @@
     6.4  
     6.5        .. attribute:: Runtime.threshold
     6.6  
     6.7 -         Default threshold used by :meth:`Runtime.shamir_share`,
     6.8 -         :meth:`Runtime.open`, and others.
     6.9 +         Default threshold used by
    6.10 +         :meth:`~viff.passive.PassiveRuntime.shamir_share`,
    6.11 +         :meth:`~viff.passive.PassiveRuntime.open`, and others.
    6.12  
    6.13        .. attribute:: Runtime.program_counter
    6.14  
     7.1 --- a/viff/comparison.py	Thu Dec 10 13:21:18 2009 +0100
     7.2 +++ b/viff/comparison.py	Thu Dec 10 13:39:00 2009 +0100
     7.3 @@ -16,8 +16,8 @@
     7.4  # License along with VIFF. If not, see <http://www.gnu.org/licenses/>.
     7.5  
     7.6  """Comparison protocols. The mixin classes defined here provide a
     7.7 -:meth:`greater_than_equal` method to the :class:`Runtime
     7.8 -<viff.runtime.Runtime>` they are mixed with.
     7.9 +:meth:`greater_than_equal` method to the
    7.10 +:class:`~viff.runtime.Runtime` they are mixed with.
    7.11  """
    7.12  
    7.13  import math
    7.14 @@ -68,10 +68,10 @@
    7.15          """Compute ``share_a >= share_b``.
    7.16  
    7.17          Both arguments must be from the same field. The result is a
    7.18 -        :class:`GF256 <viff.field.GF256>` share.
    7.19 +        :class:`~viff.field.GF256` share.
    7.20  
    7.21          :warning:
    7.22 -           The result type (:class:`viff.field.GF256`) is different
    7.23 +           The result type (:class:`~viff.field.GF256`) is different
    7.24             from the argument types (general field elements).
    7.25  
    7.26          """
    7.27 @@ -137,13 +137,13 @@
    7.28  
    7.29  
    7.30  class Toft05Runtime(ComparisonToft05Mixin, PassiveRuntime):
    7.31 -    """Default mix of :class:`ComparisonToft05Mixin` and
    7.32 -    :class:`Runtime <viff.runtime.Runtime>`."""
    7.33 +    """Default mix of :class:`~viff.comparison.ComparisonToft05Mixin`
    7.34 +    and :class:`~viff.passive.PassiveRuntime`."""
    7.35      pass
    7.36  
    7.37  class ActiveToft05Runtime(ComparisonToft05Mixin, ActiveRuntime):
    7.38 -    """Default mix of :class:`ComparisonToft05Mixin` and
    7.39 -    :class:`ActiveRuntime <viff.runtime.ActiveRuntime>`."""
    7.40 +    """Default mix of :class:`~viff.comparison.ComparisonToft05Mixin`
    7.41 +    and :class:`~viff.active.ActiveRuntime`."""
    7.42      pass
    7.43  
    7.44  
    7.45 @@ -329,12 +329,12 @@
    7.46  
    7.47  
    7.48  class Toft07Runtime(ComparisonToft07Mixin, PassiveRuntime):
    7.49 -    """Default mix of :class:`ComparisonToft07Mixin` and
    7.50 -    :class:`Runtime <viff.runtime.Runtime>`.
    7.51 +    """Default mix of :class:`~viff.comparison.ComparisonToft07Mixin`
    7.52 +    and :class:`~viff.passive.PassiveRuntime`.
    7.53      """
    7.54      pass
    7.55  
    7.56  class ActiveToft07Runtime(ComparisonToft07Mixin, ActiveRuntime):
    7.57 -    """Default mix of :class:`ComparisonToft07Mixin` and
    7.58 -    :class:`ActiveRuntime <viff.runtime.ActiveRuntime>`."""
    7.59 +    """Default mix of :class:`~viff.comparison.ComparisonToft07Mixin` and
    7.60 +    :class:`~viff.active.ActiveRuntime`."""
    7.61      pass
     8.1 --- a/viff/orlandi.py	Thu Dec 10 13:21:18 2009 +0100
     8.2 +++ b/viff/orlandi.py	Thu Dec 10 13:39:00 2009 +0100
     8.3 @@ -86,13 +86,14 @@
     8.4      possible to call :meth:`add`, :meth:`mul`, etc. directly if one
     8.5      prefers.
     8.6  
     8.7 -    Each player in the protocol uses a :class:`Runtime` object. To
     8.8 -    create an instance and connect it correctly with the other
     8.9 -    players, please use the :func:`create_runtime` function instead of
    8.10 -    instantiating a Runtime directly. The :func:`create_runtime`
    8.11 -    function will take care of setting up network connections and
    8.12 -    return a :class:`Deferred` which triggers with the
    8.13 -    :class:`Runtime` object when it is ready.
    8.14 +    Each player in the protocol uses a :class:`~viff.runtime.Runtime`
    8.15 +    object. To create an instance and connect it correctly with the
    8.16 +    other players, please use the :func:`~viff.runtime.create_runtime`
    8.17 +    function instead of instantiating a Runtime directly. The
    8.18 +    :func:`~viff.runtime.create_runtime` function will take care of
    8.19 +    setting up network connections and return a :class:`Deferred`
    8.20 +    which triggers with the :class:`~viff.runtime.Runtime` object when
    8.21 +    it is ready.
    8.22      """
    8.23  
    8.24      def __init__(self, player, threshold=None, options=None):
     9.1 --- a/viff/passive.py	Thu Dec 10 13:21:18 2009 +0100
     9.2 +++ b/viff/passive.py	Thu Dec 10 13:39:00 2009 +0100
     9.3 @@ -34,19 +34,20 @@
     9.4      """The VIFF runtime.
     9.5  
     9.6      The runtime is used for sharing values (:meth:`shamir_share` or
     9.7 -    :meth:`prss_share`) into :class:`Share` object and opening such
     9.8 -    shares (:meth:`open`) again. Calculations on shares is normally
     9.9 -    done through overloaded arithmetic operations, but it is also
    9.10 -    possible to call :meth:`add`, :meth:`mul`, etc. directly if one
    9.11 -    prefers.
    9.12 +    :meth:`prss_share`) into :class:`~viff.runtime.Share` object and
    9.13 +    opening such shares (:meth:`open`) again. Calculations on shares
    9.14 +    is normally done through overloaded arithmetic operations, but it
    9.15 +    is also possible to call :meth:`add`, :meth:`mul`, etc. directly
    9.16 +    if one prefers.
    9.17  
    9.18 -    Each player in the protocol uses a :class:`Runtime` object. To
    9.19 -    create an instance and connect it correctly with the other
    9.20 -    players, please use the :func:`create_runtime` function instead of
    9.21 -    instantiating a Runtime directly. The :func:`create_runtime`
    9.22 -    function will take care of setting up network connections and
    9.23 -    return a :class:`Deferred` which triggers with the
    9.24 -    :class:`Runtime` object when it is ready.
    9.25 +    Each player in the protocol uses a :class:`~viff.runtime.Runtime`
    9.26 +    object. To create an instance and connect it correctly with the
    9.27 +    other players, please use the :func:`~viff.runtime.create_runtime`
    9.28 +    function instead of instantiating a :class:`~viff.runtime.Runtime`
    9.29 +    directly. The :func:`~viff.runtime.create_runtime` function will
    9.30 +    take care of setting up network connections and return a
    9.31 +    :class:`Deferred` which triggers with the
    9.32 +    :class:`~viff.runtime.Runtime` object when it is ready.
    9.33      """
    9.34  
    9.35      def __init__(self, player, threshold, options=None):
    10.1 --- a/viff/runtime.py	Thu Dec 10 13:21:18 2009 +0100
    10.2 +++ b/viff/runtime.py	Thu Dec 10 13:39:00 2009 +0100
    10.3 @@ -800,8 +800,8 @@
    10.4            list of Deferreds. Use :meth:`gatherResults` to avoid the
    10.5            latter.
    10.6  
    10.7 -        The :meth:`ActiveRuntime.generate_triples` method is an
    10.8 -        example of a method fulfilling this interface.
    10.9 +        The :meth:`~viff.active.TriplesPRSSMixin.generate_triples` method
   10.10 +        is an example of a method fulfilling this interface.
   10.11          """
   10.12  
   10.13          def update(results, program_counters):
   10.14 @@ -853,16 +853,16 @@
   10.15          """Secure addition.
   10.16          
   10.17          At least one of the arguments must be a :class:`Share`, the
   10.18 -        other can be a :class:`FieldElement` or a (possible long)
   10.19 -        Python integer."""
   10.20 +        other can be a :class:`~viff.field.FieldElement` or a
   10.21 +        (possible long) Python integer."""
   10.22          raise NotImplementedError
   10.23  
   10.24      def mul(self, share_a, share_b):
   10.25          """Secure multiplication.
   10.26          
   10.27          At least one of the arguments must be a :class:`Share`, the
   10.28 -        other can be a :class:`FieldElement` or a (possible long)
   10.29 -        Python integer."""
   10.30 +        other can be a :class:`~viff.field.FieldElement` or a
   10.31 +        (possible long) Python integer."""
   10.32          raise NotImplementedError
   10.33  
   10.34      def handle_deferred_data(self, deferred, data):