From arnab.smtp at gmail.com Sun Apr 25 03:50:13 2010 From: arnab.smtp at gmail.com (Arnab Chakraborty) Date: Sun, 25 Apr 2010 13:20:13 +0530 Subject: [Avispa-users] Protocol Simulation - OSPA Message-ID: Is there any way of knowing if the protocol specified is running in the way it should. I used to do it with the Protocol Simulation feature in SPAN, but for some reason this time it is giving an error message : "Fatal Error : out of memory" Can anyone help me out, I have a feeling that the last transitions of the protocol are not working. Is there a way to figure it out? Here is the code: role user(A, S : agent, Skey : symmetric_key, SND_SA, RCV_SA : channel(dy) ) played_by A def= local State, N : nat, HashPasswd, NthResponse, Challenge, Msg1, Msg2, Msg3, Msg4, R : message, Apasswd, Nonce : text init State := 0 /\ N := 1 transition 0. State= 0 /\ RCV_SA(start) =|> State' := 2 /\ Apasswd' := new() /\ HashPasswd' := crypt(crypt(xor(Apasswd', N))) /\ SND_SA( A.HashPasswd' ) /\ secret(Apasswd', passwd, {A, S}) 2. State = 2 /\ RCV_SA( S. ok) =|> State' := 4 /\ SND_SA(A.S.login_request) 4. State = 4 /\ RCV_SA(S.A.N.Challenge') =|> State' := 6 /\ NthResponse' := crypt( crypt( xor( Apasswd,N ) ) ) /\ R' := xor( Challenge', NthResponse') /\ Msg1' := xor(crypt(NthResponse'),xor(crypt(R'),crypt(xor(NthResponse',inr(N))))) /\ Msg2' := xor(crypt(xor(Apasswd,N)),crypt(crypt(R'))) /\ Msg3' := xor(crypt(xor(NthResponse',crypt(R'))),crypt(crypt(xor(Apasswd,inr(N))))) /\ Msg4' := xor(crypt(crypt(crypt(xor(Apasswd,inr(N))))),crypt(crypt(crypt(R')))) /\ SND_SA(Msg1'.Msg2'.Msg3'.Msg4') 6. State = 6 /\ RCV_SA(S.A.Nonce') =|> State' := 8 /\ request( S, A, auth, Nonce') end role role server( S : agent, SKey : symmetric_key, SND_AS, RCV_AS : channel(dy) ) played_by S def= local X : agent, State, N : nat, NthResponse, Challenge, HPasswd, HashPasswd, HR, NthCredential, H2PN1, H3PN1 : message, Msg1, Msg2, Msg3, Msg4, R : message, Nonce : text init State := 1 /\ N := 1 transition 1. State = 1 /\ RCV_AS( X'.HashPasswd') =|> State' := 3 /\ HPasswd' := xor( HashPasswd', crypt( SKey, X' )) /\ SND_AS(S. ok) 3. State = 3 /\ RCV_AS( X.S.login_request) =|> State' := 5 /\ NthResponse' := HashPasswd /\ R' := new() /\ Challenge' := xor(NthResponse', R') /\ SND_AS(S.X.N.Challenge') 5. State = 5 /\ RCV_AS( Msg1'.Msg2'.Msg3'.Msg4' ) =|> State' := 7 /\ HR' := xor( crypt( xor( NthResponse, inr(N) ) ), xor( Msg1', crypt( NthResponse ) ) ) /\ NthCredential' := crypt( xor( Msg2', crypt( HR' ) ) ) 7. State = 7 /\ NthResponse = NthCredential --|> State' := 8 /\ H2PN1' := xor( Msg3, crypt( xor( NthResponse, HR ) ) ) /\ H3PN1' := xor( Msg4, crypt( crypt( HR ) ) ) 8. State = 8 /\ H3PN1 = crypt( H2PN1 ) --|> State' := 9 /\ Nonce' := new() /\ SND_AS(S.X.Nonce') /\ witness( S, X, auth, Nonce') end role role session( A, S : agent, SKey : symmetric_key ) def= local SND_AS, RCV_AS, SND_SA, RCV_SA : channel(dy) composition user(A, S, SKey, SND_SA, RCV_SA) /\ server(S, SKey, SND_AS, RCV_AS) end role role environment() def= const a,b,s : agent, crypt : hash_func, inr : hash_func, login_request, ok : text, %%xor : xor, passwd, auth : protocol_id, skey : symmetric_key intruder_knowledge = { a, b, s, crypt, login_request } composition session(a, s, skey) /\ session(i, s, skey) end role goal secrecy_of passwd authentication_on auth end goal environment() Regards, Aki -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thomas.Genet at irisa.fr Mon Apr 26 09:42:06 2010 From: Thomas.Genet at irisa.fr (Thomas Genet) Date: Mon, 26 Apr 2010 15:42:06 +0200 Subject: [Avispa-users] Protocol Simulation - OSPA In-Reply-To: References: Message-ID: <4BD5982E.50606@irisa.fr> Dear Aki, Le 25/04/10 09:50, Arnab Chakraborty a ?crit : > Is there any way of knowing if the protocol specified is running in the > way it should. I used to do it with the Protocol Simulation feature in > SPAN, but for some reason this time it is giving an error message : > "Fatal Error : out of memory" > Can anyone help me out, I have a feeling that the last transitions of > the protocol are not working. Is there a way to figure it out? the problem comes from: Silent transitions... here is an excerpt of the README: - Silent transitions --|> are not well supported by SPAN. The reason is that using such "spontaneous transitions" it is possible to have a HLPSL text of the form: State=1 --|> State':=2 where no message is received or sent... this is difficult to display/trigger in our interface where animation is guided by the messages you choose to send... We did not mention that before, sorry. > > Here is the code: > > role user(A, S : agent, > Skey : symmetric_key, > SND_SA, RCV_SA : channel(dy) > ) > played_by A > def= > local > State, N : nat, > HashPasswd, NthResponse, Challenge, Msg1, Msg2, Msg3, Msg4, R : message, > Apasswd, Nonce : text > > init > State := 0 /\ N := 1 > > transition > 0. State= 0 /\ RCV_SA(start) =|> > State' := 2 /\ Apasswd' := new() /\ HashPasswd' := > crypt(crypt(xor(Apasswd', N))) /\ SND_SA( A.HashPasswd' ) > /\ secret(Apasswd', passwd, {A, S}) > > 2. State = 2 /\ RCV_SA( S. ok) =|> > State' := 4 /\ SND_SA(A.S.login_request) > 4. State = 4 /\ RCV_SA(S.A.N.Challenge') =|> > State' := 6 /\ NthResponse' := crypt( crypt( xor( Apasswd,N ) ) ) > /\ R' := xor( Challenge', NthResponse') > /\ Msg1' := > xor(crypt(NthResponse'),xor(crypt(R'),crypt(xor(NthResponse',inr(N))))) > /\ Msg2' := xor(crypt(xor(Apasswd,N)),crypt(crypt(R'))) > /\ Msg3' := > xor(crypt(xor(NthResponse',crypt(R'))),crypt(crypt(xor(Apasswd,inr(N))))) > /\ Msg4' := > xor(crypt(crypt(crypt(xor(Apasswd,inr(N))))),crypt(crypt(crypt(R')))) > /\ SND_SA(Msg1'.Msg2'.Msg3'.Msg4') > 6. State = 6 /\ RCV_SA(S.A.Nonce') =|> > State' := 8 /\ request( S, A, auth, Nonce') > end role > > role server( > S : agent, > SKey : symmetric_key, > SND_AS, RCV_AS : channel(dy) > ) > played_by S > def= > local > X : agent, > State, N : nat, > NthResponse, Challenge, HPasswd, HashPasswd, HR, NthCredential, H2PN1, > H3PN1 : message, > Msg1, Msg2, Msg3, Msg4, R : message, > Nonce : text > > init > State := 1 /\ N := 1 > > transition > 1. State = 1 /\ RCV_AS( X'.HashPasswd') =|> > State' := 3 /\ HPasswd' := xor( HashPasswd', crypt( SKey, X' )) /\ > SND_AS(S. ok) > 3. State = 3 /\ RCV_AS( X.S.login_request) =|> > State' := 5 /\ NthResponse' := HashPasswd > /\ R' := new() /\ Challenge' := xor(NthResponse', R') /\ > SND_AS(S.X.N.Challenge') > 5. State = 5 /\ RCV_AS( Msg1'.Msg2'.Msg3'.Msg4' ) =|> > State' := 7 /\ HR' := xor( crypt( xor( NthResponse, inr(N) ) ), xor( > Msg1', crypt( NthResponse ) ) ) > /\ NthCredential' := crypt( xor( Msg2', crypt( HR' ) ) ) > 7. State = 7 /\ NthResponse = NthCredential --|> > State' := 8 /\ H2PN1' := xor( Msg3, crypt( xor( NthResponse, HR ) ) ) > /\ H3PN1' := xor( Msg4, crypt( crypt( HR ) ) ) > > 8. State = 8 /\ H3PN1 = crypt( H2PN1 ) --|> > State' := 9 /\ Nonce' := new() /\ SND_AS(S.X.Nonce') /\ witness( S, X, > auth, Nonce') > end role > > role session( > A, S : agent, > SKey : symmetric_key > ) > > def= > local > SND_AS, RCV_AS, SND_SA, RCV_SA : channel(dy) > > > composition > user(A, S, SKey, SND_SA, RCV_SA) > /\ server(S, SKey, SND_AS, RCV_AS) > > end role > > role environment() > def= > > const > a,b,s : agent, > crypt : hash_func, > inr : hash_func, > login_request, ok : text, > %%xor : xor, > passwd, auth : protocol_id, > skey : symmetric_key > > intruder_knowledge = { a, b, s, crypt, login_request } > > > composition > session(a, s, skey) > /\ session(i, s, skey) > > end role > > goal > secrecy_of passwd > authentication_on auth > end goal > > environment() > > > Regards, > Aki > > > > _______________________________________________ > Avispa-users mailing list > Avispa-users at avispa-project.org > http://mail63.csoft.net/mailman/listinfo/avispa-users -- Thomas Genet IFSIC/IRISA Campus de Beaulieu, 35042 Rennes cedex, France T?l: +33 (0) 2 99 84 73 44 E-mail: genet at irisa.fr http://www.irisa.fr/celtique/genet From arnab.smtp at gmail.com Mon Apr 26 11:15:35 2010 From: arnab.smtp at gmail.com (Arnab Chakraborty) Date: Mon, 26 Apr 2010 20:45:35 +0530 Subject: [Avispa-users] Thank you Message-ID: Thank you, Tigran and Thomas for your help. I'll get back to you with further queries once I have figured out what's wrong with my code :) Cheers, Aki -------------- next part -------------- An HTML attachment was scrubbed... URL: From arnab.smtp at gmail.com Fri Apr 30 12:46:35 2010 From: arnab.smtp at gmail.com (Arnab Chakraborty) Date: Fri, 30 Apr 2010 22:16:35 +0530 Subject: [Avispa-users] Multiline Comments Message-ID: Is there a way to write multiline comments in HLPSL? Regards, Aki -------------- next part -------------- An HTML attachment was scrubbed... URL: