This issue seems highly related to
https://github.com/tamarin-prover/tamarin-prover/issues/362
and particularly the linked short example
https://gist.github.com/maurozenoni/e52f36faf7e4c0495ca15b2a2600a5d0
where even though a value is created freshly in the rule, Tamarin does not automatically rule out the equality with inputs received.
In your example here that basic problem of not understanding that
input and local fresh are different, is obfuscated behind an XOR
operator, but as above seems to have a more fundamental source. If
you want to add your example to that issue, it would give us more
information for later.
Unfortunately, at this time, I do not see an easy workaround.
Making such a change inside Tamarin has to be done carefully, as a
mistake would impact soundness immediately.
Cheers,
Ralf
--
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/da93265f-a59d-42fa-880c-f562fabadf48%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to tamarin...@googlegroups.com.
The short answer to what is different is "extractability". From a DH exponent the element can never be extracted directly. From the XOR it can be extracted, by XORing whatever else is in the term, i.e., BAD XOR otherstuff XOR otherstuff simplifies to BAD which may now be known to the attacker. That's *probably* the reason why the resulting behavior is different regarding partial deconstructions in XOR.
Cheers,
Ralf
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/966c322e-2e7e-4b5d-9de7-9f7cccd40310%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tamarin-prover/966c322e-2e7e-4b5d-9de7-9f7cccd40310%40googlegroups.com.
Dear Guillaume,
Yes, changing variants is a possibility and it is nice to see that this helps with some of the partial deconstructions. Note though that you are modifying the possible search space, which means you could possibly lose attacks with this. So, i would be very careful when removing variants.
Your (false but helpful) sources lemma by the way would force that all input accepted in rule r2 is something that was previously output by rule r1. So, the input to r2 is thus both a fresh value, and only from that rule r1.
If you are happy only to accept fresh values you could replace the r2 rule with:
rule r2:
[Fr(~b), In(~a)]
--[R1_IN(~a)]->
[Out(~a XOR ~b)]
where I have added a ~ to the a, to get ~a. But note that this implies that the receiver here can check if something is a fresh value, and that any x XOR y would not be accepted as the value of ~a. Which is probably what you must allow, as otherwise you again lose attacks possibly.
In summary, I am very worried about soundness, and one would have
to look at the resulting theory and try to prove it represents
what is appropriate. Also, I doubt that a sources lemma will be
enough to do the trick here.
For the question about comparison to issue #362 it seems possible that there is a connection. Indeed a fresh ~x (that we know is fresh in the rule) certainly cannot cancel with anything that is in an incoming In(y). This seems a bigger underlying issue that would benefit from optimization in Tamarin in general as that issue points out. However, I don't see how to generalize this and put it in the implementation easily.
Best regards,
Ralf
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/71974386-e1b7-4015-bc8c-30efe04be808n%40googlegroups.com.