⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pinsketch.txt

📁 关于BCH编码的一个应用
💻 TXT
字号:
INTRODUCTIONThe files pinsketch.h, sketch.cpp, differ.cpp, io.cpp and bch.cpp containan implementation of PinSketch, the BCH-based secure sketch from "FuzzyExtractors: How to Generate Strong Keys from Biometrics and Other NoisyData" by Dodis, Ostrovsky, Reyzin and Smith (preliminary version in theproceedings of Eurocrypt 2004; current version to be maintained athttp://eprint.iacr.org/2003/235).  The implementation is by Kevin Harmonand Leonid Reyzin (reyzin@cs.bu.edu).  It uses Victor Shoup's NTL (ALibrary for doing Number Theory), which must be installed before it willcompile; see http://www.shoup.net.Given an input set A of any number of (nonzero) m-bit strings and aparameter t, the program "sketch" will produce as output a sketch of A ofsize tm bits.  Then, if the size of the symmetric difference between sets Aand B is at most t, the program "differ" will find the symmetric differencebetween A and B given only B and the sketch of A (thus, in particular,recovering elements of A that are not in B without seeing A).  In fact,"differ" can work given just the sketches of A and B (even if the sketcheswere computed with different values of t, as long as the number ofdifferences is at most the smaller of the two).These programs provide an efficient way to find differences between twosets without having to communicate the sets.  They also allow forinformation-reconciliation with minimum information leakage.  For moredetails and applications, see the aforementioned "Fuzzy Extractors" paper.The mathematical meat of the implementation is in bch.cpp, which is basedon "Syndrome Encoding and Decoding of BCH Codes in Sublinear Time"(excerpted from the aforementioned "Fuzzy Extractors" paper).  The code inbch.cpp is of greatest general interest; the rest of the code is specificto the formats chosen by this implementation.WARNINGS AND LIMITATIONSThe programs will not behave correctly if any of the following occurs.1) There are duplicate elements in A or duplicate elements in B (i.e., if Aor B are multisets).2) A or B contains a string of all zeroes.3) t is greater than or equal to 2^{m-1}4) The input or sketch files do not follow the prescribed format.5) The size of the symmetric difference between the two sets is greaterthan t (then "differ" will output an error message in most cases, but mayoutput an incorrect set difference).Note that cases 1, 2, 3, and 4 can be taken care of at the input stage (butcurrently are not).  Case 5 is impossible to fix completely, although thereare techniques that will reduce the likelihood of an incorrect output atthe expense of a larger sketch.USAGE DETAILSTo compile, make sure you have NTL (A Library for doing Number Theory)installed (see http://www.shoup.net) and issue command makeIf the compilation fails, see the comments in the file called Makefile.Once everything compiles, invoking./sketch A.setwill produce A.ss (note that file must end in .set).  The format of A.setist=<integer>m=<integer>[<int1> <int2> ... ]where <intj> is a nonzero m-bit integer written in decimal. For example,t=2m=10[2 347 532 87 876 39](Note that the choice to have inputs be decimal integers was arbitrary, andthe program can be easily modified to accept other inputs).The sketch file A.ss will contain information on the input parameters andgenerating polynomial of GF(2^m), followed by the tm bits of the sketch inhuman-readable form as t elements of GF(2^m).  Of course, in a system wherethe input parameters are fixed, only the tm bits are needed.Invoking./differ A.ss B.setwill output the symmetric difference between A and B if it has at most telements, and an error message or an incorrect answer otherwise.Note that the order of elements in the symmetric difference is arbitrary.The format of B.set is the same as of A.set; however, its t and m values willbe ignored.Invoking./differ A.ss B.ss(assuming B.ss was computed using sketch B.set) will also output thesymmetric difference between A and B.  If A and B were computed withrespect to different m (or the same m but different generating polynomials,which should not happen the way sketch is currently coded), an errormessage will be output.  If A.ss was computed with respect to t1 and B.sswas computed with respect to t2, then the difference must have no more thanmin(t1, t2) elements; else an error message will be output, or possibly anincorrect answer.Sample files X.set, Y.set X.ss, Y.ss are included with the implementation.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -