A compositional logic for proving security properties of protocols

合集下载

logic的英文作文

logic的英文作文

logic的英文作文英文:When it comes to logic, I believe it is an essentialskill to have in life. Logic is the ability to thinkcritically and make sound decisions based on reasoning and evidence. It helps us to analyze situations, solve problems, and make informed choices.For example, in my job as a software engineer, logic is crucial to my success. When I am faced with a coding problem, I need to use logical reasoning to break down the problem into smaller parts and find a solution. Without logic, I would not be able to write efficient and effective code.In everyday life, logic is also important. For instance, when I am shopping, I use logic to compare prices and determine the best value for my money. I also use logic to evaluate information I read online and make decisions basedon credible sources.Overall, logic is a vital skill that can be applied in many areas of life. It helps us to make better decisions and solve problems more effectively.中文:对于逻辑,我认为它是生活中必须具备的一项技能。

The Poetry of Science Fusing Art and Logic

The Poetry of Science Fusing Art and Logic

The Poetry of Science Fusing Art andLogicThe poetry of science is a beautiful fusion of art and logic, combining the creativity and passion of poetry with the precision and reasoning of science. It is a harmonious blend of two seemingly opposite disciplines, creating a unique and captivating form of expression that has the power to inspire, educate, and evoke emotion. At its core, the poetry of science is about finding beauty and meaning in the natural world. It is about using language and imagery to convey the wonders of the universe, from the smallest particles to the vastness of space. Through poetry, scientists and science enthusiasts can communicate complex ideas in a way that is accessible and engaging to a wide audience. It allows them to share their enthusiasm for the natural world and inspire others to see the world through a scientific lens. One of the most compelling aspects of the poetry of science is its ability to evoke emotion and wonder. By using language that is rich in imagery and metaphor, poets can capture the imagination of their audience and convey the awe and fascination that comes with scientific discovery. Whether it is describing the delicate beauty of a snowflake or the violent energy of a volcanic eruption, the poetry of science has the power to transport readers to new worlds and ignite their curiosity about the natural world. Furthermore, the poetry of science serves as a bridge between the arts and the sciences, demonstrating that these seemingly disparate fields are not mutually exclusive. In fact, they can complement and enrich each other in profound ways. Through the poetry of science, artists and scientists can collaborate and learn from each other, gaining new perspectives and insights that can lead to innovative breakthroughs and discoveries. Moreover, the poetry of science can also be a powerful tool for science education and communication. By presenting scientific concepts in a poetic and engaging manner, educators can make complex ideas more accessible andrelatable to students. This can help cultivate a love and appreciation for science from a young age, inspiring the next generation of scientists, researchers, and innovators. In conclusion, the poetry of science is a captivating and powerful fusion of art and logic that has the potential to inspire, educate, and evokewonder. Through its use of language, imagery, and emotion, it offers a unique perspective on the natural world and serves as a bridge between the arts and the sciences. By embracing the poetry of science, we can enrich our understanding of the world and inspire a new generation of thinkers and creators.。

散文作文模板英语高考

散文作文模板英语高考

散文作文模板英语高考When it comes to writing a prose composition in English for the college entrance examination also known as the Gaokao there are several key elements to consider to ensure your essay is wellstructured engaging and effective. Here is a template that you can follow to craft a compelling prose essayTitle Your chosen title that captures the essence of your essayIntroductionHook Begin with a captivating opening line or a question that grabs the readers attention. Background Provide a brief context or background information relevant to your topic.Thesis Statement Clearly state the main idea or argument of your essay.Body ParagraphsEach paragraph should focus on a single main idea that supports your thesis.Topic Sentence Start each paragraph with a clear topic sentence that introduces the main point.Evidence and Examples Provide specific examples facts or anecdotes that illustrate your point.Analysis Analyze the evidence explaining how it supports your argument.Transition Use transitional phrases to connect your ideas and guide the reader through your essay.Development TechniquesUse descriptive language to paint a vivid picture for the reader.Employ rhetorical devices such as metaphors similes and analogies to enrich your writing.Vary your sentence structure to maintain the readers interest.ConclusionRestate your thesis in a new way summarizing the main points without merely repeating what youve already said.Reflect on the significance of your argument or the implications of your ideas.End with a strong closing statement that leaves a lasting impression on the reader. Word Choice and GrammarUse a wide range of vocabulary to demonstrate your language proficiency.Ensure correct grammar punctuation and spelling to maintain clarity and professionalism. Revision and EditingAfter writing your first draft take the time to revise and edit your work.Check for coherence consistency and flow between paragraphs.Look for areas where you can improve clarity or strengthen your argument.Sample OutlineTitle The Power of PerseveranceIntroductionHook In the face of adversity what separates the triumphant from the defeatedBackground Briefly discuss the importance of perseverance in achieving goals.Thesis Statement Perseverance is the key to overcoming obstacles and achieving success. Body Paragraph 1Topic Sentence Perseverance allows individuals to learn from their failures.Evidence Examples of famous individuals who failed before succeeding.Analysis How these failures contributed to their eventual success.Body Paragraph 2Topic Sentence Perseverance fosters resilience in the face of challenges.Evidence Stories of people who overcame significant hardships.Analysis The role of perseverance in building resilience.Body Paragraph 3Topic Sentence Perseverance is essential for personal growth and development.Evidence Personal anecdotes or observations.Analysis The impact of perseverance on selfimprovement.ConclusionRestate Thesis Perseverance is not just a trait but a journey that leads to success.Reflection The longterm benefits of developing a persevering mindset.Closing Statement Let perseverance be the compass that guides you through lifes storms. Remember this is just a template. The key to a successful prose composition is to infuse your own voice and creativity into the structure making it uniquely yours.。

英语满分作文高中

英语满分作文高中

When it comes to crafting a perfect English composition for high school students, there are several key elements that should be considered to ensure a highscoring essay. Here are some tips and strategies to help you achieve a full score in your English composition:1.Understand the Prompt:Before you start writing,make sure you fully understand the question or prompt.If the prompt is ambiguous,spend some time clarifying it in your mind.2.Plan Your Composition:Outline your main ideas before you begin writing.This will help you organize your thoughts and ensure a logical flow of information.3.Introduce Your Topic:Start your essay with a strong introduction that grabs the readers attention and clearly states the purpose of your composition.4.Develop Your Arguments:Use the body paragraphs to develop your arguments or points.Each paragraph should focus on one main idea and support it with evidence, examples,or explanations.e a Variety of Sentence Structures:To make your writing more engaging,use a mix of simple,compound,and complex sentences.This will also demonstrate your command of the English language.6.Vary Your Vocabulary:Use a wide range of vocabulary to express your ideas.Avoid repetition and try to use synonyms where appropriate.7.Stay Focused:Keep your composition focused on the topic.Avoid going off on tangents or including irrelevant information.8.Edit and Proofread:After you finish writing,take the time to edit and proofread your work.Check for grammatical errors,spelling mistakes,and unclear sentences.e Transition Words:To make your essay more cohesive,use transition words and phrases to connect your ideas smoothly.10.Conclude Effectively:End your composition with a strong conclusion that summarizes your main points and leaves a lasting impression on the reader.11.Practice Regularly:The key to writing a perfect essay is practice.Write regularly to improve your skills and gain confidence in your writing abilities.12.Get Feedback:Share your compositions with teachers,peers,or online platforms to get feedback and improve your writing.13.Understand Cultural Nuances:Be aware of cultural references and idioms that may not be universally e them appropriately to enhance your essay.e Descriptive Language:Engage the reader with vivid descriptions and sensory details.15.Show Your Personality:While maintaining a formal tone,dont be afraid to let your personality shine through in your writing.By following these guidelines,you can increase your chances of writing a highscoring English composition that will impress your teachers and examiners.Remember,practice makes perfect,so keep honing your skills and seeking constructive feedback.。

logic的英文作文

logic的英文作文

logic的英文作文1. Logic is the basis of reasoning and decision-making. It is the process of using rational thinking to arrive at a conclusion or solution. Without logic, our thoughts and actions would be irrational and chaotic. Logic helps us to analyze and evaluate information, and make informed decisions based on evidence and facts.2. Logic is used in many areas of our lives, from everyday activities to complex problem-solving. For example, we use logic when we plan our daily routines, when we make financial decisions, and when we solve puzzles or play games. In more complex situations, such as in scientific research or legal proceedings, logic is used to analyzedata and evidence to arrive at a conclusion.3. Logical thinking involves breaking down complex problems into smaller, more manageable parts. This allowsus to analyze each part individually and then put them back together to form a solution. Logical thinking also involvesidentifying patterns and relationships between different pieces of information, and using these relationships todraw conclusions.4. One of the key benefits of logical thinking is thatit allows us to avoid making decisions based on emotions or biases. Instead, we rely on evidence and facts to make informed decisions. This helps us to avoid making impulsive or irrational decisions that may have negative consequences.5. In conclusion, logic is an essential tool forrational thinking and decision-making. It helps us to analyze and evaluate information, identify patterns and relationships, and make informed decisions based onevidence and facts. By using logical thinking, we can avoid making decisions based on emotions or biases, and makebetter choices that lead to positive outcomes.。

大方献良策的英语作文

大方献良策的英语作文

In the realm of English composition,writing an essay that generously offers valuable advice requires a thoughtful approach and a clear structure.Heres a detailed guide on how to craft such an essay:1.Introduction:Begin with a captivating opening that introduces the topic and sets the tone for the advice you will provide.You may want to use a quote,a rhetorical question, or a short anecdote to engage the reader.2.Statement of Purpose:Clearly state the purpose of your essay.This is where you outline the main advice or suggestions you will be offering.3.Body Paragraphs:Develop your body paragraphs around the main points of advice. Each paragraph should focus on a single piece of advice,starting with a topic sentence followed by explanations,examples,or evidence to support your point.Paragraph1:Offer the first piece of advice.Explain why it is important and how it can be beneficial.Provide a reallife example or a hypothetical scenario to illustrate your point.Paragraph2:Present the second piece of advice.Discuss its relevance and e statistics,research findings,or expert opinions to back up your suggestion.Paragraph3:Continue with additional advice.Ensure that each piece of advice is distinct and contributes to the overall message of your essay.4.Counterarguments:If applicable,address potential counterarguments or concerns that readers might have regarding your advice.This shows that you have considered different perspectives and strengthens your argument.5.Conclusion:Summarize the main points of your essay and reiterate the importance of your advice.End with a strong closing statement that leaves a lasting impression on the reader.6.Style and Tone:Use a formal and respectful tone throughout your essay.Be concise and clear in your language to ensure your advice is easily understood.7.Proofreading:Before submitting your essay,proofread it for grammatical errors,clarity, and coherence.Make sure your advice is presented logically and flows well from one point to the next.8.Citations:If you have used any sources to support your advice,ensure you cite themproperly to avoid plagiarism and to give credit to the original authors.Heres a brief example to illustrate the structure:Title:The Art of Effective Time ManagementIntroduction:In todays fastpaced world,time is a precious commodity.This essay aims to provide practical advice on mastering the art of time management.Statement of Purpose:The following advice will guide readers through the process of organizing their schedules, prioritizing tasks,and avoiding common timewasting pitfalls.Body Paragraphs:Firstly,setting clear goals is crucial for effective time management.By knowing what you aim to achieve,you can allocate time wisely.Secondly,prioritizing tasks based on importance and urgency can significantly improve productivity.The Eisenhower Matrix is a useful tool for this purpose.Lastly,taking regular breaks can actually enhance focus and efficiency.The Pomodoro Technique is one method that incorporates short breaks into a work routine.Counterarguments:While some may argue that strict time management can lead to stress,the advice provided encourages a balanced approach that includes rest and flexibility.Conclusion:In conclusion,by implementing the advice offered in this essay,individuals can take control of their time,leading to increased productivity and a more balanced life.Remember,the key to a successful advice essay is to provide actionable,relevant,and practical tips that readers can apply to their own lives.。

An Epistemic Logic of Situations (Extended Abstract)

An Epistemic Logic of Situations (Extended Abstract)

1
Common Knowledge
C o m m o n knowledge has been given a number of logical characterizations. (Cf. [Bar89] and [HMP0].) We have no space to review even the basics of all of t ut t h e shared-situation account since capturing this is one of the important features of our logic. 1 On this account, A and B have c o m m o n knowledge t h a t qo just in case there is a situation s such that:
2.1
Logical Omniscience
All normal systems of modal logic contain a rule of the form 3 From ~- ~ infer F p p . If the operator 'D' is understood as alethic (i.e., pertaining to necessity), this rule is usually called necessitation. If the operator is understood as epistemic (i.e., pertaining to knowledge), as in our case, it is usually caned epistemic generalization. Unfortunately, in the epistemic context this leads to the so called logical omniscience problem, viz: each agent knows all logical truths. One feature of our logic that addresses this issue is our limitation on familiarity with individuals. Like many modal logics ours has a possible world semantics where what is known in a situation w is affected by what other situations are accessible to an agent. Our representation of familiarity will fit naturally into this context. Here is an example. If a world w ~is accessible from world w for Addie, then at world w, she cannot tell them apart. From the perspective of world w, Addie finds both w and w ~ equally possible ways things might be. Now, suppose some individual, Bob, is present at one of these worlds but not at the other. (What 'present' means will be made precise once the model theory is spelled out below.) Then Addie cannot tell the difference between a world where Bob is present and one where he is not. So, she must not really be aware of Bob, know Bob, if she can't tell whether he's there or not. We have elsewhere described logics that were devoted specifically to this issue ([Syv90] and [Syv93], Chap. 4). Here it is just one type of cognitive limitation. Various attempts have been made to solve logical omniscience and related problems by restricting the logic in one way or another. (Cf. e.g., [Ebe74], [FH88], [Lev85], [Lev90].) Other research has been done on analyzing the complexity issues in reasoning about knowledge and belief. (Cf. e.g., [GMR85], [HV86], [Var89], [HM92].) While perhaps a useful simplifying abstraction in some contexts, epistemic generalization is too strong a rule for a realistic representation of actual knowledge; positing the ideal rationality implicit in such a rule is patently unrealistic. Not only does knowledge of logical truths vary from individual to individual but also from situation to situation for the same individual. Therefore, it seems far more reasonable to simply abandon such an idealization 3For an explication of 'normal' cf. [Che80], pp. l13-ff.

论证英语作文

论证英语作文

论证英语作文Title: The Art of Persuasion in English Composition。

Writing a persuasive English essay requires a delicate balance of logic, emotion, and credibility to effectively sway the reader's opinion. Through a strategic arrangement of arguments, evidence, and language, one can craft a compelling piece that captivates the audience and leaves a lasting impression. In this discourse, we will delve into the intricacies of persuasive writing in English composition, exploring various techniques and strategies to construct a convincing argument.To begin with, a successful persuasive essay starts with a clear and concise thesis statement that encapsulates the main argument. This statement serves as the focal point around which all subsequent arguments revolve, providing a roadmap for the reader to follow. It should be assertive, specific, and debatable, prompting the reader to consider alternative viewpoints.Next, it is essential to support the thesis with credible evidence and logical reasoning. This evidence can take the form of statistics, expert opinions, anecdotes, or empirical data, depending on the nature of the argument. By presenting factual information in a coherent and organized manner, the writer enhances the persuasiveness of their essay and reinforces their credibility as a knowledgeable authority on the subject.Moreover, effective persuasion often appeals to the emotions of the audience, stirring empathy, compassion, or indignation to elicit a desired response. Through vivid imagery, descriptive language, and poignant anecdotes, the writer can evoke powerful emotions that resonate with the reader on a personal level. By forging a connection between the argument and the reader's own experiences or values, the writer can compel them to adopt a particular viewpoint or course of action.In addition to appealing to emotions, persuasivewriting in English composition also relies on rhetoricaldevices to enhance its impact. Techniques such as parallelism, repetition, analogy, and rhetorical questions can add depth and sophistication to the argument, engaging the reader's intellect and imagination. By artfully employing these devices, the writer can imbue their essay with rhythm, coherence, and persuasiveness, leaving alasting impression on the reader's mind.Furthermore, an effective persuasive essay anticipates and addresses counterarguments, preempting potential objections and refuting opposing viewpoints. By acknowledging the complexity of the issue and demonstrating a nuanced understanding of differing perspectives, thewriter builds credibility and trust with the reader. This demonstrates intellectual honesty and integrity, strengthening the overall persuasiveness of the essay.Finally, a compelling conclusion is essential to leavea lasting impression and reinforce the main argument. The conclusion should recapitulate the key points of the essay, reiterate the thesis statement, and leave the reader with a sense of closure and conviction. By ending on a strong note,the writer reinforces the persuasiveness of their argument and encourages the reader to take action or reconsidertheir stance on the issue.In conclusion, persuasive writing in Englishcomposition is a nuanced and multifaceted endeavor that requires careful consideration of argumentation, evidence, language, and structure. By mastering the art of persuasion, one can effectively advocate for their viewpoint, sway the opinions of others, and effect meaningful change in the world. Through a combination of logic, emotion, and credibility, the writer can craft a compelling narrativethat resonates with readers and leaves a lasting impact on their hearts and minds.。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

A compositional logic for proving securityproperties of protocolsNancy Durgin John Mitchell Dusko PavlovicComputer Science Dept.Kestrel InstituteStanford University Palo Alto,CA94304Stanford,CA94305-9045nad,jcm@ dusko@September3,2002AbstractWe present a logic for proving security properties of protocols that use nonces(randomly generated numbers that uniquely identify a protocol ses-sion)and public-key cryptography.The logic,designed around a processcalculus with actions for each possible protocol step,consists of axiomsabout protocol actions and inference rules that yield assertions about proto-cols composed of multiple steps.Although assertions are written using onlysteps of the protocol,the logic is sound in a stronger sense:each provable as-sertion about an action or sequence of actions holds in any run of the protocolthat contains the given actions and arbitrary additional actions by a maliciousattacker.This approach lets us prove security properties of protocols underattack while reasoning only about the sequence of actions taken by honestparties to the protocol.The main security-specific parts of the proof systemare rules for reasoning about the set of messages that could reveal secret dataand an invariant rule called the“honesty rule.”1IntroductionThere has been considerable research on formal analysis of security protocols, ranging from BAN logic and related approaches[3,8,25]tofinite-state analy-sis[23,19]and proof methods based on higher-order logic[21].Most approaches in current use are based on enumeration or reasoning about a set of protocol traces, each trace obtained by combining protocol actions with actions of a malicious in-truder.Automated trace-based tools can be used tofind protocol errors after a few weeks of human effort,but it remains significantly more time-consuming to prove protocols correct using logics that reason about traces.While it is difficult to give specific numbers,since efforts depend on the complexity of the protocol and the experience of those involved,it seems that most formal proofs require months of effort,even with assistance from powerful automated tools.We have therefore developed a formal logic capable of relatively abstract reasoning about protocol traces.In this logic,we are able to prove properties of common authentication and secrecy protocols by derivations of twenty to sixty lines of proof.The reason for this succinctness is that the proof rules of the logic state general properties of protocol traces that can be reused for many different protocols.The logic presented in this paper includes modal operators naming sequences of actions from a process calculus.This logic provides a method for attaching as-sertions to protocol actions,in a manner resembling dynamic logic for sequential imperative programs–applying Floyd-Hoare style annotations[7,9]so that the composition of the assertions associated with each action can provide the basis for a protocol correctness proof.The underlying logic is different from previous“be-lief”logics such as BAN and its descendants[3,8,25]and from explicit reasoning about protocol and intruder as in Paulson’s inductive method[21].The central idea is that assertions associated with an action will hold in any protocol execution that contains this action.This gives us the power to reason about all possible runs of a protocol,without explicitly reasoning about steps that might be carried out by an attacker.At the same time,the semantics of our logic is based on sets of traces of protocol execution(possibly including an attacker),not the kind of abstract ideal-ization found in some previous logics.Our logic usesfive predicates:,,,,and. Thefirst two make relatively simple statements about what has happened.For ex-ample,holds at some state in the execution of a protocol if principal has sent the message.The interpretation of is also very mechanical, and much more elementary than in logics of knowledge.Specifically,a principal “knows”a datum if the principal either generated this datum or received it in a mes-sage in a form that is not encrypted under a key that is not known to the principal. The last two predicates are more novel.The central predicate for reasoning about secrecy,and authentication based on secrecy,is.Intuitively,is used to identify the“source”of some datum,i.e.,the way that a principal might come to know the contents of some message.The predicate is used primarily to assume that one party follows the prescribed steps of the protocol correctly.For2example,if Alice initiates a transaction with Bob,and wishes to conclude that only Bob knows the data she sends,she must explicitly assume that Bob is honest.If Bob is not honest,meaning that Bob does not follow the protocol(or,equivalently, Bob’s key is known to the attacker),then any data Alice sends to Bob could be read by the attacker and the attacker could forge all of the messages Alice receives from Bob.Therefore,many correctness assertions involve an assumption that one or more principals are honest.Most of the axioms and inference rules of our logic are ways of attaching as-sertions to actions,and rules for combining these assertions when actions are com-bined in a role of a protocol.The main inference rule that is not of this form is a rule we refer to as the“honesty rule.”This is a form of invariance rule,used to reason about all possible actions of honest principals.Suppose that in some pro-tocol,whenever a principal receives a message of the form,meaning the encryption of a pair under key,the principal then responds with. Assume further that this is the only situation in which the protocol specifies that a message consisting of a single encrypted datum is ing the honesty rule,it is possible to prove that if a principal is honest,and sends a message of the form,then must have previously received a message of the form. For certain authentication protocols,this form of reasoning allows us to prove that if one protocol participant completes the prescribed sequence of actions,and an-other principal named in one of the messages is honest,then some secret is shared between the two principals.Section2describes the process calculus and Section3shows how we use the process calculus to express steps of a protocol.Section4describes the formulas and semantics of our logic.The proof system is presented in Section5.A sample proof is given in Section6,with discussion of related work appearing in Section7 and concluding remarks in Section8.The example derivation given in Section6shows how to prove a significant property of Lowe’s variant[12]of the Needham-Schroeder public key protocol [20].A brief discussion in that section also shows how an attempt to prove the same property for the original Needham-Schroeder protocol fails in an insightful way. Specifically,since the main axioms and inference rules of our logic are each tied to a specific action,the outline of any possible proof is determined by the steps of the protocol.Therefore,we can reduce the problem of proving a protocol property to the problem offinding instances of axioms and rules that match in specific ways. For the well-studied Needham-Schroeder protocol,under the model of attacker capabilities used in this paper,proof of an authentication property fails precisely because initiator Alice cannot correctly establish the identity of the responder from the data she receives.In effect,the protocol logic presented in this paper leads directly to rediscovery of Lowe’s observation[12].3The process calculus and logic presented in this paper support only public key encryption and cannot be used to reason about the source of an encrypted nonce if the principal who generated it sends more than one message containing the nonce.While we believe that the approach can be extended fairly easily to han-dle symmetric-key encryption and more general patterns of messages containing encrypted nonces,the more restricted form of logic used in this paper is simpler and easier to understand.We hope to explore extensions of the system in future work.2Communicating CordsCords are the formalism we use to represent protocols and their parts.They form an action calculus[14,15,22],based on-calculus[18],and related to spi-calculus [1].The cords formalism is also similar to the approach of the Chemical Ab-stract Machine formalism[2],in that the communication actions can be viewed as reactions between“molecules”.The basic idea of-calculus is to represent communication by term reduction,so that the communication links can be cre-ated dynamically[17].The idea of spi is to add to the suitable constructors for encryption and decryption,and analyze secure communication using process equivalence;some similar ideas also appear in[10].We treat the encryption in a manner similar to spi-calculus,but decryption is reduced to term reduction.The idea of cord calculus is not so much to capture security within the meta-theory of processes,but rather to serve as a simple“protocol programming language”,intu-itive enough to support our Floyd-Hoare style logical annotations,and verifications in an axiomatic semantics.The formalism is designed to support protocol compo-sition and synthesis,in addition to reasoning about protocol correctness.Although we do not explore protocol composition in this paper,the static interfaces and asso-ciated composition operators in2.4suggest certain forms of protocol composition that preserve logical reasoning about sequences of actions.In fact,cords arefirst of all based on the informal language of arrows and messages,widely used in the security community.For instance,an arrows-and-messages picture of Lowe’s variant[12]of the Needham-Schroeder public key protocol[20],which we will refer to as NSL,might look something like Figure1.Strand spaces[6]have been developed in an effort towards formalizing this language.The messages are captured in a term calculus,and decorated by and, respectively denoting the send and the receive actions.The roles are then presented as sequences of such actions,called strands.Viewed as a strand space,the above protocol run is shown in Figure2.The fact that an agent only sees his or her own actions,viz sending and re-4Figure1:NSL as Arrows and MessagesFigure3:NSL as a Cord Spaceparison with strands,we add variables to the term calculus.Of course,just like a parameter,a variable is just a placeholder for a family of values;but variables come with a formal binding and substitution mechanism.The action of receiving a value into a variable is expressed by the operator,which binds the occurrences of to the right of it.The action of sending a term is now written,rather than .When the term is closed,i.e.reducible to a value,the particles andcan react:they are eliminated,and is substituted for all occurrences of that were bound to.The value propagation resulting from the communication is modelled by the substitution.The cord space,corresponding to the above protocol is shown in Figure3.Here we introduce the notation which is a binding operation denoting the gener-ation of a new nonce,.generates and sends the term which now receives into the variable,and substitutes for it on the right.In particular,the pattern-matching operator.The matching suc-ceeds,and the values and get substituted for and.The termis thus instantiated to,which contains no variables any more,and can be sent.Now receives this term into the variable,and substitutes it into2.1Terms and actionsThe terms are built starting from the variables and the constants.Moreover, the set of basic terms also contains the names,which can be variables, or constants,and keys which can be variables and constants.Upon these basic sets,the term language is then generated by some given con-structors,which always include tupling,and the public key encryption,of the term by the key.The language of actions is then built upon the terms by further constructors. They include sending a term,receiving into a variable,matching a term against a pattern,and creating a new value.The extensions may allow other actions,such as reading time,or point-to-point communication.In summary,we have:(names)variable nameconstant name(basic keys)variable keyconstant keyname(keys)basic keydecryption patternPatterns act as terms with holes into which we substitute other terms.We write if the list contains all the variables in.If7is a pattern and is a term,then is the term obtained by substituting for in.Some examples of patterns are:Here,the patterns and are basic tuple patterns,each taking two arguments, with containing the constant.The patterns and are decryption patterns, again taking two arguments and containing the value as the key.We introduce decryption patterns in order to characterize asymmetric decryp-tion.The decryption keybinds to in the strand to the right,thus decrypting the message to reveal the plaintext.Strands,defined by the following grammar,are lists of actions.(strands)Strands include operations that are not efficiently computable.For example,the strandassociated with.There is no known way to compute,which we write andwhich receives two inputs and then sends a pair comprised of the two inputs.Since we choose not to assume that network communication preserves message order, this strand is equivalent toTo see that these are equivalent,imagine running each in parallel with a strand that outputs numbers2and3.Since the outputs2and3can be received in either order by thefirst strand,thefirst strand could output or,which is clearly the set of possible outputs of the second strand.In general,the strands and will be considered independent if no values can be passed between them.Formally,we capture this by defining an equivalence relation that includes the relation defined bywhere the operators and,giving the sets of the free and the bound variables (respectively),are inductively defined as follows:The set of the free variables occurring in a term is defined as usual:when-ever a variable is used in the formation of a term,it is added to.The actions“receive”,“match”(or“test”)and“new”thus bind the variable.The scope is always to the right,and name clashes are avoided by renaming bound variables.A value is propagated through a strand by substi-tuting it for everywhere within the scope of a binding operator.In this way,the condition indeed ensures that cannot depend on.The equivalence relation is the least relation containing the transitive,reflex-ive closure of,and closed under-conversion(renaming the bound variables). The strands and will thus be-equivalent if and only if one can be obtained from the other by renaming the bound variables,and permuting the actions within9the scopes of the bound variables,i.e.in such a way that no free variable becomesbound,or vice versa.Note that preserves the free variables of a strand.Using calligraphic for the set of all possible strands,we let cords be equiva-lence classes of strands,modulo the relation,To indicate a specific cord,we enclose the strand in brackets,which serves toindicate both the scope of binding and that the cord encompasses all equivalentstrands modulo.That isWe omit the relation in the rest of the paper.The equivalence relation allows renaming of bound variables and reorderingof non-conflicting actions.For example,identifies strands like and,with the independent actions permuted.In contrast,the actions and are not independent,because a value must be received into before it can be sent outin a message.Sending a pair preserves the order of terms and,whilesending the two values one at a time,,does not.2.3Cord spaces and runsA cord space is a multiset of cords that may interact via communication.We use for multiset union and for the empty multiset.In the terminology associated with the Chemical Abstract Machine[2],a cord space is a“soup”in which the particles(cords)may react.We use a cord space consisting of a set of protocol roles(each represented by a cord)to represent a state and set of remaining actions of a protocol.For instance,one possible run of the NSL protocol,with Alice initiating a conversation with Bob and no other protocol roles(or intruder cords) involved,arises from the cord space(1)(2)and substitutes for.Again, the pattern can contain multiple holes.Finally,reaction(4)shows the binding action where the cord creates a new value that doesn’t appear elsewhere in the cordspace,and substitutes that value for in the cord to the right.The intuitive motive for the condition should be clear:a term cannot be sent,or tested,until all of its free variables are instantiated.In addition in a decryption action,the key used in the pattern must be bound.In other words, our variables are not public names,or references that could be passed around,but strictly private stores.This security-specific feature distinguishes cord calculus from the closely related,but general-purpose process and action calculi,to which11(b)(d)(f)(h)Table2:NSL example reactionit otherwise owes the basic ideas and notations.RunsThe runs of a protocol arise as reaction sequences of cord spaces.The run of the NSL protocol displayed in Figures1-3can now be completely formalized as a sequence of syntactic reaction steps,which are shown in Table2.Steps(a)and(d)in Table2use rule(4),steps(b),(e)and(g)are based on rule(1),and steps(c),(f)and(h)on rule(3).In a sense,these eight reduction steps correspond to thefive arrows in Figures1and2,plus the explicit actions to create a new value and thefinal test of that performs,which were omitted in the diagrams.On the other hand,the three arrows that appear in Figure3correspond to the applications of rule(1).The actions based on rules(3)and(4)were represented in Figure3not by arrows,but by displaying the corresponding actions.2.4Static binding and cord categoryMany protocols of interest consist of a set of roles.For example,the Needham-Schroeder public-key protocol,mentioned earlier,has an initiator role and a re-sponder role.An initiator starts an exchange by sending a message to a responder. In a local area network,for example,with principals(users or machines)named Alice,Bob,Charley,and Dolores,the protocol could be used simultaneously or in succession by several principals for several purposes.Alice may initiate an ex-change with Bob and,before completing the three messages associated with this exchange,respond to an exchange initiated by Charlie.Concurrently,Charlie may initiate an exchange with Bob,and respond to a request from Dolores.We consider12the set of messages exchanged by these four parties,together with any actions per-formed by an attacker,a possible run of the protocol.Since a run may consist of several instances of the protocol roles,executed concurrently,it is useful to have a notation for a role that has not been assigned to any specific principal.In this section,we summarize the basic idea.However, since the mechanisms described here do not play a central role in this paper,the presentation is informal,proceeding by example rather than focussing on the gen-eral definitions.The main concepts that are needed in the remainder of the paper are that roles contain variables indicating principals,these variables are bound in the static interface of the role,and the variables are replaced by specific principals in constructing a run of the protocol.Two cords of the NSL protocol,given in Figure3,are:We consider the lists and binding operators,so that principal variables and are bound in these cords.The list are called the static interfaces of the cords,since we model replacing and with Alice and Bob as a static operation that occurs before the dynamic execution of a run of the protocol.In the cords and above,empty angle brackets,appear at the end of each cord.Generally,angle brackets may contain an export list which is used to compose position,written using“;”,is achieved by substitution.For example,Note that in performing the composition,the exported from thefirst cord is substituted for imported in the second.Since composition provides substitution, we introduce an abbreviation13to indicate the cord with its static interface instantiated to the values and.Thisgives us and.For the reader familiar with action calculus,we observe that cords,taken asparticles,generate an action category[16,22].This is the source of the equivalencerelation.The idea is that a cord space,displayed in the formcan be viewed as an arrow,where arities,are the objects of thecategory.The variables,assumed mutually different,form the input interface:the operator binds their occurrences to the right.The terms in the output interface may not be mutually different,nor different from.Of course,all expressions are up to variable renaming(-conversion).Given a morphism,in the formthe composite will be the cord morphismwhere it is assumed that the names in the interfaces of and have been chosenso that no clashes occur when is substituted for.The idea is that the dynamic binding by and captures value propa-gation by communication,the static binding of the input interface is now used tocompose agents at design time.The static interfaces are thus not used for passingany actual messages,but for propagating the public keys,connecting the variousroles of the same principal,and for static links in general,independent of andprior to the execution.The cord above can be designed as the composite,wherewhere is disjoint from and the variables in are disjoint from the variables in, to avoid naming conflicts.Since these disjointness conditions may be satisfied by suitable renaming,it is always possible to move the static interfaces to the outside of the cord space,and carry out all reactions within their scope.Returning to the example NSL cords,if we define a substitution process ,thenStatic binding plays a limited role in the present paper.We will display the interface only when it is relevant,and in other cases assume that all variables are bound.3Protocols3.1Protocol RolesA protocol is defined by afinite set of roles,such as initiator,responder and server, each carried out by one or more participants in any protocol execution.In repre-senting protocol roles by cords,it is useful to identify the principal who carries out the role;we do this by writing the name of the principal as a subscript on the square brackets.Formally,we distinguish roles from cords by calling a cord with identified principal,subject to the key condition given below,a ing vari-ables from their static interface,the initiator and responder roles are now written precisely as,which repre-sents the decryption key in a public key cryptosystem.In a protocol role,the only15placeis not a well-formed role,because this role allows the principal to decrypt a message using’s private key.The syntactic key restriction on roles prevents a role from“computing”the value of a private key from the public key.The following cord,which appliesis not a well-formed protocol role because the private keyrestriction on decryption keys defined in this section.We specify the set of de-cryption actions available to the intruder using a subsidiary definition of the set of decryption keys used in a cord.If is a cord,then is the set of names that appear as private keys in the cord,that is:only occurs in the decryption position of a decryption pattern match action.This restriction will prevent an intruder from using any key that has not been corrupted,and prevents the intruder from computing the private key from a public key.3.3Protocol Configurations and RunsA run of a protocol is a sequence of reaction steps from an initial configuration. An initial configuration is determined by a set of principals,a subset of which are designated as honest,a cord space constructed by assigning one or more roles to each honest principal,and an intruder cord that may use only the secret keys of dishonest principals.We give an example without an intruder cord and a more complicated example with an intruder cord.Although we could assign protocol roles to corrupted keys,there is no need to do so.The reason is simply that when a key is available to the intruder,the intruder can simulate any number of protocol roles using that key.Here is an example initial configuration allowing to initiate a conversation with,a conversation with,and allowing both and to respond using the responder role:Using a substitution cord,,the initial configuration can also be written as a composition of cordsMore generally,any initial configuration can be expressed using a selection of protocol roles,an intruder role,and a substitution cord morphism that connects the interfaces of all the roles.Each initial configuration has only one intruder role,but this role may be selected arbitrarily from all possible intruder roles.17For example,let be a set of principals,and let sub-set be a set of honest principals.Let be any intruder role with decryption keys among.To define an initial con-figuration with roles,roles,and intruder,and we define the substitutionThen an initial configuration of the NSL protocol is given by the cord spacewhere are honest keys in.The intruder role may use any encryption keys among,but only the decryption keys that are not in.Example:Lowe’s run of the original Needham-Schroeder protocol As an example,consider Lowe’s anomaly in the original Needham-Schroeder protocol [11].The original Needham-Schroeder protocol is represented by the following cordsTable4:Run showing Lowe’s anomaly in Needham-Schroeder20showing the actions taken by in run,as follows,andare all examples of true facts about run.3.5Protocol PropertiesIn this section,we collect some properties of the class of protocols we will reason about in the rest of the paper.21No Telepathy It is straightforward to check that if a role sends a message,then all the subterms of the message must be values that were either created by the role, received by the role,or that were known to the role from its static parameters.Lemma3.2(No Telepathy)Let be a protocol,be an arbitrary run,be a principal,and consist of initial segments of traces,where each is a role of.Let be any message sent by as part of role.Then every symbol in the term is either generated in,received in,or was in the static interface of.Proof:This follows from the definition of the cords we use to represent roles. Each role is a closed cord,so all values must be bound.Symbols can be bound by the static interface,or by the,receive and pattern match actions. Asynchronous communication Cord reactions,as we have defined them,re-quire synchronous communication.That is,a message send action cannot happen in one cord unless a message receive action occurs simultaneously in another cord. Real network communication is asynchronous,though–the network itself effec-tively provides a buffer in which messages can be stored until somebody is ready to receive them.In order to model this with cords,we pad the intruder cord with an arbitrary number of“”actions,which we call forwarding actions.We call this a buffering intruder cord.These forwarding actions model a message being received,and then eventually sent.Because these forwarding actions are indepen-dent from(share no variables with)the other actions in the cord,they can occur in any order,which effectively models the asynchronous nature of the network.We define an adequate buffering intruder cord with respect to a configuration as a buffering intruder cord that has enough forwarding actions to guarantee that every send action in the configuration can be taken immediately.For any configuration,we can construct an adequate buffering intruder cord by counting all the send actions occurring in the configuration,and including at least that many forwarding actions in the intruder cord.Lemma3.3(Asynchronous Communication)In a configuration with an adequate buffering intruder cord,any role that wishes to send a message can always send it. Proof:Since the buffered intruder cord provides a corresponding receive action for each send in the configuration,this action is always available for reaction with a send action.This lemma allows us to schedule reactions runs so that the only place where protocol roles are required to pause is at a receive action.All intermediate actions22。

相关文档
最新文档