|
| 1 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 2 | +<html> |
| 3 | + <head> |
| 4 | + <title>ssss: Shamir's Secret Sharing Scheme</title> |
| 5 | + </head> |
| 6 | + |
| 7 | + <body> |
| 8 | + <small>The following text is licensed under the |
| 9 | + <a href="http://www.gnu.org/licenses/gpl.html"> |
| 10 | + GNU General Public License</a>. Copyright 2005, 2006 by |
| 11 | + B. Poettering.</small> |
| 12 | + <hr noshade="noshade"/> |
| 13 | + |
| 14 | + <h4>What is "Secret Sharing"?</h4> |
| 15 | + |
| 16 | + Citing from the <a href="http://en.wikipedia.org/">Wikipedia</a> |
| 17 | + article about <a |
| 18 | + href="http://en.wikipedia.org/wiki/Secret_sharing">Secret |
| 19 | + Sharing</a>: |
| 20 | + <blockquote> |
| 21 | + <p> |
| 22 | + In <a |
| 23 | + href="http://en.wikipedia.org/wiki/Cryptography">cryptography</a>, a |
| 24 | + <b>secret sharing scheme</b> is a method for distributing a <a |
| 25 | + href="http://en.wikipedia.org/wiki/Secrecy"><i>secret</i></a> amongst |
| 26 | + a group of participants, each of which is allocated a <i>share</i> of |
| 27 | + the secret. The secret can only be reconstructed when the shares are |
| 28 | + combined together; individual shares are of no use on their own. |
| 29 | + </p> |
| 30 | + <p> |
| 31 | + More formally, in a secret sharing scheme there is one <i>dealer</i> |
| 32 | + and <i>n</i> <i>players</i>. The dealer gives a secret to the players, |
| 33 | + but only when specific conditions are fulfilled. The dealer |
| 34 | + accomplishes this by giving each player a share in such a way that any |
| 35 | + group of <i>t</i> (for <i>threshold</i>) or more players can together |
| 36 | + reconstruct the secret but no group of less than <i>t</i> players |
| 37 | + can. Such a system is called a <i>(t,n)</i>-threshold scheme. |
| 38 | + </p> |
| 39 | + </blockquote> |
| 40 | + <p> |
| 41 | + A popular technique to implement threshold schemes uses <a |
| 42 | + href="http://en.wikipedia.org/wiki/Polynomial_interpolation"> |
| 43 | + polynomial interpolation</a> ("Lagrange interpolation"). This |
| 44 | + method was invented by <a |
| 45 | + href="http://en.wikipedia.org/wiki/Adi_Shamir"> Adi Shamir</a> in |
| 46 | + 1979. You can play around with a threshold scheme on the <a |
| 47 | + href="http://point-at-infinity.org/ssss/demo.html">demo page</a>. |
| 48 | + </p> |
| 49 | + <p> |
| 50 | + Note that Shamir's scheme is provable secure, that means: in a |
| 51 | + <i>(t,n)</i> scheme one can prove that it makes no difference |
| 52 | + whether an attacker has <i>t-1</i> valid shares at his disposal or |
| 53 | + none at all; as long as he has less than |
| 54 | + <i>t</i> shares, there is no better option than guessing to find |
| 55 | + out the secret. |
| 56 | + </p> |
| 57 | + <h4>Where is "Secret Sharing" used?</h4> Some popular examples are: |
| 58 | + <ul> |
| 59 | + <li> |
| 60 | + Good passwords are hard to memorize. A clever user could use a |
| 61 | + secret sharing scheme to generate a set of shares for a given |
| 62 | + password and store one share in his address book, one in his |
| 63 | + bank deposit safe, leave one share with a friend, etc. If one day he |
| 64 | + forgets his password, he can reconstruct it easily. Of |
| 65 | + course, writing passwords directly into the address book would |
| 66 | + pose a security risk, as it could be stolen by an "enemy". If |
| 67 | + a secret sharing scheme is used, the attacker has to steal |
| 68 | + many shares from different places. |
| 69 | + </li> |
| 70 | + <li> |
| 71 | + "A dealer could send <i>t</i> shares, all of which are |
| 72 | + necessary to recover the original secret, to a single |
| 73 | + recipient, using <i>t</i> different channels. An attacker |
| 74 | + would have to intercept all <i>t</i> shares to recover the |
| 75 | + secret, a task which may be more difficult than intercepting a |
| 76 | + single message" (<a |
| 77 | + href="http://en.wikipedia.org/wiki/Secret_sharing">Wikipedia</a>). |
| 78 | + </li> |
| 79 | + <li> |
| 80 | + The director of a bank could generate shares for the bank's |
| 81 | + vault unlocking code and hand them out to his employees. Even |
| 82 | + if the director is not available, the vault can be opened, but only, |
| 83 | + when a certain number of employees do it together. Here secret |
| 84 | + sharing schemes allow the employment of not fully trusted |
| 85 | + people. |
| 86 | + </li> |
| 87 | + </ul> |
| 88 | + |
| 89 | + <h4>What is "ssss"? Where can I download "ssss"?</h4> |
| 90 | + <p> |
| 91 | + <b>ssss</b> is an implementation of Shamir's secret sharing |
| 92 | + scheme for UNIX systems, especially developed for linux |
| 93 | + machines. The code is licensed under the <a |
| 94 | + href="http://www.gnu.org/licenses/gpl.html">GNU GPL</a>. |
| 95 | + <b>ssss</b> does both: the generation of shares for a known |
| 96 | + secret and the reconstruction of a secret using user provided |
| 97 | + shares. The software was written in 2006 by B. Poettering, it |
| 98 | + links against the <a href="http://swox.com/gmp/">GNU libgmp</a> |
| 99 | + multiprecision library (version 4.1.4 works well) and requires |
| 100 | + the <tt>/dev/random</tt> entropy source. Please send bug reports |
| 101 | + to <b><tt>ssss AT point-at-infinity.org</tt></b>. |
| 102 | + </p> |
| 103 | + <p>There is a <a |
| 104 | + href="http://freshmeat.net/projects/ssss/">freshmeat page</a> for |
| 105 | + <b>ssss</b>. A <a |
| 106 | + href="http://packages.debian.org/unstable/utils/ssss">debian |
| 107 | + package</a> is also available. If you are the lucky owner of a |
| 108 | + debian system just run <tt>apt-get update && apt-get |
| 109 | + install ssss</tt> to install <b>ssss</b>. Someone even ported (an |
| 110 | + outdated version of) <b>ssss</b> to <a |
| 111 | + href="http://www.seidlitz.ca/ssss/">Windows</a> (but with a |
| 112 | + lightly too sloppy random number generation, in my opinion). |
| 113 | + </p> |
| 114 | + <p> |
| 115 | + Download on the <a href="http://point-at-infinity.org/ssss">ssss homepage</a>. |
| 116 | + </p> |
| 117 | + |
| 118 | + <h4>How is "ssss" used? Is there an online demonstration?</h4> |
| 119 | + <p>The generation of shares given a |
| 120 | + known secret is shown first. A (3,5)-threshold scheme is used, that is: |
| 121 | + 5 shares are generated, the secret can be reconstructed by any |
| 122 | + subset of size 3. |
| 123 | + </p> |
| 124 | + <pre> |
| 125 | + % ssss-split -t 3 -n 5 |
| 126 | + Generating shares using a (3,5) scheme with dynamic security level. |
| 127 | + Enter the secret, at most 128 ASCII characters: my secret root password |
| 128 | + Using a 184 bit security level. |
| 129 | + 1-1c41ef496eccfbeba439714085df8437236298da8dd824 |
| 130 | + 2-fbc74a03a50e14ab406c225afb5f45c40ae11976d2b665 |
| 131 | + 3-fa1c3a9c6df8af0779c36de6c33f6e36e989d0e0b91309 |
| 132 | + 4-468de7d6eb36674c9cf008c8e8fc8c566537ad6301eb9e |
| 133 | + 5-4756974923c0dce0a55f4774d09ca7a4865f64f56a4ee0 |
| 134 | + </pre> |
| 135 | + These shares can be combined to recreate the secret: |
| 136 | + <pre> |
| 137 | + % ssss-combine -t 3 |
| 138 | + Enter 3 shares separated by newlines: |
| 139 | + Share [1/3]: 3-fa1c3a9c6df8af0779c36de6c33f6e36e989d0e0b91309 |
| 140 | + Share [2/3]: 5-4756974923c0dce0a55f4774d09ca7a4865f64f56a4ee0 |
| 141 | + Share [3/3]: 2-fbc74a03a50e14ab406c225afb5f45c40ae11976d2b665 |
| 142 | + Resulting secret: my secret root password |
| 143 | + </pre> |
| 144 | + You can try it out on the |
| 145 | + <a href="http://point-at-infinity.org/ssss/demo.html">demo page</a>. |
| 146 | + |
| 147 | + <p> |
| 148 | + If larger secrets are to be shared a hybrid technique has to be |
| 149 | + applied: encrypt the secret with a block cipher (using openssl, |
| 150 | + gpg, etc) and apply secret sharing to just the key. See the man |
| 151 | + page for more information about this topic. |
| 152 | + </p> |
| 153 | + |
| 154 | + |
| 155 | + <h4>Where is the manpage?</h4> |
| 156 | + Read it as <a href="http://point-at-infinity.org/ssss/ssss.1.html">html</a> or |
| 157 | + <a href="http://point-at-infinity.org/ssss/ssss.1">*roff</a>! |
| 158 | + |
| 159 | +<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> |
| 160 | +<input name="cmd" value="_xclick" type="hidden"> |
| 161 | +<input name=" business" value=" [email protected]" type=" hidden" > |
| 162 | +<input name="no_note" value="1" type="hidden"> |
| 163 | +<input name="currency_code" value="EUR" type="hidden"> |
| 164 | + <p> |
| 165 | +If you like this software, think about donating some money via |
| 166 | + <input src="https://www.paypal.com/en_US/i/btn/x-click-but7.gif" name="submit" alt="PayPal" type="image">. |
| 167 | +</p> |
| 168 | +</form> |
| 169 | + <hr> |
| 170 | + <small> |
| 171 | + <!-- hhmts start --> |
| 172 | +Last modified: Sun Jan 15 12:08:48 CET 2006 |
| 173 | +<!-- hhmts end --> |
| 174 | + </small> |
| 175 | + </body> |
| 176 | +</html> |
0 commit comments