Skip to content

Commit

Permalink
Adapted readme for pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
sea212 committed Mar 10, 2019
1 parent 69e6662 commit 1b6291d
Showing 1 changed file with 11 additions and 31 deletions.
42 changes: 11 additions & 31 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ Lamport one-time-signature scheme
Lamport suggested to create two secret keys for each bit of a message which will
be signed. One for each value the bit can take. To derive the verification key,
each secret key is hashed once. Now you have a secret key and a verification key,
which consists of :math:`m` 2-tuples of values, where :math:`m` is the number
which consists of m 2-tuples of values, where m is the number
of bits of the message. The verification key is published.
The signature consists of :math:`m` values. For each bit of the message you release a secret key from
The signature consists of m values. For each bit of the message you release a secret key from
the corresponding secret keys, depending on which value the bit has. All those secret
keys form the signature for the message. The verifier hashes each of your secret keys
once and compares it to one verification key for this position, depending on the value
Expand All @@ -40,43 +40,23 @@ Winternitz extension
~~~~~~~~~~~~~~~~~~~~
Winternitz extended lamports algorithm by offering the possiblity to decide
how many bits will be signed together. The amount of numbers those bits can
represent is called the Winternitz parameter (:math:`w = 2^{bits}`). This method offers the huge
represent is called the Winternitz parameter (w = 2^{bits}). This method offers the huge
advantage that the user of this algorithm can choose the time and space tradeoff
(whether speed or storage capacity is more relevant). A fingerprint of the message which
will be signed is split into groups of :math:`ceil(log_2(w))` bits. Each of these groups gets one secret key.
Each verification key is derived by hashing the secret key for each group :math:`2^{w-1}` times. All verification
will be signed is split into groups of ceil(log_2(w))` bits. Each of these groups gets one secret key.
Each verification key is derived by hashing the secret key for each group 2^{w-1} times. All verification
keys will be published and represent one unified verification key. When signing a message, the
fingerprint of the message is split into groups of :math:`ceil(log2(w))` bits. To create the signature, the
private key for each bit group is hashed :math:`bitgroup_value` times, where :math:`bitgroup_value` is the value
fingerprint of the message is split into groups of ceil(log2(w)) bits. To create the signature, the
private key for each bit group is hashed bitgroup_value times, where bitgroup_value is the value
of the bitgroup. Additionally a (inverse sum) checksum is appended, which denies man-in-the-middle
attacks. The checksum is calculated from the signature, split into bit groups of :math:`ceil(log2(w))` bits, and
signed. To verify the signature, the fingerprint of the message is first split into bit groups of :math:`ceil(log2(w)`
attacks. The checksum is calculated from the signature, split into bit groups of ceil(log2(w)) bits, and
signed. To verify the signature, the fingerprint of the message is first split into bit groups of ceil(log2(w)
bits each. The basic idea is to take the signature of each bit group, calculate the verification key
from it and finally compare it to the published verification key. Since the signature was hashed
:math:`bitgroup_value` times, all you have to do to calculate the verification key from the signature
is to hash the signature :math:`2^{w-1} - bitgroup_value - 1` times. Besides verifing the message, the verifier
bitgroup_value times, all you have to do to calculate the verification key from the signature
is to hash the signature 2^{w-1} - bitgroup_value - 1 times. Besides verifing the message, the verifier
must also calculate the checksum and verify it.

Setup
-----
Requires: Python >= 3.4

| Install package: ``pip install winternitz``
| Install test tools: ``pip install winternitz[TEST]``
| Install linter (for tox tests): ``pip install winternitz[LINT]``
| Install documentation tools: ``pip install winternitz[DOCS]``
| Install everything: ``pip install winternitz[ALL]``
Test
~~~~
| Without tox (no linter checks): ``python setup.py test``
| With tox: ``python -m tox``
Generate documentation
~~~~~~~~~~~~~~~~~~~~~~
``python setup.py docs``


Usage
-----

Expand Down

0 comments on commit 1b6291d

Please sign in to comment.