/usr/share/doc/libgfshare1/theory.html is in libgfshare-dev 1.0.5-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html >
<head><title>Theory used by libgfshare</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)">
<meta name="originator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)">
<!-- html -->
<meta name="src" content="theory.tex">
<meta name="date" content="2014-03-09 13:29:00">
<link rel="stylesheet" type="text/css" href="theory.css">
</head><body
>
<div class="maketitle">
<h2 class="titleHead">Theory used by libgfshare</h2>
<div class="author" ><span
class="cmr-12">Simon McVittie</span></div><br />
<div class="date" ><span
class="cmr-12">23rd April 2006</span></div>
</div>
<h3 class="sectionHead"><span class="titlemark">1 </span> <a
id="x1-10001"></a>Introduction</h3>
<!--l. 13--><p class="noindent" >libgfshare implements Shamir secret sharing [SHAMIR] over the field <span
class="cmmi-10">GF</span>(2<sup><span
class="cmr-7">8</span></sup>), instead of <span
class="cmmi-10">GF</span>(<span
class="cmmi-10">p</span>) for a prime <span
class="cmmi-10">p </span>as suggested
by Shamir’s paper. This document aims to prove the security and integrity of this scheme.
<!--l. 17--><p class="indent" > Note that while I believe this document to be correct, I accept no responsibility for loss or damage caused by relying on
the correctness of my proof.
<!--l. 21--><p class="noindent" >
<h3 class="sectionHead"><span class="titlemark">2 </span> <a
id="x1-20002"></a>Definitions</h3>
<!--l. 23--><p class="noindent" >Let <span
class="cmmi-10">F </span>be a field with multiplicative identity 1 and additive identity 0.
<!--l. 25--><p class="indent" > If <span
class="cmmi-10">A </span>= <span
class="cmsy-10">{</span>(<span
class="cmmi-10">a</span><sub><span
class="cmr-7">1</span></sub><span
class="cmmi-10">,b</span><sub><span
class="cmr-7">1</span></sub>)<span
class="cmmi-10">,</span><img
src="theory0x.png" alt="⋅⋅⋅" class="cdots" ><span
class="cmmi-10">,</span>(<span
class="cmmi-10">a</span><sub><span
class="cmmi-7">n</span></sub><span
class="cmmi-10">,b</span><sub><span
class="cmmi-7">n</span></sub>)<span
class="cmsy-10">}</span>, with the <span
class="cmmi-10">a</span><sub><span
class="cmmi-7">i</span></sub> distinct nonzero elements of F and the <span
class="cmmi-10">b</span><sub><span
class="cmmi-7">i</span></sub> elements of <span
class="cmmi-10">F</span>, indexed by
<span
class="cmmi-10">I </span>= <span
class="cmsy-10">{</span>1<span
class="cmmi-10">,</span><img
src="theory1x.png" alt="⋅⋅⋅" class="cdots" ><span
class="cmmi-10">,n</span><span
class="cmsy-10">}</span>, then define
<center class="par-math-display" >
<img
src="theory2x.png" alt=" ∑ ∏
PA(x) = bj (x - ak)(aj - ak)-1
j∈I k∈I,k⁄=j
" class="par-math-display" ></center>
<!--l. 31--><p class="nopar" >
<!--l. 33--><p class="indent" > a polynomial of degree at most <span
class="cmmi-10">n </span><span
class="cmsy-10">- </span>1. (By distinctness of the <span
class="cmmi-10">a</span><sub><span
class="cmmi-7">i</span></sub>, the inverses required exist.) This is the Lagrange
interpolating polynomial for the points in <span
class="cmmi-10">A</span>.
<!--l. 37--><p class="noindent" >
<h3 class="sectionHead"><span class="titlemark">3 </span> <a
id="x1-30003"></a>Lemma 1</h3>
<!--l. 39--><p class="noindent" >Let <span
class="cmmi-10">a</span><sub><span
class="cmr-7">1</span></sub><span
class="cmmi-10">,</span><img
src="theory3x.png" alt="⋅⋅⋅" class="cdots" ><span
class="cmmi-10">,a</span><sub><span
class="cmmi-7">t</span></sub> <span
class="cmsy-10">∈ </span><span
class="cmmi-10">F </span>be distinct and nonzero; let <span
class="cmmi-10">b</span><sub><span
class="cmr-7">1</span></sub><span
class="cmmi-10">,</span><img
src="theory4x.png" alt="⋅⋅⋅" class="cdots" ><span
class="cmmi-10">,b</span><sub><span
class="cmmi-7">t</span><span
class="cmsy-7">-</span><span
class="cmr-7">1</span></sub><span
class="cmmi-10">,c </span><span
class="cmsy-10">∈ </span><span
class="cmmi-10">F </span>be arbitrary. Then there exists <span
class="cmmi-10">b</span><sub><span
class="cmmi-7">t</span></sub> <span
class="cmsy-10">∈ </span><span
class="cmmi-10">F </span>such that if
<span
class="cmmi-10">A </span>= <span
class="cmsy-10">{</span>(<span
class="cmmi-10">a</span><sub><span
class="cmr-7">1</span></sub><span
class="cmmi-10">,b</span><sub><span
class="cmr-7">1</span></sub>)<span
class="cmmi-10">,</span><img
src="theory5x.png" alt="⋅⋅⋅" class="cdots" ><span
class="cmmi-10">,</span>(<span
class="cmmi-10">a</span><sub><span
class="cmmi-7">t</span></sub><span
class="cmmi-10">,b</span><sub><span
class="cmmi-7">t</span></sub>)<span
class="cmsy-10">} </span>then <span
class="cmmi-10">P</span><sub><span
class="cmmi-7">A</span></sub>(0) = <span
class="cmmi-10">c</span>.
<!--l. 43--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">3.1 </span> <a
id="x1-40003.1"></a>Proof</h4>
<!--l. 45--><p class="noindent" >Let <span
class="cmmi-10">I </span>= <span
class="cmsy-10">{</span>1<span
class="cmmi-10">,</span><img
src="theory6x.png" alt="⋅⋅⋅" class="cdots" ><span
class="cmmi-10">,t</span><span
class="cmsy-10">}</span>. We have
<center class="par-math-display" >
<img
src="theory7x.png" alt=" ∑ ∏ -1 ∑ ∏ -1
PA(0) = bj - ak(aj - ak) = yj ak(ak - aj)
j∈I k∈I,k⁄=j j∈I k∈I,k⁄=j
" class="par-math-display" ></center>
<!--l. 50--><p class="nopar" >
<!--l. 52--><p class="indent" > Let
<center class="par-math-display" >
<img
src="theory8x.png" alt=" ⌊ ⌋ ⌊ ⌋
∑ ∏ ∏
bt = ⌈c + bj ak(aj - ak)-1⌉ ⌈ a-k1(ak - at)⌉
j∈I,j⁄=t k∈I,k⁄=j k∈I,k⁄=t
" class="par-math-display" ></center>
<!--l. 57--><p class="nopar" >
<!--l. 59--><p class="indent" > Then
<center class="par-math-display" >
<img
src="theory9x.png" alt=" ∑ ∏ ∏
PA (0) = bj ak(ak - aj)-1 + bt ak(ak - at)-1
j∈I,j⁄=t k∈I,k⁄=j k∈I,k⁄=t
" class="par-math-display" ></center>
<!--l. 63--><p class="nopar" >
<center class="math-display" >
<img
src="theory10x.png" alt=" ∑ ∏ -1 ∑ ∏ - 1
= bj ak(ak - aj) - bj ak(ak - aj) + c
j∈I,j⁄=t k∈I,k⁄=j j∈I,j⁄=t k∈I,k⁄=j
" class="math-display" ></center>
<!--l. 65--><p class="nopar" >
<center class="math-display" >
<img
src="theory11x.png" alt="= c
" class="math-display" ></center>
<!--l. 67--><p class="nopar" >
<!--l. 69--><p class="indent" > as required.
<!--l. 71--><p class="noindent" >
<h3 class="sectionHead"><span class="titlemark">4 </span> <a
id="x1-50004"></a>Lemma 2</h3>
<!--l. 73--><p class="noindent" >For any <span
class="cmmi-10">x</span><sub><span
class="cmr-7">1</span></sub><span
class="cmmi-10">,</span><img
src="theory12x.png" alt="⋅⋅⋅" class="cdots" ><span
class="cmmi-10">,x</span><sub><span
class="cmmi-7">t</span></sub> distinct and nonzero elements of <span
class="cmmi-10">F</span>, and any <span
class="cmmi-10">y</span><sub><span
class="cmr-7">1</span></sub><span
class="cmmi-10">,</span><img
src="theory13x.png" alt="⋅⋅⋅" class="cdots" ><span
class="cmmi-10">,y</span><sub><span
class="cmmi-7">t</span></sub><span
class="cmmi-10">,u </span>arbitrary elements of <span
class="cmmi-10">F</span>, let
<center class="par-math-display" >
<img
src="theory14x.png" alt="X = {(x1,y1),⋅⋅⋅,(xt,yt)}
" class="par-math-display" ></center>
<!--l. 76--><p class="nopar" >
<!--l. 78--><p class="indent" > and
<center class="par-math-display" >
<img
src="theory15x.png" alt="U = {(x1,y1),⋅⋅⋅,(xt- 1,yt-1),(u,PX (u))}
" class="par-math-display" ></center>
<!--l. 80--><p class="nopar" >
<!--l. 82--><p class="indent" > Then <span
class="cmmi-10">P</span><sub><span
class="cmmi-7">X</span></sub> = <span
class="cmmi-10">P</span><sub><span
class="cmmi-7">U</span></sub><span
class="cmmi-10">,i.e.P</span><sub><span
class="cmmi-7">X</span></sub>(<span
class="cmmi-10">x</span>) = <span
class="cmmi-10">P</span><sub><span
class="cmmi-7">U</span></sub>(<span
class="cmmi-10">x</span>) for all <span
class="cmmi-10">x </span><span
class="cmsy-10">∈ </span><span
class="cmmi-10">F</span>.
<!--l. 84--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">4.1 </span> <a
id="x1-60004.1"></a>Proof</h4>
<!--l. 86--><p class="noindent" >Let <span
class="cmmi-10">S</span><sub><span
class="cmmi-7">a,b</span></sub> = <img
src="theory16x.png" alt="{(x1,y1),⋅⋅⋅,(xt- 1,yt-1),(a,b)}" class="left" align="middle">. Then
<center class="par-math-display" >
<img
src="theory17x.png" alt=" ∑ ∏ ∏
PSa,b(x) = yj(x- a)(xj - a)- 1 (x - xk)(xj - xk)-1 + b (x - xk)(a- xk)-1
j<t k⁄=j,k<t k<t
" class="par-math-display" ></center>
<!--l. 93--><p class="nopar" >
<!--l. 95--><p class="indent" > Hence if we let <span
class="cmmi-10">d</span><sub><span
class="cmmi-7">i,j</span></sub> = <span
class="cmmi-10">x</span><sub><span
class="cmmi-7">i</span></sub> <span
class="cmsy-10">-</span><span
class="cmmi-10">x</span><sub><span
class="cmmi-7">j</span></sub> and <span
class="cmmi-10">e</span><sub><span
class="cmmi-7">i</span></sub> = <span
class="cmmi-10">u</span><span
class="cmsy-10">-</span><span
class="cmmi-10">x</span><sub><span
class="cmmi-7">i</span></sub> (both of which are necessarily nonzero, by distinctness of the <span
class="cmmi-10">x</span><sub><span
class="cmmi-7">i</span></sub> and <span
class="cmmi-10">u</span>) we
have
<center class="par-math-display" >
<img
src="theory18x.png" alt=" ∑ - 1 ∏ -1 ∏ -1
PX (u) = yjetdj,t ekdj,k + yt ekdt,k
j<t k⁄=j,k<t k<t
" class="par-math-display" ></center>
<!--l. 102--><p class="nopar" >
<!--l. 104--><p class="indent" > and if we also let <span
class="cmmi-10">f</span><sub><span
class="cmmi-7">i</span></sub> = <span
class="cmmi-10">x </span><span
class="cmsy-10">- </span><span
class="cmmi-10">x</span><sub><span
class="cmmi-7">i</span></sub>,
<center class="par-math-display" >
<img
src="theory19x.png" alt="P (x) = ∑ y (u- x)e-1 ∏ f d-1+ P (u)∏ f e- 1
U j<t j j k⁄=j,k<t k j,k X k<t kk
" class="par-math-display" ></center>
<!--l. 109--><p class="nopar" >
<center class="math-display" >
<img
src="theory20x.png" alt=" ( )
∑ ∏ { ∏ } { ∑ ∏ ∏ }
PU (x) = yj(u - x)e-j 1 fkd-j,1k + fke-k1 yjetd-j1,t ekd-j,1l + yt eld-t1,l
j<t k⁄=j,k<t k<t ( j<t l⁄=j,l<t l<t )
" class="math-display" ></center>
<!--l. 115--><p class="nopar" >
<!--l. 117--><p class="indent" > Expanding,
<center class="par-math-display" >
<img
src="theory21x.png" alt=" ∑ { ∏ }
PU (x ) = j<tyj(u- x)e-j1 k⁄=j,k<t fkd-j,1k
+∑ y e d-1{∏ e d-1} {∏ f e-1}
j{<∏t j t j,t l⁄=j,l<}t k j,l k<t k k
+yt k<tekd-t,1kfke-k1
" class="par-math-display" ></center>
<!--l. 127--><p class="nopar" >
<center class="par-math-display" >
<img
src="theory22x.png" alt=" ⌊ ({ )} ({ )} ⌋
PU(x) = ∑ yj⌈ (u - x)e- 1 ∏ fkd- 1 + etd-1fje-1 ∏ ekd- 1fke-1 ⌉ + yt∏ d- 1fk
j<t j (k⁄=j,k<t j,k) j,t j ( k⁄=j,k<t j,k k ) k<t t,k
" class="par-math-display" ></center>
<!--l. 137--><p class="nopar" >
<center class="math-display" >
<img
src="theory23x.png" alt=" ⌊ ⌋
∑ ∏ [ ] ∏
= ⌈yj fkd-j1,k⌉ (u - x)e-j 1+ ete-j1d-j,t1fj + yt d-t1,kfk
j<t k⁄=j,k<t k<t
" class="math-display" ></center>
<!--l. 141--><p class="nopar" >
<!--l. 143--><p class="indent" > Now
<center class="par-math-display" >
<img
src="theory24x.png" alt="(u - x )e-j1 + ete-j1d-j1,tfj = (e-j1d-j1,t)[(u - x)dj,t + etfj]
" class="par-math-display" ></center>
<!--l. 148--><p class="nopar" >
<center class="math-display" >
<img
src="theory25x.png" alt=" -1 -1
= (ej dj,t)[(u - x)(xj - xt) +(u - xt)(x- xj)]
" class="math-display" ></center>
<!--l. 150--><p class="nopar" >
<center class="math-display" >
<img
src="theory26x.png" alt=" -1 -1
= (ej dj,t)(x - xt)(u- xj)
" class="math-display" ></center>
<!--l. 152--><p class="nopar" >
<center class="math-display" >
<img
src="theory27x.png" alt=" -1
= dj,tft
" class="math-display" ></center>
<!--l. 154--><p class="nopar" >
<!--l. 156--><p class="indent" > Hence
<center class="par-math-display" >
<img
src="theory28x.png" alt=" ⌊ ⌋
P (x) = ∑ ⌈y ∏ f d-1⌉ [f d-1]+ y ∏ d-1f = P (x)
U j<t jk⁄=j,k<t k j,k t j,t tk<t t,k k X
" class="par-math-display" ></center>
<!--l. 163--><p class="nopar" >
<!--l. 165--><p class="indent" > as required.
<!--l. 167--><p class="noindent" >
<h3 class="sectionHead"><span class="titlemark">5 </span> <a
id="x1-70005"></a>Construction</h3>
<!--l. 169--><p class="noindent" >Let <span
class="cmmi-10">s </span>be the number of “shares” and <span
class="cmmi-10">t </span>be the required threshold to recover the shared secret (i.e. we construct a “<span
class="cmmi-10">t </span>of <span
class="cmmi-10">s</span>”
share).
<!--l. 172--><p class="indent" > Given a secret <span
class="cmmi-10">f </span><span
class="cmsy-10">∈ </span><span
class="cmmi-10">F </span>we may construct a Lagrange interpolating polynomial <span
class="cmmi-10">P</span><sub><span
class="cmmi-7">X</span></sub> of degree no more than <span
class="cmmi-10">t </span><span
class="cmsy-10">- </span>1, with
<span
class="cmmi-10">P</span><sub><span
class="cmmi-7">X</span></sub>(0) = <span
class="cmmi-10">f</span>, as follows:
<!--l. 176--><p class="indent" > - choose distinct nonzero <span
class="cmmi-10">x</span><sub><span
class="cmr-7">1</span></sub><span
class="cmmi-10">,</span><img
src="theory29x.png" alt="⋅⋅⋅" class="cdots" ><span
class="cmmi-10">,x</span><sub><span
class="cmmi-7">s</span></sub> <span
class="cmsy-10">∈ </span><span
class="cmmi-10">F</span>
<!--l. 178--><p class="indent" > - choose arbitrary (and unpredictable) <span
class="cmmi-10">y</span><sub><span
class="cmr-7">1</span></sub><span
class="cmmi-10">,</span><img
src="theory30x.png" alt="⋅⋅⋅" class="cdots" ><span
class="cmmi-10">,y</span><sub><span
class="cmmi-7">t</span><span
class="cmsy-7">-</span><span
class="cmr-7">1</span></sub> <span
class="cmsy-10">∈ </span><span
class="cmmi-10">F</span>
<!--l. 180--><p class="indent" > - use Lemma 1 to select <span
class="cmmi-10">y</span><sub><span
class="cmmi-7">t</span></sub> such that <span
class="cmmi-10">X </span>= <span
class="cmsy-10">{</span>(<span
class="cmmi-10">x</span><sub><span
class="cmr-7">1</span></sub><span
class="cmmi-10">,y</span><sub><span
class="cmr-7">1</span></sub>)<span
class="cmmi-10">,</span><img
src="theory31x.png" alt="⋅⋅⋅" class="cdots" ><span
class="cmmi-10">,</span>(<span
class="cmmi-10">x</span><sub><span
class="cmmi-7">t</span></sub><span
class="cmmi-10">,y</span><sub><span
class="cmmi-7">t</span></sub>)<span
class="cmsy-10">} </span>has the desired intercept <span
class="cmmi-10">f</span>
<!--l. 183--><p class="indent" > To obtain additional shares, calculate <span
class="cmmi-10">y</span><sub><span
class="cmmi-7">t</span><span
class="cmr-7">+1</span></sub> = <span
class="cmmi-10">P</span><sub><span
class="cmmi-7">X</span></sub>(<span
class="cmmi-10">x</span><sub><span
class="cmmi-7">t</span><span
class="cmr-7">+1</span></sub>)<span
class="cmmi-10">,</span><img
src="theory32x.png" alt="⋅⋅⋅" class="cdots" ><span
class="cmmi-10">,y</span><sub><span
class="cmmi-7">s</span></sub> = <span
class="cmmi-10">P</span><sub><span
class="cmmi-7">X</span></sub>(<span
class="cmmi-10">x</span><sub><span
class="cmmi-7">s</span></sub>).
<!--l. 186--><p class="noindent" >
<h3 class="sectionHead"><span class="titlemark">6 </span> <a
id="x1-80006"></a>Alternate construction, as used in libgfshare</h3>
<!--l. 188--><p class="noindent" >In libgfshare the construction used is as follows:
<!--l. 190--><p class="indent" > - construct a polynomial <span
class="cmmi-10">P </span>by choosing arbitrary and unpredictable coefficients of <span
class="cmmi-10">x,</span><img
src="theory33x.png" alt="⋅⋅⋅" class="cdots" ><span
class="cmmi-10">,x</span><sup><span
class="cmmi-7">t</span><span
class="cmsy-7">-</span><span
class="cmr-7">1</span></sup> from <span
class="cmmi-10">F</span>, and setting the
coefficient of <span
class="cmmi-10">x</span><sup><span
class="cmr-7">0</span></sup> to <span
class="cmmi-10">f</span>: this therefore has the desired intercept <span
class="cmmi-10">f</span>
<!--l. 194--><p class="indent" > - choose distinct nonzero <span
class="cmmi-10">x</span><sub><span
class="cmr-7">1</span></sub><span
class="cmmi-10">,</span><img
src="theory34x.png" alt="⋅⋅⋅" class="cdots" ><span
class="cmmi-10">,x</span><sub><span
class="cmmi-7">s</span></sub> <span
class="cmsy-10">∈ </span><span
class="cmmi-10">F </span>and evaluate <span
class="cmmi-10">y</span><sub><span
class="cmr-7">1</span></sub> = <span
class="cmmi-10">P</span>(<span
class="cmmi-10">x</span><sub><span
class="cmr-7">1</span></sub>)<span
class="cmmi-10">,</span><img
src="theory35x.png" alt="⋅⋅⋅" class="cdots" ><span
class="cmmi-10">,y</span><sub><span
class="cmmi-7">s</span></sub> = <span
class="cmmi-10">P</span>(<span
class="cmmi-10">x</span><sub><span
class="cmmi-7">s</span></sub>)
<!--l. 197--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">6.1 </span> <a
id="x1-90006.1"></a>Proof of equivalence in a finite field <span
class="cmmi-10">F</span></h4>
<!--l. 199--><p class="noindent" >Suppose <span
class="cmmi-10">F </span>is finite, as is the case in libgfshare, and that in each construction, arbitrary choices are made from among all
possible values in <span
class="cmmi-10">F</span>.
<!--l. 203--><p class="indent" > In the alternate construction, given <span
class="cmmi-10">x</span><sub><span
class="cmr-7">1</span></sub><span
class="cmmi-10">,</span><img
src="theory36x.png" alt="⋅⋅⋅" class="cdots" ><span
class="cmmi-10">,x</span><sub><span
class="cmmi-7">t</span></sub><span
class="cmmi-10">,f </span>we choose a polynomial <span
class="cmmi-10">P</span>(<span
class="cmmi-10">x</span>) = <span
class="cmmi-10">f </span>+ <span
class="cmmi-10">m</span><sub><span
class="cmr-7">1</span></sub><span
class="cmmi-10">x </span>+ <img
src="theory37x.png" alt="⋅⋅⋅" class="cdots" > + <span
class="cmmi-10">m</span><sub><span
class="cmmi-7">t</span><span
class="cmsy-7">-</span><span
class="cmr-7">1</span></sub><span
class="cmmi-10">x</span><sup><span
class="cmmi-7">t</span><span
class="cmsy-7">-</span><span
class="cmr-7">1</span></sup> by choosing
arbitrary coefficients <span
class="cmmi-10">m</span><sub><span
class="cmr-7">1</span></sub><span
class="cmmi-10">,</span><img
src="theory38x.png" alt="⋅⋅⋅" class="cdots" ><span
class="cmmi-10">,m</span><sub><span
class="cmmi-7">t</span><span
class="cmsy-7">-</span><span
class="cmr-7">1</span></sub> <span
class="cmsy-10">∈ </span><span
class="cmmi-10">F</span>, i.e. choosing arbitrarily from among the <img
src="theory39x.png" alt="|F|" class="left" align="middle"><sup><span
class="cmmi-7">t</span><span
class="cmsy-7">-</span><span
class="cmr-7">1</span></sup> distinct polynomials of degree no
more than <span
class="cmmi-10">t </span><span
class="cmsy-10">- </span>1 with intercept <span
class="cmmi-10">f</span>.
<!--l. 209--><p class="indent" > In the first construction, given <span
class="cmmi-10">x</span><sub><span
class="cmr-7">1</span></sub><span
class="cmmi-10">,</span><img
src="theory40x.png" alt="⋅⋅⋅" class="cdots" ><span
class="cmmi-10">,x</span><sub><span
class="cmmi-7">t</span></sub><span
class="cmmi-10">,f </span>we obtain a polynomial by choosing arbitrary <span
class="cmmi-10">y</span><sub><span
class="cmr-7">1</span></sub><span
class="cmmi-10">,</span><img
src="theory41x.png" alt="⋅⋅⋅" class="cdots" ><span
class="cmmi-10">,y</span><sub><span
class="cmmi-7">t</span><span
class="cmsy-7">-</span><span
class="cmr-7">1</span></sub> <span
class="cmsy-10">∈ </span><span
class="cmmi-10">F</span>. The
polynomials chosen are necessarily distinct since no polynomial can pass through both (<span
class="cmmi-10">x</span><sub><span
class="cmmi-7">i</span></sub><span
class="cmmi-10">,p</span>) and (<span
class="cmmi-10">x</span><sub><span
class="cmmi-7">i</span></sub><span
class="cmmi-10">,q</span>) for any <span
class="cmmi-10">p</span><span
class="cmmi-10">≠</span><span
class="cmmi-10">q</span>, so by
choosing each <span
class="cmmi-10">y</span><sub><span
class="cmmi-7">i</span></sub> from among the <img
src="theory42x.png" alt="|F |" class="left" align="middle"> elements of <span
class="cmmi-10">F</span>, we choose arbitrarily from a set of <img
src="theory43x.png" alt="|F |" class="left" align="middle"><sup><span
class="cmmi-7">t</span><span
class="cmsy-7">-</span><span
class="cmr-7">1</span></sup> distinct polynomials whose
intercepts are all <span
class="cmmi-10">f</span>.
<!--l. 216--><p class="indent" > Since there are only <img
src="theory44x.png" alt="|F |" class="left" align="middle"><sup><span
class="cmmi-7">t</span><span
class="cmsy-7">-</span><span
class="cmr-7">1</span></sup> such polynomials, each construction chooses arbitrarily from among the same set, and by
the pigeonhole principle there exists a bijective mapping between sets of arbitrary <span
class="cmmi-10">y </span>values in the first construction and sets
of arbitrary coefficients in the second.
<!--l. 222--><p class="noindent" >
<h3 class="sectionHead"><span class="titlemark">7 </span> <a
id="x1-100007"></a>Theorem: With at least <span
class="cmmi-10">t </span>pieces the secret is recoverable</h3>
<!--l. 224--><p class="noindent" >Let <span
class="cmmi-10">B </span><span
class="cmsy-10">⊂</span><img
src="theory45x.png" alt="{(x ,y),⋅⋅⋅,(x ,y )}
1 1 s s" class="left" align="middle"> with <span
class="cmsy-10">|</span><span
class="cmmi-10">B</span><span
class="cmsy-10">| </span>= <span
class="cmmi-10">t</span>. Then <span
class="cmmi-10">P</span><sub><span
class="cmmi-7">B</span></sub>(0) = <span
class="cmmi-10">c</span>.
<!--l. 227--><p class="indent" > Further, if <span
class="cmmi-10">B</span><sup><span
class="cmsy-7">′</span></sup><span
class="cmsy-10">⊂</span><img
src="theory46x.png" alt="{(x ,y ),⋅⋅⋅,(x ,y )}
1 1 s s" class="left" align="middle"> with <span
class="cmsy-10">|</span><span
class="cmmi-10">B</span><sup><span
class="cmsy-7">′</span></sup><span
class="cmsy-10">| </span><span
class="cmmi-10">> t</span>, then for every subset <span
class="cmmi-10">B </span>of <span
class="cmmi-10">B</span><sup><span
class="cmsy-7">′</span></sup> with <span
class="cmsy-10">|</span><span
class="cmmi-10">B</span><span
class="cmsy-10">| </span>= <span
class="cmmi-10">t</span>, <span
class="cmmi-10">P</span><sub><span
class="cmmi-7">B</span></sub>(0) = <span
class="cmmi-10">f</span>.
<!--l. 231--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">7.1 </span> <a
id="x1-110007.1"></a>Proof</h4>
<!--l. 233--><p class="noindent" >The second part is trivially implied by the first.
<!--l. 235--><p class="indent" > Recall that <span
class="cmmi-10">X </span>= <img
src="theory47x.png" alt="{(x1,y1),⋅⋅⋅,(xt,yt)}" class="left" align="middle"> and that <span
class="cmmi-10">P</span><sub><span
class="cmmi-7">X</span></sub>(0) = <span
class="cmmi-10">f</span>. If <span
class="cmmi-10">B </span>= <span
class="cmmi-10">X </span>the result is true. If not, repeatedly
apply Lemma 2 to replace an element of <span
class="cmmi-10">X </span>not in <span
class="cmmi-10">B </span>with an element of <span
class="cmmi-10">B </span>not in <span
class="cmmi-10">X</span>, preserving the value of
<span
class="cmmi-10">P</span>(0).
<!--l. 240--><p class="noindent" >
<h3 class="sectionHead"><span class="titlemark">8 </span> <a
id="x1-120008"></a>Theorem: With fewer than <span
class="cmmi-10">t </span>pieces no information is gained</h3>
<!--l. 242--><p class="noindent" >Let <span
class="cmmi-10">C </span><span
class="cmsy-10">⊂</span><img
src="theory48x.png" alt="{(x1,y1),⋅⋅⋅,(xs,ys)}" class="left" align="middle"> with <span
class="cmsy-10">|</span><span
class="cmmi-10">C</span><span
class="cmsy-10">| </span><span
class="cmmi-10">< t</span>. Then for each <span
class="cmmi-10">d </span><span
class="cmsy-10">∈ </span><span
class="cmmi-10">F</span>, there exists <span
class="cmmi-10">D </span><span
class="cmsy-10">⊃ </span><span
class="cmmi-10">C</span>, <span
class="cmsy-10">|</span><span
class="cmmi-10">D</span><span
class="cmsy-10">| </span>= <span
class="cmmi-10">t</span>, such that
<span
class="cmmi-10">d </span>= <span
class="cmmi-10">P</span><sub><span
class="cmmi-7">D</span></sub>(0).
<!--l. 246--><p class="indent" > (In other words, any <span
class="cmmi-10">d </span><span
class="cmsy-10">∈ </span><span
class="cmmi-10">F </span>remains a possible value for the secret, so an attacker with fewer than <span
class="cmmi-10">t </span>shares has gained no
information.)
<!--l. 249--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">8.1 </span> <a
id="x1-130008.1"></a>Proof</h4>
<!--l. 251--><p class="noindent" >Let <span
class="cmmi-10">a</span><sub><span
class="cmmi-7">i</span></sub>, <span
class="cmmi-10">b</span><sub><span
class="cmmi-7">i</span></sub> be such that <span
class="cmmi-10">C </span>= <img
src="theory49x.png" alt="{(a1,b1),⋅⋅⋅,(an,bn)}" class="left" align="middle">, some <span
class="cmmi-10">n < t</span>. Choose arbitrary <span
class="cmmi-10">a</span><sub><span
class="cmmi-7">n</span><span
class="cmr-7">+1</span></sub><span
class="cmmi-10">,</span><img
src="theory50x.png" alt="⋅⋅⋅" class="cdots" ><span
class="cmmi-10">,a</span><sub><span
class="cmmi-7">t</span></sub> and arbitrary <span
class="cmmi-10">b</span><sub><span
class="cmmi-7">n</span><span
class="cmr-7">+1</span></sub><span
class="cmmi-10">,</span><img
src="theory51x.png" alt="⋅⋅⋅" class="cdots" ><span
class="cmmi-10">,b</span><sub><span
class="cmmi-7">t</span><span
class="cmsy-7">-</span><span
class="cmr-7">1</span></sub>.
Let <span
class="cmmi-10">b</span><sub><span
class="cmmi-7">t</span></sub> be chosen by applying Lemma 1 with <span
class="cmmi-10">c </span>:= <span
class="cmmi-10">d</span>. Then by choice of <span
class="cmmi-10">b</span><sub><span
class="cmmi-7">t</span></sub>, <span
class="cmmi-10">P</span><sub><span
class="cmmi-7">C</span></sub>(0) = <span
class="cmmi-10">d </span>as required.
<!--l. 256--><p class="noindent" >
<h3 class="sectionHead"><span class="titlemark">9 </span> <a
id="x1-140009"></a>Implementation in <span
class="cmmi-10">GF</span>(2<sup><span
class="cmr-7">8</span></sup>)</h3>
<!--l. 258--><p class="noindent" >The program <span
class="cmtt-10">test</span><span
class="cmtt-10">_gfshare</span><span
class="cmtt-10">_isfield</span>, compiled and run by <span
class="cmtt-10">make check</span>, demonstrates that the calculations done by
libgfshare are indeed performed in a field.
<!--l. 262--><p class="noindent" >
<h3 class="sectionHead"><span class="titlemark">10 </span> <a
id="x1-1500010"></a>Attacks not addressed</h3>
<!--l. 264--><p class="noindent" >This document has not addressed the following:
<!--l. 266--><p class="indent" > - Attacks based on the use of a predictable or partially predictable pseudorandom number generator might be
possible.
<!--l. 269--><p class="indent" > - In the implementation used in libgfshare, the field <span
class="cmmi-10">F </span>is the field of byte values, with addition being bitwise exclusive-or,
and multiplication as usual; each byte of the secret is shared separately by applying this algorithm separately.
This means that when a secret file is shared, the length in bytes of each share equals the length in bytes of
the secret. If the length of the secret is itself secret, it should be padded to some standard length before
sharing.
<!--l. 277--><p class="noindent" >
<h3 class="sectionHead"><span class="titlemark">11 </span> <a
id="x1-1600011"></a>References</h3>
<!--l. 279--><p class="noindent" >[SHAMIR] Adi Shamir, ”How to share a secret”, Communications of the ACM, 22(1), pp612–613, 1979. Available at
<a
href="http://www.cs.tau.ac.il/~bchor/Shamir.html" class="url" ><span
class="cmtt-10">http://www.cs.tau.ac.il/</span><span
class="cmtt-10">~</span><span
class="cmtt-10">bchor/Shamir.html</span></a>
<!--l. 281--><p class="noindent" >
<h3 class="sectionHead"><span class="titlemark">12 </span> <a
id="x1-1700012"></a>Copyright and disclaimer</h3>
<!--l. 283--><p class="noindent" >Copyright 2006 Simon McVittie, <a
href="http://smcv.pseudorandom.co.uk/" class="url" ><span
class="cmtt-10">http://smcv.pseudorandom.co.uk/</span></a>
<!--l. 285--><p class="indent" > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the ”Software”), to deal in the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
the Software is furnished to do so, subject to the following conditions:
<!--l. 292--><p class="indent" > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
Software.
<!--l. 295--><p class="indent" > THE SOFTWARE IS PROVIDED ”AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
</body></html>
|