資源簡(jiǎn)介
matlab開(kāi)發(fā)-ShamirsSecretSharing。沙米爾的秘密共享方案,也被稱(chēng)為(k,n)閾值,在這個(gè)文件中實(shí)現(xiàn)。

代碼片段和文件信息
%--------------------------------------------------------------------------
%?Shamir‘s?Secret?Sharing?Demo
%?By?Yue?Wu
%?ywu03@ece.tufts.edu
%?01/10/2010
%--------------------------------------------------------------------------
clear?all
close?all
clc
s?=?-1234.5;?%?the?secret?number
k?=?3;?%?the?number?of?pieces?of?info?which?are?sufficient?for?reconstruction
n?=?6;?%?total?number?of?pieces?of?info
d?=?ShamirSharing(skn);?%?generate?pieces?of?info?parts
c?=?d(3:5:);?%?collect?3?pieces?of?info
r?=?ShamirReconstruction(ck);?%?reconstruct?secret?info
display([‘the?secret?info?is?‘?num2str(s)])
display([‘the?used?info?is:‘])
display(c);
display([‘reconstruction?is?‘?num2str(r)])
?屬性????????????大小?????日期????時(shí)間???名稱(chēng)
-----------?---------??----------?-----??----
?????文件?????????718??2011-01-10?11:04??Demo.m
?????文件????????1581??2011-01-10?11:03??ShamirReconstruction.m
?????文件????????1601??2011-01-10?11:03??ShamirSharing.m
?????文件????????1306??2014-02-12?13:22??license.txt
評(píng)論
共有 條評(píng)論