密码算法与协议3-密钥的确认_第1页
密码算法与协议3-密钥的确认_第2页
密码算法与协议3-密钥的确认_第3页
密码算法与协议3-密钥的确认_第4页
密码算法与协议3-密钥的确认_第5页
已阅读5页,还剩36页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

2023/11/251Chapter3.

CommitmentSchemes2023/11/252IntroductionThefunctionalityofacommitmentschemeiscommonlyintroducedbymeansofthefollowinganalogy.Supposeyouneedtocommittoacertainvalue,butyoudon’twanttorevealitrightaway.Forexample,thecommittedvalueisasealedbidinsomeauctionscheme.Onewaytodothisistowritethevalueonapieceofpaper,putitinabox,andlocktheboxwithapadlock.Thelockedboxisthengiventotheotherparty,butyoukeepthekey.Atalatertime,youpresentthekeytotheotherpartywhomaythenopenthebox,andcheckitscontents.2023/11/253CoinFlippingovertheTelephoneAnimmediateapplicationofcommitmentschemesisknownas“coinflippingoverthetelephone”oras“coinflippingintoawell”.Twoparties,sayAandB,determineamutuallyrandombitasfollows.PartyAcommitstoarandombitvaluebA

R{0,1}bysendingacommitmentonbAtopartyB.PartyBthenrepliesbysendingabitvaluebB

R{0,1}toA.Finally,partyAopensthecommitmentandsendsbAtoB.Bothpartiestakeb=bA

bBasthecommonrandombit.Ifatleastoneofthepartiesishonest,theresultingbitbisdistributeduniformlyatrandom,assumingthatAandBcannotcheatwhenrevealingtheirbits.2023/11/254ApplicationofCommitmentNotethatpartyBseesthecommitmentofAbeforechoosingitsbitbB,sonoinformationonbitbAshouldleakfromthecommitmentonbA.Similarly,partyAcouldtrytoinfluencethevalueoftheresultingbitb(afterseeingthebitbB)byopeningthecommitmentonbAasacommitmenton1-bA.Clearly,partyAshouldnotbeableto“changeitsmind”insuchaway!Generatingmutuallyrandombitsisabasicpartofmanyprotocols.Commitmentsareusedasanauxiliarytoolinmanycryptographicapplications,suchaszero-knowledgeproofsandsecuremulti-partycomputation.2023/11/255CommitmentSchemeAcommitmentschemeconsistsoftwoprotocols,calledcommit

andreveal,betweentwoparties,usuallycalledthesenderandthereceiver.Inmanycases,theprotocolscommitandrevealcanbedefinedintermsofasinglealgorithm,requiringnointeractionbetweenthesenderandreceiveratall.Suchcommitmentschemesarenon-interactive.2023/11/256

ReceiverCommitPhaseRevealPhaseSenderReceiverXCommitmentProtocol

Receivercanverify

X

wasthevalueintheboxSenderisboundtoXXSender2023/11/257BitCommitment:LockingaBitinaSecureBoxf:{0,1}XYisbitcommitmentschemeifforarandomlychosenxfromXConcealing:forabitb

{0,1},Verifier(Receiver)cannotdeterminethevaluebfromf(b,x),theblobBinding:Prover(Sender)canlateropentheblobbyrevealingthevalueofx.TheProvershouldnotbeabletoopentheblobasboth0or12023/11/258FollowingCommitPhaseReceivershouldnothavegainedanyinformationaboutXInformationtheoretic?Computationally?SendershouldbeboundtoXNotwodifferentandvalidopeningsexistItiscomputationallyinfeasibletofindtwodifferentvalidopenings2023/11/259BitCommitmentbyEncryption(Example1)LetK=(n=pq,e,d)beanRSAkeyTocommitabitb,wecoulddothefollowingChoosearandomxsuchthatxisevenifb=0xisoddifb=1Letblob(b)=xemodnToopenblob(b),justreviewx,usetheencryptiontocheck!Concealing:b不参与其中运算Binding:不存在x1(odd),x2(even),x1e=x2emodn2023/11/2510BitCommitmentbyEncryption(Example2)LetK=(n=pq,p,qprimes,),(n,m)publishedTocommitabitb,wecoulddothefollowingChoosearandomxsuchthatY=f(b,x)=mbx2modnToopenblob(b),justreviewbandx,usetheencryptiontoverify:y=f(b,x)=mbx2modnConcealing:如果平方剩余问题不可解,noinformationonbwillberevealedBinding:ifnot,thenexistx1,x2,commit(x1,,1)=commit(x2,,0),mx12=x22modn,thenm=(x2x1-1)2(modn),itiscontradictiontothecondition.2023/11/2511DefinitionLetcommit:{0,1}k×{0,1}*

{0,1}*beadeterministicpolynomialtimealgorithm,wherekisasecurityparameter.A(noninteractive)commitmentschemeconsistsoftwoprotocolsbetweenasenderandareceiver:Commitprotocol:Tocommittoavaluex

{0,1}*,thesendercomputesC=commit(r,x),wherer

R{0,1}k,andsendsCtothereceiver.Revealprotocol:ToopencommitmentC=commit(r,x),thesendersendsrandxtothereceiver.Thereceivercomputescommit(r,x)andverifiesthatitisequaltothepreviouslyreceivedcommitment.Inthespecialcasethatthecommittedvalueisabit,thatis,x

{0,1},onespeaksofabitcommitmentscheme.2023/11/2512SecurityRequirementsThesecurityrequirementsforabitcommitmentschemearethefollowing.Thecommitmentmustbebinding,i.e.,foranyadversaryA,theprobabilityofgeneratingr,r’

{0,1}ksatisfyingcommit(r,0)=commit(r’,1)shouldbenegligible(asafunctionofk).Furthermore,thecommitmentmustbehiding,i.e.,thedistributionsinducedbycommit(r,0)andcommit(r,1)(withr

R{0,1}k)areindistinguishable.2023/11/2513SomedistinctionsAcommitmentschemeiscalledcomputationallybinding

iftheadversaryAisrestrictedtobeap.p.t.algorithm.theschemeiscalledinformationtheoreticallybinding

ifnosuchrestrictionismade(inotherwords,theadversarymaybeunlimitedpowerful).Similarly,theschemeiscalledcomputationallyhiding

ifthedistributionsinducedbycommit(r,0)andcommit(r,1)arepolynomiallyindistinguishableandtheschemeiscalledinformation-theoreticallyhiding

ifthesedistributionsarestatisticallyindistinguishable.2023/11/2514SecurityPropertiesThesecuritypropertiesareeasilyextendedtothecasethatxisanarbitrarystring.Notethattheabovesecurityrequirementsonlycoverattacksbyeitherthesenderorthereceiver.Forexample,supposepartyAactsasthesenderandpartyBactsasthereceiver,andAsendsacommitmentCtoB.ThenthereisnoguaranteethatBwillnoticeifanattackerreplacesCbyacommitmentC’=commit(r’,x’)duringthecommitprotocol,andreplacesr,xbyr’,x’duringtherevealprotocol.SuchattacksmaybestoppedbyusinganauthenticatedchannelbetweenAandB.2023/11/2515CommitmentUsingaHashFunctionGivenacryptographichashfunctionHoneobtainsabitcommitmentschemesimplybysettingcommit0(r,b)=H(r,b),whereb

{0,1}andr

R{0,1}k.ThepreimageresistanceofHguaranteesthatthevalueofbremainshidden(aswellasthevalueofr).Theschemeisthereforehiding.Collision-resistanceofHguaranteesthatthecommittercannotpreparer,bandr’,1-bwithH(r,b)=H(r’,1-b).Hence,theschemeisbindingaswell.Moreprecisely,weconcludethattheschemeiscomputationallybindingandcomputationallyhiding.Canwedobetter?2023/11/2516BitCommitment-Suggestion1AliceBob1SHA-101001CommitmentAliceBob1Unveiling2023/11/2517BitCommitment-Suggestion2AliceBob1101110100SHA-101001CommitmentAliceBob1101110100Unveiling2023/11/2518BitCommitment-AssumptionsHashisonewayandcollision-freeAliceiscomputationallyboundedHashdoesn’t“leak”informationExampleofa“leaky”hash:1101110100SHA-1100112023/11/2519CommitmentUsingaDiscreteLogSettingLetG=<g>beagroupofordern,wherenisalargeprime.Leth

RG\{1}denotearandomgroupelement(suchthatlogghisnotknowntoanyparty).Wedefinethefollowingbitcommitmentscheme(knownas“Pedersen’scommitmentscheme”):commit1(r,b)=grhb,wherer

RZn.Thisschemeiscomputationallybinding(undertheDLassumption),whichcanbeseenasfollows.Supposeitiscomputationallyfeasibletocomputer,r’

Znsuchthatcommit1(r,b)=commit1(r’,1-b).Thatmeansthatgrhb=gr’h1-b,hencethatloggh=(r-r’)/(1-2b).Sincer,r’,andbareallknown,thismeansthatthediscretelogofhwithrespecttogwouldbecomputed.2023/11/2520CommitmentUsingaDiscreteLog(cont.)Ontheotherhand,theschemeisinformation-theoreticallyhiding,sincethedistributionofgrhbisstatisticallyindependentofthevalueofb.(相当于gr和gr’的分布是统计不可区分的)

r=r’概率为0,因为h不为1,所以x不为0Asacomplementarybitcommitmentscheme,onemayusethefollowingElGamal-likescheme:commit2(r,b)=(gr,hr+b),wherer

RZn.Thisschemeisinformation-theoreticallybinding,sinceitiseasilyseentherecannotevenexistr,r’

Znsuchthatcommit2(r,b)=commit2(r’,1-b),forb

{0,1}.即不能既作为0又作为1来打开承诺2023/11/2521CommitmentUsingaDiscreteLog(cont.)Ontheotherhand,thisschemeiscomputationallyhiding,sincebcanbecomputedasfollows.AssumingthattheDLproblemisfeasible,onemaycomputebfromagivencommitmentcommit2(r,b)=(x,y),usingtheformulab=loghy-loggx.Note,however,thattheDLassumptionisnotsufficienttoguaranteethattheschemeishiding.WeneedtousetheDDHassumptiontoensurethehidingproperty,assolvingforbgivencommit2(r,b)isequivalenttosolvingtheDDHproblem.Bothcommitmentschemesremainsecurewhenusedforb

Zninsteadofb

{0,1}

Zn.2023/11/2522ExampleExample:Analyzethesecuritypropertiesofcommit1andcommit2forthecasethatb

Zn.Solution:Thesamereasoningappliesasbefore,exceptthatforshowingthatcommit1iscomputationallybindingweneedamoregeneralargument.Supposethatitisfeasibletofindr,r’,b,b’withb

b’suchthatcommit1(r,b)=commit1(r’,b’).Thismeansthatgrhb=gr’hb’,hencethatloggh=(r–r’)/(b’-b).Sincer,r’,b,b’areallknown,thismeansthatthediscretelogofhwithrespecttogcanbecomputed,contradictingtheDLassumption.2023/11/2523ExampleExample:Whathappensifthereceiverknowslogghinschemecommit1?Samequestionforschemecommit2.Solution:Sinceschemecommit1isinformation-theoreticallyhiding,thevalueofthecommittedvaluebishiddenevenifthereceiverknowsloggh.Forschemecommit2,thereceiverisabletocomputethevalueofhb=y/xloggh,where(x=gr,y=hr+b)=commit2(r,b).Ifb

{0,1},thenhb

{1,h}andthevalueofbiseasilydetermined.Ifb

Znandnoadditionalinformationonbisknown,thencomputingbfromhbwillbeinfeasible(undertheDLassumption).2023/11/2524ExampleExample:Discussthesecurityofthefollowingcommitmentschemeforvaluesm

<g>:commit(r,m)=grm,wherer

RZn.Isitbinding?Isithiding?Solution:Theschemeisnotusefulasitisnotbinding.Letm’=mgr’,thencommit(r,m)=grm=gr-r’m’=commit(r–r’,m’).So,commitmentcommit(r,m)canbeopenedasacommitmenttoanymessagem’withm’=mgr’.Theschemeisinformation-theoreticallyhiding.Again:相当于gr和gr’的分布是统计不可区分的2023/11/2525ImpossibilityResultAnaturalquestioniswhetherthereexistsacommitmentschemewhichisbothinformation-theoreticallybindingandinformation-theoreticallyhiding.Thefollowinginformalargumentshowsthatsuchaschemecannotexist.Consideranybitcommitmentschemewhichisinformation-theoreticallybinding.Forsuchaschemetherecannotexistanyr,r’suchthatcommit(r,0)=commit(r’,1),becausethenthe(unlimitedpowerful)senderwouldbeabletocomputebothrandr’,andopenthecommitmentatitsliking.However,ifthesendercommitsto0,say,usingC=commit(r,0)forsomer,the(unlimitedpowerful)receiverwillnoticethattheredoesnotexistanyr’withC=commit(r’,1),hencethereceiverknowsthatthecommittedvaluemustbe0.2023/11/2526HomomorphicCommitmentsThebasicsecurityrequirementforacommitmentschemearethatismustbebindingandhiding.Anotherusefulpropertyofacommitmentschemeisthatitmaybehomomorphic.Wewillintroducethehomomorphicpropertybymeansofanexample.ConsiderPedersen’scommitmentscheme,givenbycommit1(r,x)=grhx,wherer

RZnandx

Zn.Thisschemeishomomorphicinthesensethat:commit1(r,x)commit1(r’,x’)=commit1(r+r’,x+x’),wherethemultiplicationontheleft-handsideisinthegroupGandtheadditionsontheright-handsideareinZn.So,theproductoftwocommitmentsisacommitmenttothesumofthecommittedvalues.Homomorphicpropertiesturnouttobeveryusefulforachievingsecuremultipartycomputation.2023/11/2527HomomorphicPropertyAsaconcreteexample,homomorphiccommitmentscanbeusedasabuildingblockforsecureelectionschemes:veryroughly,duringthevotingstage,votersputtheirvotesintohomomorphiccommitments,andduringthetallyingstage,thevotesarecountedbytakingtheproductofallcommitments).2023/11/2528ExampleLetm=pq.TheQuadraticResiduosity(QR)assumptionstatesthattheQRproblemisinfeasible.Example:Lety

Jmdenoteanon-quadraticresiduemodulom(e.g.,y=-1isanon-quadraticresiduemodulomwhenmisaBluminteger“p=q=3mod4”).Considerthefollowingbitcommitmentscheme:commit(r,b)=ybr2modm,wherer

RZm.Inwhatsenseistheschemebinding?Inwhatsenseistheschemehiding?Inwhatsenseistheschemehomomorphic?2023/11/2529CommitmentusingQuadraticResiduositySolution:Notethatb=0ifandonlyifcommit(r,b)isaquadraticresiduemodulom.Therefore,theschemeisinformation-theoreticallybindingandcomputationallyhiding(why??Animportantexercise).Thehomomorphicpropertyforthisschemeisgivenbycommit(r,b)commit(r’,b’)=commit(rr’,b

b’),hencetheproductoftwocommitmentsisacommitmenttotheXORofthecommittedvalues.Computationallyhiding:如果平方剩余问题可解,那么如果commnit(r,b)为平方剩余则b=0,否则b=1.Information-theoreticallybinding:ifthereexistsr1,r2,commit(r1,,1)=commit(r2,0),thenyr12=r22modn,theny=(r2r1-1)2(modn),itiscontradictiontothecondition.2023/11/2530ApplicationsCoinFlippingAuctionsZeroKnowledge2023/11/2531CoinFlippingbyTelephoneAliceandBobwanttomakesomedecisionbasedonarandomcoin--ifthecoinis“head”Alicegetstherightandifthecoinis“tail”,BobgetstherightAliceisinBeijingBobisinShanghai2023/11/2532UsingCommitmentProtocolAlicechoosearandombitbAlicesendtoBobhercommitmentblobBobguessthevalueofthebitAliceopentheBlobHeadifBobiswrongandtailifBobisright2023/11/2533CoinFlippingProtocol

AselectsrA

R0,1;Commitsto

rA

BsendsbitrB

R0,1CoinisrA

rBIfAdoesn’topen-resultis

IfA’sopeningisinvalid-resultis

2023/11/2534InteractiveProofSystemLetL

{0,1}*bealanguageOneparty,theProverP,wanttoconvincetheotherparty,VerifierVthat

X

LInourcase:bothpartiesarePPTM;exchangemessagesandflipcoinsProverPmayhavesomeextrainformationWAttheendoftheprotocolVerifierVstate

{accept,reject}ForagivenWtheinteractionbetweenVandPinducesadistributionofthetranscriptsProverPVerifierV

2023/11/2535WitnessProtectionProgramsAwitnessindistinguishableproofsystemforX

L

Proverp

VerifierVCompleteness:ifproverPhaswitnessW-canconstructeffectiveproofthatmakesverifierVaccept.Soundness:ifX

L

no

proverP*

cansucceedwithhighprobabilitytomakeverifier

Vaccept.WitnessIndistinguishability:foreveryV*andanywitnessesW1

and

W2:distributionsontranscriptsarecomputationallyindistinguishable.Nopolynomialtimetestcandistinguishthetwo2023/11/2536Example:HamiltonicityCommoninputgraphG=(V,E)ListhelanguageofgraphswithHamiltoniancyclesG=(V,E)

L

ifandonlyifthereisacycleC=(i1,i2,

in)coveringallnodesofVonceand(ij,ij+1)

E2023/11/2537Example:HamiltonicityCommoninputgraphG=(V,E)ListhelanguageofgraphswithHamiltoniancyclesWitness

W–aHamiltonianCycleC=(i1,i2,

in)Protocol:ProverP

selectsarandompermutation

ofthenodesCommitstotheadjacencymatrixof

(G)=(

(V),

(E))foreachentryseparatelyVerifier

V

selectsandsendsabitr

R0,1Ifr=0P

opensallthecommitmentsandsends

Ifr=1P

opensonlythecommitmentscorrespondingtoCentries(

(ij),

(ij+1))Verifier

V

acceptsif:r=0andcommittedgraphisomorphictoG

r=1anda

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论