Hi, I am trying to implement a simple knowledge derivation program in clojure.core.logic, and I am not sure how to approach it. To be more specific, after I am done, it will be used as a toy cryptographic protocol verifier, that tries to infer what knowledge can attacker get based on some initial knowledge and some rules.
For example, I might denote [:pk A] a knowledge of public key of somebody and [:pcrypted [:pk A] :nonce] an encrypted nonce sent to this person. Then I'd like be able to somehow specify, that if I know [:pk A], I know as well [:pcrypted [:pk A] [:nonce A]] and therefore my program would derive from initial knowledge [ [:pk :a] [:pk :b] ] the full knowledge [[:pk :a] [:pk :b] [:pcrypted [:pk :a] [:nonce :a]] [:pcrypted [:pk :b] [:nonce :b]]] Or in slightly more difficult case to specify that if I know a secret key [:sk A] and encrypted nonce [:pcrypted [:pk A] [:nonce A]], I also know the [:nonce a]. Anybody has any hints? So far I managed to implement some of this, but it is a tangled mess of recursive pattern matching, membero, nonmembero and macros :-/ Thanks for any pointers, Adam -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.