Dear Stefano,
Compare your own code to the one in the Tamarin repository which models Needham-Schroeder:
https://github.com/tamarin-prover/tamarin-prover/blob/develop/examples/classic/NSPK3.spthy
The version with Lowe's fix is also available:
https://github.com/tamarin-prover/tamarin-prover/blob/develop/examples/classic/NSLPK3.spthy
Particularly, note the use of a 'sources' lemma that is necessary to solve partial deconstructions (in both NS, and NSL). I guess your model has a similar issue and has "partial deconstructions" left:
https://tamarin-prover.github.io/manual/book/008_precomputation.html#sec:openchains
and in general this section of the manual could help you:
https://tamarin-prover.github.io/manual/book/008_precomputation.html
Best regards,
Ralf
--Le informazioni contenute nella presente comunicazione sono di natura privata e come tali sono da considerarsi riservate ed indirizzate esclusivamente ai destinatari indicati e per le finalità strettamente legate al relativo contenuto. Se avete ricevuto questo messaggio per errore, vi preghiamo di eliminarlo e di inviare una comunicazione all’indirizzo e-mail del mittente.--The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you received this in error, please contact the sender and delete the material.--
You received this message because you are subscribed to the Google Groups "tamarin-prover" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tamarin-prove...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tamarin-prover/b51dbd6a-0b5c-4189-9b51-32f90238291bn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tamarin-prover/fbf4b0b6-4f25-f44c-a225-9a158053c512%40inf.ethz.ch.
Dear Stefano,
Non-termination is always a possibility due to the
undecidability. It can hinge on small modeling choices even, thus
sometimes manual checking of the proof attempt can help you
understand where it goes wrong. The auto-prover uses a heuristic,
and it may find a loop by accident that it keeps repeating. There
are ways around that using so-called oracles, see the manual.
I then also spent some time looking at your theory to give you more concrete feedback. Find attached a zip file with 3 spthy files, one marked .._orig which is your original file with inline comments where you made a mistake in the last rule, which leads to some of the issues. This is changed in the theory file named as you sent it. Using that file, I was able to manually find the standard Lowe attack, see the _stored_attack file. The auto-prover did not immediately find the attack though either! Keep in mind that the underlying problem is undecidable, so non-termination is not unexpected for different modeling choices.
The way you write the rules is interesting, however you may want to look at the way Tamarin understands them, which may or may not be what you intended. For this, you can click on "Multiset Rewriting Rules" in the left pane of the GUI tab. The listed rules do include some adversary rules you can safely ignore, but show the rest of the rules as Tamarin understood what you wrote. This is particularly visible for the last rule, in the version you sent vs the one I modified.
Also, you are making a (fairly strong) modeling assumption that
the recipient of a value can detect whether it's fresh or not.
That is, you match against aenc(<~nonceA,$A>)pk(~privkeyB)
which implies that B can check that the value from A really is a
nonce. You may want to not do that, and then the proof would
become a bit harder again.
Best regards,
Ralf
To view this discussion on the web visit https://groups.google.com/d/msgid/tamarin-prover/f94dc2f7-c6ea-48ce-9775-b7e0bbcd88b7n%40googlegroups.com.
Dear Stefano,
Happy to hear that you managed to improve the model and got it
running! Happy Proving! :-)
That A&B translator probably still works, but there is no one actively maintaining it. Also, it really only works for limited protocols (2 party) and primitives (some built-ins). However, for that subset, it should work fine.
Best regards,
Ralf
To view this discussion on the web visit https://groups.google.com/d/msgid/tamarin-prover/395c5893-6096-48d7-9479-9ede389ab162n%40googlegroups.com.
Dear Marco,
Please take a look at the NSPK version provided by the Tamarin distribution.
https://github.com/tamarin-prover/tamarin-prover/tree/develop/examples/classic
You can find both the broken NSPK3 and fixed NSLPK3 there.
For your particular files:
- the copycat version cannot work, because it uses a state fact on the left of a rule that does not ever get created:
1. in rule "Step_1_A_Sends_To_B": factName `A_State_1'
- for the other file, at least the rule "Step4_B_receives_last_msg_and_checks" is wrong because of the let binding you give: it forces the received "message_2_A_recv" to be an encryption of a pair, while the second line of the let binding applies fst to it twice, which would really need a triple to make sense.
Thus, I am not surprised that neither of the examples will work.
Best regards,
Ralf
To view this discussion on the web visit https://groups.google.com/d/msgid/tamarin-prover/14819d05-7fe6-4fb2-b292-75be38c006dan%40googlegroups.com.
Hello group.
An update: I was able to recreate Stefano's code.
However I am not sure about one thing:
At the and of the day, without considering smaller distraction mistakes, my problem was that I was not recording the state of the system with 4 different facts, but I was trying to use the rewriting rules to keep track of the system.
Meaning that in Stefano's code we'll have the following facts: Facts{ ... , Step1(...) , Step2(...) , Step3(...) , Step4(...), ...}
What I was trying to to was to have two different facts that will keep track of the parties states: State_A(...) and State_B(...). Given the fact that tamarin is based of a multiset of rewriting rules, my idea was to update state-by-state those two facts accordingly to what is the acquired knowledge of the parties.
You can find my file attached to this email, so that you can have a better understanding of what is going on.
Although in my head sounds right, Tamarin would not validate the "executibality" lemma.
If you know where I am wrong it would be awesome to hear some hints. As a non CS guy I find myself probably stuck in trivial things that looks tremendous without former knowledge.
Thanks a lot for your time and help.
Cheers,
Marco
To view this discussion on the web visit https://groups.google.com/d/msgid/tamarin-prover/65d9cb50-9414-4de7-b0ae-089edade6499n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tamarin-prover/0e6d974a-2f22-4201-ab1e-5f44eda77a96n%40googlegroups.com.