Alice and Bob’s Revenge? Alice Bobtpc/cwi/Teaching/MASPPapers/Lecture13.pdf · –Alice and Bob...

22
Alice and Bob’s Revenge? Alice Bob Elvis

Transcript of Alice and Bob’s Revenge? Alice Bobtpc/cwi/Teaching/MASPPapers/Lecture13.pdf · –Alice and Bob...

Page 1: Alice and Bob’s Revenge? Alice Bobtpc/cwi/Teaching/MASPPapers/Lecture13.pdf · –Alice and Bob can recognize the exchanged data –The data is uniformly reconstructable. •Alice

Alice and Bob’s Revenge?

Alice Bob

Elvis

Page 2: Alice and Bob’s Revenge? Alice Bobtpc/cwi/Teaching/MASPPapers/Lecture13.pdf · –Alice and Bob can recognize the exchanged data –The data is uniformly reconstructable. •Alice

If there is a protocol

If there is a protocol then there must be ashortest protocol

1. Alice → Bob : ???2. Bob → Alice: ???....n-1. ?? → ?? : ??n. ?? → ?? : ??

Page 3: Alice and Bob’s Revenge? Alice Bobtpc/cwi/Teaching/MASPPapers/Lecture13.pdf · –Alice and Bob can recognize the exchanged data –The data is uniformly reconstructable. •Alice

If there is a protocol

If there is a protocol then there must be ashortest protocol

1. Alice → Bob : ???2. Bob → Alice: ???....n-1. ?? → ?? : ??

Page 4: Alice and Bob’s Revenge? Alice Bobtpc/cwi/Teaching/MASPPapers/Lecture13.pdf · –Alice and Bob can recognize the exchanged data –The data is uniformly reconstructable. •Alice

Modelling and Analysing ofSecurity Protocol: Lecture 13

What you can’t do with protocols..... and how to do it anyway.

Tom ChothiaCWI

Page 5: Alice and Bob’s Revenge? Alice Bobtpc/cwi/Teaching/MASPPapers/Lecture13.pdf · –Alice and Bob can recognize the exchanged data –The data is uniformly reconstructable. •Alice

The Rest of the Course

• 2nd, 9th, 16th, 23rd and 30th Nov Student presentations.

• 2nd:– Antanas Kaziliunas– Liang Wang– Kristian Rietveld– Renuka Autar

Final deadline: e-mail about yourpresentation by Wednesday

Page 6: Alice and Bob’s Revenge? Alice Bobtpc/cwi/Teaching/MASPPapers/Lecture13.pdf · –Alice and Bob can recognize the exchanged data –The data is uniformly reconstructable. •Alice

Today

• What you can’t do with protocol: globalconsensus

• Activities that require global consensus• Global consensus using probability or

Trusted Third Party.BREAK• Some commonly used protocol• Extracting a protocol from a RFC

Page 7: Alice and Bob’s Revenge? Alice Bobtpc/cwi/Teaching/MASPPapers/Lecture13.pdf · –Alice and Bob can recognize the exchanged data –The data is uniformly reconstructable. •Alice

What’s Going Wrong?

• Using BAN logic:A |≡ B will attack A will attack

But also:B |≡ A will attack B will attack

Therefore:

A |≡ B |≡ A will attack A |≡ B will attack A will attack

Page 8: Alice and Bob’s Revenge? Alice Bobtpc/cwi/Teaching/MASPPapers/Lecture13.pdf · –Alice and Bob can recognize the exchanged data –The data is uniformly reconstructable. •Alice

What’s Going Wrong?

Therefore:

A |≡ B |≡ A |≡ B will attack A |≡ B |≡ A will attackA |≡ B will attack

A will attack

and so on and so on ....

Page 9: Alice and Bob’s Revenge? Alice Bobtpc/cwi/Teaching/MASPPapers/Lecture13.pdf · –Alice and Bob can recognize the exchanged data –The data is uniformly reconstructable. •Alice

What’s Going Wrong?Alice and Bob need global consensus, i.e., for every n:

• A |≡ B |≡ ... n ... |≡ B |≡ XAnd• B |≡ A |≡ ... n ... |≡ A |≡ X

Each message can only add a finite “amount of belief”

No true global consensus unless you can be 100%sure that your message will be delivered in a fixamount of time.

Page 10: Alice and Bob’s Revenge? Alice Bobtpc/cwi/Teaching/MASPPapers/Lecture13.pdf · –Alice and Bob can recognize the exchanged data –The data is uniformly reconstructable. •Alice

Problems that Require GlobalConsensus

• Atomic Commitment• Leadership Election• Fair Exchange• Synchronous communication from

asynchronous channels.

Page 11: Alice and Bob’s Revenge? Alice Bobtpc/cwi/Teaching/MASPPapers/Lecture13.pdf · –Alice and Bob can recognize the exchanged data –The data is uniformly reconstructable. •Alice

How To Do It Anyway

• We can approximate global consensusby:

– Using probability– Using a Trusted Third Party– Using unique IDs for each process

Or we can just not use it.

Page 12: Alice and Bob’s Revenge? Alice Bobtpc/cwi/Teaching/MASPPapers/Lecture13.pdf · –Alice and Bob can recognize the exchanged data –The data is uniformly reconstructable. •Alice

Synchronous Channel fromAsynchronous Channels

1. A → B : Message2. B → A : ACK

Not global consensus:– B can claim it did get the message when it did.– A might not get the ACK message.

But still useful

Page 13: Alice and Bob’s Revenge? Alice Bobtpc/cwi/Teaching/MASPPapers/Lecture13.pdf · –Alice and Bob can recognize the exchanged data –The data is uniformly reconstructable. •Alice

Two Phase Commit

• There are many participants and oneadministrator:

Participants → Admin : PreparedAdmin → Participants : Commit

Page 14: Alice and Bob’s Revenge? Alice Bobtpc/cwi/Teaching/MASPPapers/Lecture13.pdf · –Alice and Bob can recognize the exchanged data –The data is uniformly reconstructable. •Alice

Two Phase Commit

• There are many participants and oneadministrator:

Participants → Admin : PreparedParticipant → Admin : FailAdmin → Participants : RollBack

Page 15: Alice and Bob’s Revenge? Alice Bobtpc/cwi/Teaching/MASPPapers/Lecture13.pdf · –Alice and Bob can recognize the exchanged data –The data is uniformly reconstructable. •Alice

Leadership Election

• What happens if the Admin fails?

• Easy if the nodes have unique IDs.

• Otherwise hard to break symmetry.

• Have to use probability.

Page 16: Alice and Bob’s Revenge? Alice Bobtpc/cwi/Teaching/MASPPapers/Lecture13.pdf · –Alice and Bob can recognize the exchanged data –The data is uniformly reconstructable. •Alice

Fair Exchange using a TTP

1. A → S : {B, M1, SignA(M2)}Kas

2. B → S : {A, M2, SignB(M1)}Kbs

3. S → A/B : SignA(M2), SignB(M1)

Page 17: Alice and Bob’s Revenge? Alice Bobtpc/cwi/Teaching/MASPPapers/Lecture13.pdf · –Alice and Bob can recognize the exchanged data –The data is uniformly reconstructable. •Alice

Rabin’s F.E. Protocol• A,B and S agree on “n” such that they want to

succeed with prob.(n-1) / n

A → B : SignA( MA if S says 1)B → A : SignB( MB if S says =< 2)A → B : SignA( MB if S says =< 3)....B → A : SignB( MB if S says =< n-1)A → B : SignB( MB if S says =< n)B → A : SignB( MB if S says =< n)S → A,B : SignS(random number between 1 & n)

Page 18: Alice and Bob’s Revenge? Alice Bobtpc/cwi/Teaching/MASPPapers/Lecture13.pdf · –Alice and Bob can recognize the exchanged data –The data is uniformly reconstructable. •Alice

1 of 2 Oblivious Transfer

• Probabilistic Fair Exchange without atrusted third party often use ObliviousTransfer.

• 1 of 2 Oblivious Transfer lets Alicesend one of two messages to Bob insuch a way that Alice doesn’t knowwhich message was sent!

Page 19: Alice and Bob’s Revenge? Alice Bobtpc/cwi/Teaching/MASPPapers/Lecture13.pdf · –Alice and Bob can recognize the exchanged data –The data is uniformly reconstructable. •Alice

1 of 2 Oblivious Transfer

• Alice wishes to send M1 or M2, shepicks two numbers “n” and “m”:

1. A → B : n,m2. B → A : EA(k) + ? (k random, ? = n or m)3. A → B : Dec( EA(k) + ? - n ) + M1

, Dec( EA(k) + ? - m ) + M2

Page 20: Alice and Bob’s Revenge? Alice Bobtpc/cwi/Teaching/MASPPapers/Lecture13.pdf · –Alice and Bob can recognize the exchanged data –The data is uniformly reconstructable. •Alice

Fair Exchange usingOblivious Transfer

• Fair Exchange assumes that– Alice and Bob can recognize the

exchanged data– The data is uniformly reconstructable.

• Alice and Bob exchange half their datausing OT then reveal all the data bit bybit.

Page 21: Alice and Bob’s Revenge? Alice Bobtpc/cwi/Teaching/MASPPapers/Lecture13.pdf · –Alice and Bob can recognize the exchanged data –The data is uniformly reconstructable. •Alice

Summary

• Global Consensus is not possible butcan be approximated using

– A trusted third party– Probability.

Page 22: Alice and Bob’s Revenge? Alice Bobtpc/cwi/Teaching/MASPPapers/Lecture13.pdf · –Alice and Bob can recognize the exchanged data –The data is uniformly reconstructable. •Alice

Today

• What you can’t do with protocol: globalconsensus

• Activities that require global consensus• Global consensus using probability or

Trusted Third Party.BREAK• Some commonly used protocol• Extracting a protocol from a RFC