<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.cas.mcmaster.ca/skins/common/feed.css?207"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.cas.mcmaster.ca/index.php?feed=atom&amp;target=Katmehm&amp;title=Special%3AContributions</id>
		<title>Computing and Software Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.cas.mcmaster.ca/index.php?feed=atom&amp;target=Katmehm&amp;title=Special%3AContributions"/>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Special:Contributions/Katmehm"/>
		<updated>2026-04-09T21:04:21Z</updated>
		<subtitle>From Computing and Software Wiki</subtitle>
		<generator>MediaWiki 1.15.1</generator>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Motivations_for_the_Studies_of_HCI</id>
		<title>Motivations for the Studies of HCI</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Motivations_for_the_Studies_of_HCI"/>
				<updated>2009-11-23T07:05:51Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Ergonomics.jpg|thumb|What is ergonmics?|480px|right|'''What Is Ergonomics?''']]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
As the capabilities of available technologies continue to grow, the technology itself becomes available to more types of user, each with different demands, goals, and needs. A good Human-Computer Interface (HCI) needs to address the limitations and needs of its user. In addition to meeting the needs of a growing and diverse user-base, research needs to be done in the field of HCI for computers to be accessible in mobile environments, to act as cost-saving measures, to ensure quality software development, and to address the health and safety of the user. These and other motivations elaborated below allow for engineers understand the subjective needs of the user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Motivations ==&lt;br /&gt;
&lt;br /&gt;
=== Integration into Human Lifestyles ===&lt;br /&gt;
&lt;br /&gt;
*'''Users are not tolerant of poorly designed interfaces'''. Often users are susceptible to frustration, will not invest time in learning an unintuitive interface and will seek out a more suitable product or solution.&lt;br /&gt;
&lt;br /&gt;
*'''Consumers require products that are easy to learn and intuitive to navigate, especially as they are integrated into their daily lives'''. The best example of this is the innovation of the World Wide Web, which is considered to be the direct result of HCI research.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt; Especially in the mid 1990’s when the personal computer was not commonplace in the average North American home the way it is today, the idea of navigating over the web would be insurmountable to new users. HCI research, particularly related to direct manipulation led to the use of hyperlinks, making use of the internet accessible for new users.&lt;br /&gt;
&lt;br /&gt;
*'''The ways in which users adopt technology into their daily lives requires businesses to come up with interaction styles fitting to the context in which the technology is being used'''. Jobs require users to have access to computing resources away from their static desktop computer. For this reason, PDA’s, smart phones, and pocket PC’s have recently become commonplace in the business environment. New studies in HCI are required to make mobile interaction realistic so that the user is able to work just as effectively in a mobile environment. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
*'''Training is expensive'''. Users should not have the responsibility of allocating time, money, and motivation to learning a new interaction style. A good interface as the result of HCI studies would not place this burden on the user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Business/Commerical Motivations ===&lt;br /&gt;
&lt;br /&gt;
*'''Study of Technology Insertion Techniques in HCI can be used to reduce errors'''. Ultimately, this means a company can avoid errors that result in the loss of time, money, morale, and other costly factors.&lt;br /&gt;
&lt;br /&gt;
*'''The costs of training, motivating, and maintaining humans far outweigh the costs of developing hardware and software interaction systems'''. Effective HCIs allow workers to overcome human limitations and work more productively.&lt;br /&gt;
&lt;br /&gt;
*'''Businesses can use HCI research as motivations for developing new business models'''. For example, in 2009 Microsoft announced plans for Natal, a peripheral for the Xbox 360 home gaming console that uses physical movement and gesture recognition to make the gaming controller obsolete. Furthermore, the business decision is that consumers would be able to get a cutting-edge interaction experience without having to spend upwards of $500 on a new console. By studying HCI and applying new interaction techniques, Microsoft stands to change the gaming business model in a way that reduces their marketing costs and satisfies customers. &amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Accessibility Concerns ===&lt;br /&gt;
&lt;br /&gt;
*'''Research in HCI must be done as a precautionary measure'''. A user may suffer from epilepsy or other complications arising from photosensitivity that can lead to convulsions, disorientation, and other harmful affects. Studies of refresh rates, jarring contrasts, allowable changes in brightness, and human vision concerns are necessary to avoid potentially harming the user. &lt;br /&gt;
&lt;br /&gt;
*'''The burden of communication is on the GUI.''' The application must be able to effectively communicate what actions are available to avoid misuse. This involves the study of regional languages, vision loss in the elderly, colourblindness, and how to accommodate other accessibility issues. Not only do these concepts need to be researched, but HCI's need to be studied to understand how to effectively integrate those accessability concerns into the system without introducing more confusion that could disrupt the system or harm the user. &lt;br /&gt;
&lt;br /&gt;
*'''A GUI is only as effective as the actions it is capable of performing'''. Studies of behavioural patterns, learning rates, and visual stimuli are needed to determine how users become more comfortable with the interface. By making an interface available to a variety of users with different levels of aptitude (novice, intermediate, expert) the interface becomes more useful in fulfilling its purpose. &amp;lt;sup&amp;gt;[4]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Quality Assurance of Software ===&lt;br /&gt;
&lt;br /&gt;
=== Development of Industry Standards ===&lt;br /&gt;
&lt;br /&gt;
== Human Factors ==&lt;br /&gt;
&lt;br /&gt;
Human Factors is an umbrella term for several areas of research. Motivation rises for the study of human factors that include [[Motivations for the Studying of HCI#Human Performance|human performance]], [[Motivations for the Studying of HCI#Technology Design|technology design]] and [[Motivations for the Studying of HCI#Human-Computer Interaction|Human-Computer Interaction (HCI)]]. Human factors is often used interchangeably with User Interface Design or Human-Computer Interaction.  &lt;br /&gt;
&lt;br /&gt;
The concept of human factors emerged during the industrial revolution and became a full-fledged discipline during World War II. &lt;br /&gt;
&lt;br /&gt;
Human factors recognized that aircraft cockpit design needed to consider the human interface for controls and displays.Design engineers focused on technology and the industrial psychologists worked to optimize the interface. There is a tremendous overlap in these disciplines. Human factors refer to hardware design and HCI is frequently used by the software engineers. Engineering psychologists work in both disciplines and the overlap is considered greater than the difference.&lt;br /&gt;
http://www.duke.edu/web/informatics/HF/HumanFactors.html&lt;br /&gt;
&lt;br /&gt;
Another example of this area of research occurs in the Human Factors Research and Technology Division at NASA Ames Research Center &amp;lt;sup&amp;gt;[4]&amp;lt;/sup&amp;gt;. This area  focuses on the need for safe, efficient and cost-effective operations, maintenance and training, both in flight aircrafts and on the ground.&lt;br /&gt;
&lt;br /&gt;
[[Image:Human_factors.jpg|frame|Human Factors|right|Hardware design promoting a healthy desktop environment.]]&lt;br /&gt;
&lt;br /&gt;
See below for further information on some specific subjects of human factors. &lt;br /&gt;
&lt;br /&gt;
===Human Performance===&lt;br /&gt;
&lt;br /&gt;
Human factors or HCI must consider integration of human mental abilities, i.e. short and long-term memory, visual scanning, and the development of mental cognitive models. HCI not only includes the specification, design, and development of systems, it must also include the actual training, skill levels, and organizational aspects of the end users. By considering these characteristics, data entry and understanding information technology becomes easier. HCI includes several areas that are paramount in the interaction of humans and machines. These areas include staffing, personnel, training, human factors engineering, and health risks, as well as managerial, public, and personal safety issues surrounding machines. Other issues that must be considered with HCI are the designs of language, entering methods, graphics, visual representation, and consistency of a system's look. Human factors is a comprehensive expression covering an assortment of areas speaking to the purpose of objects people use, from the scalpel to the computer within healthcare. &lt;br /&gt;
&lt;br /&gt;
=== Technology Design ===&lt;br /&gt;
=== Human-Computer Interaction ===&lt;br /&gt;
&lt;br /&gt;
== Ergonomics ==&lt;br /&gt;
===Definition:===&lt;br /&gt;
The term Ergonomics is derived from two Greek words Nomoi meaning natural laws and Ergon meaning work. Hence, ergonomists study human capabilities in relationship to work demands.&lt;br /&gt;
&lt;br /&gt;
===Principles of Ergonomics:===&lt;br /&gt;
There are '''10 basic''' principles:&lt;br /&gt;
&lt;br /&gt;
1. ''Work in Neutral Postures'': Your posture provides a good starting point for evaluating the tasks that you do. The best positions in which to work are those that keep the body &amp;quot;in neutral.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
2. ''Reduce Excessive Force'': Excessive force on your joints can create a potential for fatigue and injury.  In practical terms, the action item is for you to identify specific instances of excessive force and think of ways to make improvements.&lt;br /&gt;
&lt;br /&gt;
3. ''Keep Everything in Easy Reach'': The next principle deals with keeping things within easy reach.  In many ways, this principle is redundant with posture, but it helps to evaluate a task from this specific perspective.&lt;br /&gt;
[[Image:P19_Reach_for_mouse.jpg|thumb|alt=Puzzle globe logo|problems with reach are simply matters of rearranging your work area and moving things closer to you]]&lt;br /&gt;
&lt;br /&gt;
4. ''Work at Proper Heights'': Working at the right height is also a way to make things easier.&lt;br /&gt;
[[Image:P23_elbow_ht_typing.jpg|thumb|alt=Puzzle globe logo|A good rule of thumb is that most work should be done at about elbow height, whether sitting or standing.]]&lt;br /&gt;
&lt;br /&gt;
5. ''Reduce Excessive Motions'': The next principle to think about is the number of motions you make throughout a day, whether with your fingers, your wrists, your arms, or your back.&lt;br /&gt;
&lt;br /&gt;
6. ''Minimize Fatigue and Static Load'': Holding the same position for a period of time is known as static load. It creates fatigue and discomfort and can interfere with work.&lt;br /&gt;
&lt;br /&gt;
7. ''Minimize Pressure Points'': Another thing to watch out for is excessive pressure points, sometimes called &amp;quot;contact stress.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
8. ''Provide Clearance'': Having enough clearance is a concept that is easy to relate to.&lt;br /&gt;
&lt;br /&gt;
9. ''Move, Exercise, and Stretch'': To be healthy the human body needs to be exercised and stretched.&lt;br /&gt;
&lt;br /&gt;
10. ''Maintain a Comfortable Environment'': This principle is more or less a catch-all that can mean different things depending upon the nature of the types of operations that you do.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
this is [http://en.wikipedia.org/wiki/Fitts's_law Fitts's] law&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://www.duke.edu/web/informatics/HF/HF-ergonomics.html&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;references-small&amp;quot;&amp;gt;&lt;br /&gt;
:'''1.''' A brief history of human-computer interaction technology. ACM Interactions. http://portal.acm.org/citation.cfm?doid=274430.274436&lt;br /&gt;
&lt;br /&gt;
:'''2.''' Using while moving: HCI issues in fieldwork environments. ACM Transactions on Computer-Human Interaction (TOCHI) http://delivery.acm.org/10.1145/360000/355329/p417-pascoe.pdf?key1=355329&amp;amp;key2=2746298521&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=64390082&amp;amp;CFTOKEN=12638977&lt;br /&gt;
&lt;br /&gt;
:'''3.''' Reuters: Microsoft unveils new Xbox technology, enlists Facebook. http://www.reuters.com/article/internetNews/idUSTRE5506FO20090601&lt;br /&gt;
&lt;br /&gt;
:'''4.''' Poelman, S. (2009) Software Engineering 4D03/6D03/Computer Science 4HC3 Lecture Notes&lt;br /&gt;
&lt;br /&gt;
:'''5.''' Human Factors 101. http://human-factors.arc.nasa.gov/web/hf101/&lt;br /&gt;
&lt;br /&gt;
:'''6.''' [[Fitts's Law]]: &amp;lt;cite&amp;gt; [http://en.wikipedia.org/wiki/Fitts's_law]&amp;lt;/cite&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:Katmehm|Katmehm]] 02:05, 23 November 2009 (EST)&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Motivations_for_the_Studies_of_HCI</id>
		<title>Motivations for the Studies of HCI</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Motivations_for_the_Studies_of_HCI"/>
				<updated>2009-11-23T07:03:54Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;/* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Ergonomics.jpg|thumb|What is ergonmics?|480px|right|'''What Is Ergonomics?''']]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
As the capabilities of available technologies continue to grow, the technology itself becomes available to more types of user, each with different demands, goals, and needs. A good Human-Computer Interface (HCI) needs to address the limitations and needs of its user. In addition to meeting the needs of a growing and diverse user-base, research needs to be done in the field of HCI for computers to be accessible in mobile environments, to act as cost-saving measures, to ensure quality software development, and to address the health and safety of the user. These and other motivations elaborated below allow for engineers understand the subjective needs of the user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Motivations ==&lt;br /&gt;
&lt;br /&gt;
=== Integration into Human Lifestyles ===&lt;br /&gt;
&lt;br /&gt;
*'''Users are not tolerant of poorly designed interfaces'''. Often users are susceptible to frustration, will not invest time in learning an unintuitive interface and will seek out a more suitable product or solution.&lt;br /&gt;
&lt;br /&gt;
*'''Consumers require products that are easy to learn and intuitive to navigate, especially as they are integrated into their daily lives'''. The best example of this is the innovation of the World Wide Web, which is considered to be the direct result of HCI research.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt; Especially in the mid 1990’s when the personal computer was not commonplace in the average North American home the way it is today, the idea of navigating over the web would be insurmountable to new users. HCI research, particularly related to direct manipulation led to the use of hyperlinks, making use of the internet accessible for new users.&lt;br /&gt;
&lt;br /&gt;
*'''The ways in which users adopt technology into their daily lives requires businesses to come up with interaction styles fitting to the context in which the technology is being used'''. Jobs require users to have access to computing resources away from their static desktop computer. For this reason, PDA’s, smart phones, and pocket PC’s have recently become commonplace in the business environment. New studies in HCI are required to make mobile interaction realistic so that the user is able to work just as effectively in a mobile environment. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
*'''Training is expensive'''. Users should not have the responsibility of allocating time, money, and motivation to learning a new interaction style. A good interface as the result of HCI studies would not place this burden on the user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Business/Commerical Motivations ===&lt;br /&gt;
&lt;br /&gt;
*'''Study of Technology Insertion Techniques in HCI can be used to reduce errors'''. Ultimately, this means a company can avoid errors that result in the loss of time, money, morale, and other costly factors.&lt;br /&gt;
&lt;br /&gt;
*'''The costs of training, motivating, and maintaining humans far outweigh the costs of developing hardware and software interaction systems'''. Effective HCIs allow workers to overcome human limitations and work more productively.&lt;br /&gt;
&lt;br /&gt;
*'''Businesses can use HCI research as motivations for developing new business models'''. For example, in 2009 Microsoft announced plans for Natal, a peripheral for the Xbox 360 home gaming console that uses physical movement and gesture recognition to make the gaming controller obsolete. Furthermore, the business decision is that consumers would be able to get a cutting-edge interaction experience without having to spend upwards of $500 on a new console. By studying HCI and applying new interaction techniques, Microsoft stands to change the gaming business model in a way that reduces their marketing costs and satisfies customers. &amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Accessibility Concerns ===&lt;br /&gt;
&lt;br /&gt;
*'''Research in HCI must be done as a precautionary measure'''. A user may suffer from epilepsy or other complications arising from photosensitivity that can lead to convulsions, disorientation, and other harmful affects. Studies of refresh rates, jarring contrasts, allowable changes in brightness, and human vision concerns are necessary to avoid potentially harming the user. &lt;br /&gt;
&lt;br /&gt;
*'''The burden of communication is on the GUI.''' The application must be able to effectively communicate what actions are available to avoid misuse. This involves the study of regional languages, vision loss in the elderly, colourblindness, and how to accommodate other accessibility issues. Not only do these concepts need to be researched, but HCI's need to be studied to understand how to effectively integrate those accessability concerns into the system without introducing more confusion that could disrupt the system or harm the user. &lt;br /&gt;
&lt;br /&gt;
*'''A GUI is only as effective as the actions it is capable of performing'''. Studies of behavioural patterns, learning rates, and visual stimuli are needed to determine how users become more comfortable with the interface. By making an interface available to a variety of users with different levels of aptitude (novice, intermediate, expert) the interface becomes more useful in fulfilling its purpose. &amp;lt;sup&amp;gt;[4]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Quality Assurance of Software ===&lt;br /&gt;
&lt;br /&gt;
=== Development of Industry Standards ===&lt;br /&gt;
&lt;br /&gt;
== Human Factors ==&lt;br /&gt;
&lt;br /&gt;
Human Factors is an umbrella term for several areas of research. Motivation rises for the study of human factors that include [[Motivations for the Studying of HCI#Human Performance|human performance]], [[Motivations for the Studying of HCI#Technology Design|technology design]] and [[Motivations for the Studying of HCI#Human-Computer Interaction|Human-Computer Interaction (HCI)]]. Human factors is often used interchangeably with User Interface Design or Human-Computer Interaction.  &lt;br /&gt;
&lt;br /&gt;
The concept of human factors emerged during the industrial revolution and became a full-fledged discipline during World War II. &lt;br /&gt;
&lt;br /&gt;
Human factors recognized that aircraft cockpit design needed to consider the human interface for controls and displays.Design engineers focused on technology and the industrial psychologists worked to optimize the interface. There is a tremendous overlap in these disciplines. Human factors refer to hardware design and HCI is frequently used by the software engineers. Engineering psychologists work in both disciplines and the overlap is considered greater than the difference.&lt;br /&gt;
http://www.duke.edu/web/informatics/HF/HumanFactors.html&lt;br /&gt;
&lt;br /&gt;
Another example of this area of research occurs in the Human Factors Research and Technology Division at NASA Ames Research Center &amp;lt;sup&amp;gt;[4]&amp;lt;/sup&amp;gt;. This area  focuses on the need for safe, efficient and cost-effective operations, maintenance and training, both in flight aircrafts and on the ground.&lt;br /&gt;
&lt;br /&gt;
[[Image:Human_factors.jpg|frame|Human Factors|right|Hardware design promoting a healthy desktop environment.]]&lt;br /&gt;
&lt;br /&gt;
See below for further information on some specific subjects of human factors. &lt;br /&gt;
&lt;br /&gt;
===Human Performance===&lt;br /&gt;
&lt;br /&gt;
Human factors or HCI must consider integration of human mental abilities, i.e. short and long-term memory, visual scanning, and the development of mental cognitive models. HCI not only includes the specification, design, and development of systems, it must also include the actual training, skill levels, and organizational aspects of the end users. By considering these characteristics, data entry and understanding information technology becomes easier. HCI includes several areas that are paramount in the interaction of humans and machines. These areas include staffing, personnel, training, human factors engineering, and health risks, as well as managerial, public, and personal safety issues surrounding machines. Other issues that must be considered with HCI are the designs of language, entering methods, graphics, visual representation, and consistency of a system's look. Human factors is a comprehensive expression covering an assortment of areas speaking to the purpose of objects people use, from the scalpel to the computer within healthcare. &lt;br /&gt;
&lt;br /&gt;
=== Technology Design ===&lt;br /&gt;
=== Human-Computer Interaction ===&lt;br /&gt;
&lt;br /&gt;
== Ergonomics ==&lt;br /&gt;
===Definition:===&lt;br /&gt;
The term Ergonomics is derived from two Greek words Nomoi meaning natural laws and Ergon meaning work. Hence, ergonomists study human capabilities in relationship to work demands.&lt;br /&gt;
&lt;br /&gt;
===Principles of Ergonomics:===&lt;br /&gt;
There are '''10 basic''' principles:&lt;br /&gt;
&lt;br /&gt;
1. ''Work in Neutral Postures'': Your posture provides a good starting point for evaluating the tasks that you do. The best positions in which to work are those that keep the body &amp;quot;in neutral.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
2. ''Reduce Excessive Force'': Excessive force on your joints can create a potential for fatigue and injury.  In practical terms, the action item is for you to identify specific instances of excessive force and think of ways to make improvements.&lt;br /&gt;
&lt;br /&gt;
3. ''Keep Everything in Easy Reach'': The next principle deals with keeping things within easy reach.  In many ways, this principle is redundant with posture, but it helps to evaluate a task from this specific perspective.&lt;br /&gt;
[[Image:P19_Reach_for_mouse.jpg|thumb|alt=Puzzle globe logo|problems with reach are simply matters of rearranging your work area and moving things closer to you]]&lt;br /&gt;
&lt;br /&gt;
4. ''Work at Proper Heights'': Working at the right height is also a way to make things easier.&lt;br /&gt;
[[Image:P23_elbow_ht_typing.jpg|thumb|alt=Puzzle globe logo|A good rule of thumb is that most work should be done at about elbow height, whether sitting or standing.]]&lt;br /&gt;
&lt;br /&gt;
5. ''Reduce Excessive Motions'': The next principle to think about is the number of motions you make throughout a day, whether with your fingers, your wrists, your arms, or your back.&lt;br /&gt;
&lt;br /&gt;
6. ''Minimize Fatigue and Static Load'': Holding the same position for a period of time is known as static load. It creates fatigue and discomfort and can interfere with work.&lt;br /&gt;
&lt;br /&gt;
7. ''Minimize Pressure Points'': Another thing to watch out for is excessive pressure points, sometimes called &amp;quot;contact stress.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
8. ''Provide Clearance'': Having enough clearance is a concept that is easy to relate to.&lt;br /&gt;
&lt;br /&gt;
9. ''Move, Exercise, and Stretch'': To be healthy the human body needs to be exercised and stretched.&lt;br /&gt;
&lt;br /&gt;
10. ''Maintain a Comfortable Environment'': This principle is more or less a catch-all that can mean different things depending upon the nature of the types of operations that you do.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
this is [http://en.wikipedia.org/wiki/Fitts's_law Fitts's] law&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://www.duke.edu/web/informatics/HF/HF-ergonomics.html&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;references-small&amp;quot;&amp;gt;&lt;br /&gt;
:'''1.''' A brief history of human-computer interaction technology. ACM Interactions. http://portal.acm.org/citation.cfm?doid=274430.274436&lt;br /&gt;
&lt;br /&gt;
:'''2.''' Using while moving: HCI issues in fieldwork environments. ACM Transactions on Computer-Human Interaction (TOCHI) http://delivery.acm.org/10.1145/360000/355329/p417-pascoe.pdf?key1=355329&amp;amp;key2=2746298521&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=64390082&amp;amp;CFTOKEN=12638977&lt;br /&gt;
&lt;br /&gt;
:'''3.''' Reuters: Microsoft unveils new Xbox technology, enlists Facebook. http://www.reuters.com/article/internetNews/idUSTRE5506FO20090601&lt;br /&gt;
&lt;br /&gt;
:'''4.''' Poelman, S. (2009) Software Engineering 4D03/6D03/Computer Science 4HC3 Lecture Notes&lt;br /&gt;
&lt;br /&gt;
:'''5.''' Human Factors 101. http://human-factors.arc.nasa.gov/web/hf101/&lt;br /&gt;
&lt;br /&gt;
:'''6.''' [[Fitts's Law]]: &amp;lt;cite&amp;gt; [http://en.wikipedia.org/wiki/Fitts's_law]&amp;lt;/cite&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Motivations_for_the_Studies_of_HCI</id>
		<title>Motivations for the Studies of HCI</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Motivations_for_the_Studies_of_HCI"/>
				<updated>2009-11-23T06:59:49Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Ergonomics.jpg|thumb|What is ergonmics?|480px|right|'''What Is Ergonomics?''']]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
As the capabilities of available technologies continue to grow, the technology itself becomes available to more types of user, each with different demands, goals, and needs. A good Human-Computer Interface (HCI) needs to address the limitations and needs of its user. In addition to meeting the needs of a growing and diverse user-base, research needs to be done in the field of HCI for computers to be accessible in mobile environments, to act as cost-saving measures, to ensure quality software development, and to address the health and safety of the user. These and other motivations elaborated below allow for engineers understand the subjective needs of the user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Motivations ==&lt;br /&gt;
&lt;br /&gt;
=== Integration into Human Lifestyles ===&lt;br /&gt;
&lt;br /&gt;
*'''Users are not tolerant of poorly designed interfaces'''. Often users are susceptible to frustration, will not invest time in learning an unintuitive interface and will seek out a more suitable product or solution.&lt;br /&gt;
&lt;br /&gt;
*'''Consumers require products that are easy to learn and intuitive to navigate, especially as they are integrated into their daily lives'''. The best example of this is the innovation of the World Wide Web, which is considered to be the direct result of HCI research.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt; Especially in the mid 1990’s when the personal computer was not commonplace in the average North American home the way it is today, the idea of navigating over the web would be insurmountable to new users. HCI research, particularly related to direct manipulation led to the use of hyperlinks, making use of the internet accessible for new users.&lt;br /&gt;
&lt;br /&gt;
*'''The ways in which users adopt technology into their daily lives requires businesses to come up with interaction styles fitting to the context in which the technology is being used'''. Jobs require users to have access to computing resources away from their static desktop computer. For this reason, PDA’s, smart phones, and pocket PC’s have recently become commonplace in the business environment. New studies in HCI are required to make mobile interaction realistic so that the user is able to work just as effectively in a mobile environment. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
*'''Training is expensive'''. Users should not have the responsibility of allocating time, money, and motivation to learning a new interaction style. A good interface as the result of HCI studies would not place this burden on the user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Business/Commerical Motivations ===&lt;br /&gt;
&lt;br /&gt;
*'''Study of Technology Insertion Techniques in HCI can be used to reduce errors'''. Ultimately, this means a company can avoid errors that result in the loss of time, money, morale, and other costly factors.&lt;br /&gt;
&lt;br /&gt;
*'''The costs of training, motivating, and maintaining humans far outweigh the costs of developing hardware and software interaction systems'''. Effective HCIs allow workers to overcome human limitations and work more productively.&lt;br /&gt;
&lt;br /&gt;
*'''Businesses can use HCI research as motivations for developing new business models'''. For example, in 2009 Microsoft announced plans for Natal, a peripheral for the Xbox 360 home gaming console that uses physical movement and gesture recognition to make the gaming controller obsolete. Furthermore, the business decision is that consumers would be able to get a cutting-edge interaction experience without having to spend upwards of $500 on a new console. By studying HCI and applying new interaction techniques, Microsoft stands to change the gaming business model in a way that reduces their marketing costs and satisfies customers. &amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Accessibility Concerns ===&lt;br /&gt;
&lt;br /&gt;
*'''Research in HCI must be done as a precautionary measure'''. A user may suffer from epilepsy or other complications arising from photosensitivity that can lead to convulsions, disorientation, and other harmful affects. Studies of refresh rates, jarring contrasts, allowable changes in brightness, and human vision concerns are necessary to avoid potentially harming the user. &lt;br /&gt;
&lt;br /&gt;
*'''The burden of communication is on the GUI.''' The application must be able to effectively communicate what actions are available to avoid misuse. This involves the study of regional languages, vision loss in the elderly, colourblindness, and how to accommodate other accessibility issues. Not only do these concepts need to be researched, but HCI's need to be studied to understand how to effectively integrate those accessability concerns into the system without introducing more confusion that could disrupt the system or harm the user. &lt;br /&gt;
&lt;br /&gt;
*'''A GUI is only as effective as the actions it is capable of performing'''. Studies of behavioural patterns, learning rates, and visual stimuli are needed to determine how users become more comfortable with the interface. By making an interface available to a variety of users with different levels of aptitude (novice, intermediate, expert) the interface becomes more useful in fulfilling its purpose. &amp;lt;sup&amp;gt;[4]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Quality Assurance of Software ===&lt;br /&gt;
&lt;br /&gt;
=== Development of Industry Standards ===&lt;br /&gt;
&lt;br /&gt;
== Human Factors ==&lt;br /&gt;
&lt;br /&gt;
Human Factors is an umbrella term for several areas of research. Motivation rises for the study of human factors that include [[Motivations for the Studying of HCI#Human Performance|human performance]], [[Motivations for the Studying of HCI#Technology Design|technology design]] and [[Motivations for the Studying of HCI#Human-Computer Interaction|Human-Computer Interaction (HCI)]]. Human factors is often used interchangeably with User Interface Design or Human-Computer Interaction.  &lt;br /&gt;
&lt;br /&gt;
The concept of human factors emerged during the industrial revolution and became a full-fledged discipline during World War II. &lt;br /&gt;
&lt;br /&gt;
Human factors recognized that aircraft cockpit design needed to consider the human interface for controls and displays.Design engineers focused on technology and the industrial psychologists worked to optimize the interface. There is a tremendous overlap in these disciplines. Human factors refer to hardware design and HCI is frequently used by the software engineers. Engineering psychologists work in both disciplines and the overlap is considered greater than the difference.&lt;br /&gt;
http://www.duke.edu/web/informatics/HF/HumanFactors.html&lt;br /&gt;
&lt;br /&gt;
Another example of this area of research occurs in the Human Factors Research and Technology Division at NASA Ames Research Center &amp;lt;sup&amp;gt;[4]&amp;lt;/sup&amp;gt;. This area  focuses on the need for safe, efficient and cost-effective operations, maintenance and training, both in flight aircrafts and on the ground.&lt;br /&gt;
&lt;br /&gt;
[[Image:Human_factors.jpg|frame|Human Factors|right|Hardware design promoting a healthy desktop environment.]]&lt;br /&gt;
&lt;br /&gt;
See below for further information on some specific subjects of human factors. &lt;br /&gt;
&lt;br /&gt;
===Human Performance===&lt;br /&gt;
&lt;br /&gt;
Human factors or HCI must consider integration of human mental abilities, i.e. short and long-term memory, visual scanning, and the development of mental cognitive models. HCI not only includes the specification, design, and development of systems, it must also include the actual training, skill levels, and organizational aspects of the end users. By considering these characteristics, data entry and understanding information technology becomes easier. HCI includes several areas that are paramount in the interaction of humans and machines. These areas include staffing, personnel, training, human factors engineering, and health risks, as well as managerial, public, and personal safety issues surrounding machines. Other issues that must be considered with HCI are the designs of language, entering methods, graphics, visual representation, and consistency of a system's look. Human factors is a comprehensive expression covering an assortment of areas speaking to the purpose of objects people use, from the scalpel to the computer within healthcare. &lt;br /&gt;
&lt;br /&gt;
=== Technology Design ===&lt;br /&gt;
=== Human-Computer Interaction ===&lt;br /&gt;
&lt;br /&gt;
== Ergonomics ==&lt;br /&gt;
===Definition:===&lt;br /&gt;
The term Ergonomics is derived from two Greek words Nomoi meaning natural laws and Ergon meaning work. Hence, ergonomists study human capabilities in relationship to work demands.&lt;br /&gt;
&lt;br /&gt;
===Principles of Ergonomics:===&lt;br /&gt;
There are '''10 basic''' principles:&lt;br /&gt;
&lt;br /&gt;
1. ''Work in Neutral Postures'': Your posture provides a good starting point for evaluating the tasks that you do. The best positions in which to work are those that keep the body &amp;quot;in neutral.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
2. ''Reduce Excessive Force'': Excessive force on your joints can create a potential for fatigue and injury.  In practical terms, the action item is for you to identify specific instances of excessive force and think of ways to make improvements.&lt;br /&gt;
&lt;br /&gt;
3. ''Keep Everything in Easy Reach'': The next principle deals with keeping things within easy reach.  In many ways, this principle is redundant with posture, but it helps to evaluate a task from this specific perspective.&lt;br /&gt;
[[Image:P19_Reach_for_mouse.jpg|thumb|alt=Puzzle globe logo|problems with reach are simply matters of rearranging your work area and moving things closer to you]]&lt;br /&gt;
&lt;br /&gt;
4. ''Work at Proper Heights'': Working at the right height is also a way to make things easier.&lt;br /&gt;
[[Image:P23_elbow_ht_typing.jpg|thumb|alt=Puzzle globe logo|A good rule of thumb is that most work should be done at about elbow height, whether sitting or standing.]]&lt;br /&gt;
&lt;br /&gt;
5. ''Reduce Excessive Motions'': The next principle to think about is the number of motions you make throughout a day, whether with your fingers, your wrists, your arms, or your back.&lt;br /&gt;
&lt;br /&gt;
6. ''Minimize Fatigue and Static Load'': Holding the same position for a period of time is known as static load. It creates fatigue and discomfort and can interfere with work.&lt;br /&gt;
&lt;br /&gt;
7. ''Minimize Pressure Points'': Another thing to watch out for is excessive pressure points, sometimes called &amp;quot;contact stress.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
8. ''Provide Clearance'': Having enough clearance is a concept that is easy to relate to.&lt;br /&gt;
&lt;br /&gt;
9. ''Move, Exercise, and Stretch'': To be healthy the human body needs to be exercised and stretched.&lt;br /&gt;
&lt;br /&gt;
10. ''Maintain a Comfortable Environment'': This principle is more or less a catch-all that can mean different things depending upon the nature of the types of operations that you do.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
this is [http://en.wikipedia.org/wiki/Fitts's_law Fitts's] law&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://www.duke.edu/web/informatics/HF/HF-ergonomics.html&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
:'''1.''' A brief history of human-computer interaction technology. ACM Interactions. http://portal.acm.org/citation.cfm?doid=274430.274436&lt;br /&gt;
&lt;br /&gt;
:'''2.''' Using while moving: HCI issues in fieldwork environments. ACM Transactions on Computer-Human Interaction (TOCHI) http://delivery.acm.org/10.1145/360000/355329/p417-pascoe.pdf?key1=355329&amp;amp;key2=2746298521&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=64390082&amp;amp;CFTOKEN=12638977&lt;br /&gt;
&lt;br /&gt;
:'''3.''' Reuters: Microsoft unveils new Xbox technology, enlists Facebook. http://www.reuters.com/article/internetNews/idUSTRE5506FO20090601&lt;br /&gt;
&lt;br /&gt;
:'''4.''' Poelman, S. (2009) Software Engineering 4D03/6D03/Computer Science 4HC3 Lecture Notes&lt;br /&gt;
&lt;br /&gt;
:'''5.''' Human Factors 101. http://human-factors.arc.nasa.gov/web/hf101/&lt;br /&gt;
&lt;br /&gt;
:'''6.''' Fitts's Law. http://en.wikipedia.org/wiki/Fitts's_law&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Motivations_for_the_Studies_of_HCI</id>
		<title>Motivations for the Studies of HCI</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Motivations_for_the_Studies_of_HCI"/>
				<updated>2009-11-23T06:58:44Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Ergonomics.jpg|thumb|What is ergonmics?|right|'''What Is Ergonomics?''']]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
As the capabilities of available technologies continue to grow, the technology itself becomes available to more types of user, each with different demands, goals, and needs. A good Human-Computer Interface (HCI) needs to address the limitations and needs of its user. In addition to meeting the needs of a growing and diverse user-base, research needs to be done in the field of HCI for computers to be accessible in mobile environments, to act as cost-saving measures, to ensure quality software development, and to address the health and safety of the user. These and other motivations elaborated below allow for engineers understand the subjective needs of the user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Motivations ==&lt;br /&gt;
&lt;br /&gt;
=== Integration into Human Lifestyles ===&lt;br /&gt;
&lt;br /&gt;
*'''Users are not tolerant of poorly designed interfaces'''. Often users are susceptible to frustration, will not invest time in learning an unintuitive interface and will seek out a more suitable product or solution.&lt;br /&gt;
&lt;br /&gt;
*'''Consumers require products that are easy to learn and intuitive to navigate, especially as they are integrated into their daily lives'''. The best example of this is the innovation of the World Wide Web, which is considered to be the direct result of HCI research.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt; Especially in the mid 1990’s when the personal computer was not commonplace in the average North American home the way it is today, the idea of navigating over the web would be insurmountable to new users. HCI research, particularly related to direct manipulation led to the use of hyperlinks, making use of the internet accessible for new users.&lt;br /&gt;
&lt;br /&gt;
*'''The ways in which users adopt technology into their daily lives requires businesses to come up with interaction styles fitting to the context in which the technology is being used'''. Jobs require users to have access to computing resources away from their static desktop computer. For this reason, PDA’s, smart phones, and pocket PC’s have recently become commonplace in the business environment. New studies in HCI are required to make mobile interaction realistic so that the user is able to work just as effectively in a mobile environment. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
*'''Training is expensive'''. Users should not have the responsibility of allocating time, money, and motivation to learning a new interaction style. A good interface as the result of HCI studies would not place this burden on the user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Business/Commerical Motivations ===&lt;br /&gt;
&lt;br /&gt;
*'''Study of Technology Insertion Techniques in HCI can be used to reduce errors'''. Ultimately, this means a company can avoid errors that result in the loss of time, money, morale, and other costly factors.&lt;br /&gt;
&lt;br /&gt;
*'''The costs of training, motivating, and maintaining humans far outweigh the costs of developing hardware and software interaction systems'''. Effective HCIs allow workers to overcome human limitations and work more productively.&lt;br /&gt;
&lt;br /&gt;
*'''Businesses can use HCI research as motivations for developing new business models'''. For example, in 2009 Microsoft announced plans for Natal, a peripheral for the Xbox 360 home gaming console that uses physical movement and gesture recognition to make the gaming controller obsolete. Furthermore, the business decision is that consumers would be able to get a cutting-edge interaction experience without having to spend upwards of $500 on a new console. By studying HCI and applying new interaction techniques, Microsoft stands to change the gaming business model in a way that reduces their marketing costs and satisfies customers. &amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Accessibility Concerns ===&lt;br /&gt;
&lt;br /&gt;
*'''Research in HCI must be done as a precautionary measure'''. A user may suffer from epilepsy or other complications arising from photosensitivity that can lead to convulsions, disorientation, and other harmful affects. Studies of refresh rates, jarring contrasts, allowable changes in brightness, and human vision concerns are necessary to avoid potentially harming the user. &lt;br /&gt;
&lt;br /&gt;
*'''The burden of communication is on the GUI.''' The application must be able to effectively communicate what actions are available to avoid misuse. This involves the study of regional languages, vision loss in the elderly, colourblindness, and how to accommodate other accessibility issues. Not only do these concepts need to be researched, but HCI's need to be studied to understand how to effectively integrate those accessability concerns into the system without introducing more confusion that could disrupt the system or harm the user. &lt;br /&gt;
&lt;br /&gt;
*'''A GUI is only as effective as the actions it is capable of performing'''. Studies of behavioural patterns, learning rates, and visual stimuli are needed to determine how users become more comfortable with the interface. By making an interface available to a variety of users with different levels of aptitude (novice, intermediate, expert) the interface becomes more useful in fulfilling its purpose. &amp;lt;sup&amp;gt;[4]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Quality Assurance of Software ===&lt;br /&gt;
&lt;br /&gt;
=== Development of Industry Standards ===&lt;br /&gt;
&lt;br /&gt;
== Human Factors ==&lt;br /&gt;
&lt;br /&gt;
Human Factors is an umbrella term for several areas of research. Motivation rises for the study of human factors that include [[Motivations for the Studying of HCI#Human Performance|human performance]], [[Motivations for the Studying of HCI#Technology Design|technology design]] and [[Motivations for the Studying of HCI#Human-Computer Interaction|Human-Computer Interaction (HCI)]]. Human factors is often used interchangeably with User Interface Design or Human-Computer Interaction.  &lt;br /&gt;
&lt;br /&gt;
The concept of human factors emerged during the industrial revolution and became a full-fledged discipline during World War II. &lt;br /&gt;
&lt;br /&gt;
Human factors recognized that aircraft cockpit design needed to consider the human interface for controls and displays.Design engineers focused on technology and the industrial psychologists worked to optimize the interface. There is a tremendous overlap in these disciplines. Human factors refer to hardware design and HCI is frequently used by the software engineers. Engineering psychologists work in both disciplines and the overlap is considered greater than the difference.&lt;br /&gt;
http://www.duke.edu/web/informatics/HF/HumanFactors.html&lt;br /&gt;
&lt;br /&gt;
Another example of this area of research occurs in the Human Factors Research and Technology Division at NASA Ames Research Center &amp;lt;sup&amp;gt;[4]&amp;lt;/sup&amp;gt;. This area  focuses on the need for safe, efficient and cost-effective operations, maintenance and training, both in flight aircrafts and on the ground.&lt;br /&gt;
&lt;br /&gt;
[[Image:Human_factors.jpg|frame|Human Factors|right|Hardware design promoting a healthy desktop environment.]]&lt;br /&gt;
&lt;br /&gt;
See below for further information on some specific subjects of human factors. &lt;br /&gt;
&lt;br /&gt;
===Human Performance===&lt;br /&gt;
&lt;br /&gt;
Human factors or HCI must consider integration of human mental abilities, i.e. short and long-term memory, visual scanning, and the development of mental cognitive models. HCI not only includes the specification, design, and development of systems, it must also include the actual training, skill levels, and organizational aspects of the end users. By considering these characteristics, data entry and understanding information technology becomes easier. HCI includes several areas that are paramount in the interaction of humans and machines. These areas include staffing, personnel, training, human factors engineering, and health risks, as well as managerial, public, and personal safety issues surrounding machines. Other issues that must be considered with HCI are the designs of language, entering methods, graphics, visual representation, and consistency of a system's look. Human factors is a comprehensive expression covering an assortment of areas speaking to the purpose of objects people use, from the scalpel to the computer within healthcare. &lt;br /&gt;
&lt;br /&gt;
=== Technology Design ===&lt;br /&gt;
=== Human-Computer Interaction ===&lt;br /&gt;
&lt;br /&gt;
== Ergonomics ==&lt;br /&gt;
===Definition:===&lt;br /&gt;
The term Ergonomics is derived from two Greek words Nomoi meaning natural laws and Ergon meaning work. Hence, ergonomists study human capabilities in relationship to work demands.&lt;br /&gt;
&lt;br /&gt;
===Principles of Ergonomics:===&lt;br /&gt;
There are '''10 basic''' principles:&lt;br /&gt;
&lt;br /&gt;
1. ''Work in Neutral Postures'': Your posture provides a good starting point for evaluating the tasks that you do. The best positions in which to work are those that keep the body &amp;quot;in neutral.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
2. ''Reduce Excessive Force'': Excessive force on your joints can create a potential for fatigue and injury.  In practical terms, the action item is for you to identify specific instances of excessive force and think of ways to make improvements.&lt;br /&gt;
&lt;br /&gt;
3. ''Keep Everything in Easy Reach'': The next principle deals with keeping things within easy reach.  In many ways, this principle is redundant with posture, but it helps to evaluate a task from this specific perspective.&lt;br /&gt;
[[Image:P19_Reach_for_mouse.jpg|thumb|alt=Puzzle globe logo|problems with reach are simply matters of rearranging your work area and moving things closer to you]]&lt;br /&gt;
&lt;br /&gt;
4. ''Work at Proper Heights'': Working at the right height is also a way to make things easier.&lt;br /&gt;
[[Image:P23_elbow_ht_typing.jpg|thumb|alt=Puzzle globe logo|A good rule of thumb is that most work should be done at about elbow height, whether sitting or standing.]]&lt;br /&gt;
&lt;br /&gt;
5. ''Reduce Excessive Motions'': The next principle to think about is the number of motions you make throughout a day, whether with your fingers, your wrists, your arms, or your back.&lt;br /&gt;
&lt;br /&gt;
6. ''Minimize Fatigue and Static Load'': Holding the same position for a period of time is known as static load. It creates fatigue and discomfort and can interfere with work.&lt;br /&gt;
&lt;br /&gt;
7. ''Minimize Pressure Points'': Another thing to watch out for is excessive pressure points, sometimes called &amp;quot;contact stress.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
8. ''Provide Clearance'': Having enough clearance is a concept that is easy to relate to.&lt;br /&gt;
&lt;br /&gt;
9. ''Move, Exercise, and Stretch'': To be healthy the human body needs to be exercised and stretched.&lt;br /&gt;
&lt;br /&gt;
10. ''Maintain a Comfortable Environment'': This principle is more or less a catch-all that can mean different things depending upon the nature of the types of operations that you do.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
this is [http://en.wikipedia.org/wiki/Fitts's_law Fitts's] law&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://www.duke.edu/web/informatics/HF/HF-ergonomics.html&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
:'''1.''' A brief history of human-computer interaction technology. ACM Interactions. http://portal.acm.org/citation.cfm?doid=274430.274436&lt;br /&gt;
&lt;br /&gt;
:'''2.''' Using while moving: HCI issues in fieldwork environments. ACM Transactions on Computer-Human Interaction (TOCHI) http://delivery.acm.org/10.1145/360000/355329/p417-pascoe.pdf?key1=355329&amp;amp;key2=2746298521&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=64390082&amp;amp;CFTOKEN=12638977&lt;br /&gt;
&lt;br /&gt;
:'''3.''' Reuters: Microsoft unveils new Xbox technology, enlists Facebook. http://www.reuters.com/article/internetNews/idUSTRE5506FO20090601&lt;br /&gt;
&lt;br /&gt;
:'''4.''' Poelman, S. (2009) Software Engineering 4D03/6D03/Computer Science 4HC3 Lecture Notes&lt;br /&gt;
&lt;br /&gt;
:'''5.''' Human Factors 101. http://human-factors.arc.nasa.gov/web/hf101/&lt;br /&gt;
&lt;br /&gt;
:'''6.''' Fitts's Law. http://en.wikipedia.org/wiki/Fitts's_law&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Motivations_for_the_Studies_of_HCI</id>
		<title>Motivations for the Studies of HCI</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Motivations_for_the_Studies_of_HCI"/>
				<updated>2009-11-23T06:56:28Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;/* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
As the capabilities of available technologies continue to grow, the technology itself becomes available to more types of user, each with different demands, goals, and needs. A good Human-Computer Interface (HCI) needs to address the limitations and needs of its user. In addition to meeting the needs of a growing and diverse user-base, research needs to be done in the field of HCI for computers to be accessible in mobile environments, to act as cost-saving measures, to ensure quality software development, and to address the health and safety of the user. These and other motivations elaborated below allow for engineers understand the subjective needs of the user.&lt;br /&gt;
&lt;br /&gt;
[[Image:Ergonomics.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Motivations ==&lt;br /&gt;
&lt;br /&gt;
=== Integration into Human Lifestyles ===&lt;br /&gt;
&lt;br /&gt;
*'''Users are not tolerant of poorly designed interfaces'''. Often users are susceptible to frustration, will not invest time in learning an unintuitive interface and will seek out a more suitable product or solution.&lt;br /&gt;
&lt;br /&gt;
*'''Consumers require products that are easy to learn and intuitive to navigate, especially as they are integrated into their daily lives'''. The best example of this is the innovation of the World Wide Web, which is considered to be the direct result of HCI research.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt; Especially in the mid 1990’s when the personal computer was not commonplace in the average North American home the way it is today, the idea of navigating over the web would be insurmountable to new users. HCI research, particularly related to direct manipulation led to the use of hyperlinks, making use of the internet accessible for new users.&lt;br /&gt;
&lt;br /&gt;
*'''The ways in which users adopt technology into their daily lives requires businesses to come up with interaction styles fitting to the context in which the technology is being used'''. Jobs require users to have access to computing resources away from their static desktop computer. For this reason, PDA’s, smart phones, and pocket PC’s have recently become commonplace in the business environment. New studies in HCI are required to make mobile interaction realistic so that the user is able to work just as effectively in a mobile environment. &amp;lt;sup&amp;gt;[2]&amp;lt;/sup&amp;gt;&lt;br /&gt;
*'''Training is expensive'''. Users should not have the responsibility of allocating time, money, and motivation to learning a new interaction style. A good interface as the result of HCI studies would not place this burden on the user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Business/Commerical Motivations ===&lt;br /&gt;
&lt;br /&gt;
*'''Study of Technology Insertion Techniques in HCI can be used to reduce errors'''. Ultimately, this means a company can avoid errors that result in the loss of time, money, morale, and other costly factors.&lt;br /&gt;
&lt;br /&gt;
*'''The costs of training, motivating, and maintaining humans far outweigh the costs of developing hardware and software interaction systems'''. Effective HCIs allow workers to overcome human limitations and work more productively.&lt;br /&gt;
&lt;br /&gt;
*'''Businesses can use HCI research as motivations for developing new business models'''. For example, in 2009 Microsoft announced plans for Natal, a peripheral for the Xbox 360 home gaming console that uses physical movement and gesture recognition to make the gaming controller obsolete. Furthermore, the business decision is that consumers would be able to get a cutting-edge interaction experience without having to spend upwards of $500 on a new console. By studying HCI and applying new interaction techniques, Microsoft stands to change the gaming business model in a way that reduces their marketing costs and satisfies customers. &amp;lt;sup&amp;gt;[3]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Accessibility Concerns ===&lt;br /&gt;
&lt;br /&gt;
*'''Research in HCI must be done as a precautionary measure'''. A user may suffer from epilepsy or other complications arising from photosensitivity that can lead to convulsions, disorientation, and other harmful affects. Studies of refresh rates, jarring contrasts, allowable changes in brightness, and human vision concerns are necessary to avoid potentially harming the user. &lt;br /&gt;
&lt;br /&gt;
*'''The burden of communication is on the GUI.''' The application must be able to effectively communicate what actions are available to avoid misuse. This involves the study of regional languages, vision loss in the elderly, colourblindness, and how to accommodate other accessibility issues. Not only do these concepts need to be researched, but HCI's need to be studied to understand how to effectively integrate those accessability concerns into the system without introducing more confusion that could disrupt the system or harm the user. &lt;br /&gt;
&lt;br /&gt;
*'''A GUI is only as effective as the actions it is capable of performing'''. Studies of behavioural patterns, learning rates, and visual stimuli are needed to determine how users become more comfortable with the interface. By making an interface available to a variety of users with different levels of aptitude (novice, intermediate, expert) the interface becomes more useful in fulfilling its purpose. &amp;lt;sup&amp;gt;[4]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Quality Assurance of Software ===&lt;br /&gt;
&lt;br /&gt;
=== Development of Industry Standards ===&lt;br /&gt;
&lt;br /&gt;
== Human Factors ==&lt;br /&gt;
&lt;br /&gt;
Human Factors is an umbrella term for several areas of research. Motivation rises for the study of human factors that include [[Motivations for the Studying of HCI#Human Performance|human performance]], [[Motivations for the Studying of HCI#Technology Design|technology design]] and [[Motivations for the Studying of HCI#Human-Computer Interaction|Human-Computer Interaction (HCI)]]. Human factors is often used interchangeably with User Interface Design or Human-Computer Interaction.  &lt;br /&gt;
&lt;br /&gt;
The concept of human factors emerged during the industrial revolution and became a full-fledged discipline during World War II. &lt;br /&gt;
&lt;br /&gt;
Human factors recognized that aircraft cockpit design needed to consider the human interface for controls and displays.Design engineers focused on technology and the industrial psychologists worked to optimize the interface. There is a tremendous overlap in these disciplines. Human factors refer to hardware design and HCI is frequently used by the software engineers. Engineering psychologists work in both disciplines and the overlap is considered greater than the difference.&lt;br /&gt;
http://www.duke.edu/web/informatics/HF/HumanFactors.html&lt;br /&gt;
&lt;br /&gt;
Another example of this area of research occurs in the Human Factors Research and Technology Division at NASA Ames Research Center &amp;lt;sup&amp;gt;[4]&amp;lt;/sup&amp;gt;. This area  focuses on the need for safe, efficient and cost-effective operations, maintenance and training, both in flight aircrafts and on the ground.&lt;br /&gt;
&lt;br /&gt;
[[Image:Human_factors.jpg|frame|Human Factors|right|Hardware design promoting a healthy desktop environment.]]&lt;br /&gt;
&lt;br /&gt;
See below for further information on some specific subjects of human factors. &lt;br /&gt;
&lt;br /&gt;
===Human Performance===&lt;br /&gt;
&lt;br /&gt;
Human factors or HCI must consider integration of human mental abilities, i.e. short and long-term memory, visual scanning, and the development of mental cognitive models. HCI not only includes the specification, design, and development of systems, it must also include the actual training, skill levels, and organizational aspects of the end users. By considering these characteristics, data entry and understanding information technology becomes easier. HCI includes several areas that are paramount in the interaction of humans and machines. These areas include staffing, personnel, training, human factors engineering, and health risks, as well as managerial, public, and personal safety issues surrounding machines. Other issues that must be considered with HCI are the designs of language, entering methods, graphics, visual representation, and consistency of a system's look. Human factors is a comprehensive expression covering an assortment of areas speaking to the purpose of objects people use, from the scalpel to the computer within healthcare. &lt;br /&gt;
&lt;br /&gt;
=== Technology Design ===&lt;br /&gt;
=== Human-Computer Interaction ===&lt;br /&gt;
&lt;br /&gt;
== Ergonomics ==&lt;br /&gt;
===Definition:===&lt;br /&gt;
The term Ergonomics is derived from two Greek words Nomoi meaning natural laws and Ergon meaning work. Hence, ergonomists study human capabilities in relationship to work demands.&lt;br /&gt;
&lt;br /&gt;
===Principles of Ergonomics:===&lt;br /&gt;
There are '''10 basic''' principles:&lt;br /&gt;
&lt;br /&gt;
1. ''Work in Neutral Postures'': Your posture provides a good starting point for evaluating the tasks that you do. The best positions in which to work are those that keep the body &amp;quot;in neutral.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
2. ''Reduce Excessive Force'': Excessive force on your joints can create a potential for fatigue and injury.  In practical terms, the action item is for you to identify specific instances of excessive force and think of ways to make improvements.&lt;br /&gt;
&lt;br /&gt;
3. ''Keep Everything in Easy Reach'': The next principle deals with keeping things within easy reach.  In many ways, this principle is redundant with posture, but it helps to evaluate a task from this specific perspective.&lt;br /&gt;
[[Image:P19_Reach_for_mouse.jpg|thumb|alt=Puzzle globe logo|problems with reach are simply matters of rearranging your work area and moving things closer to you]]&lt;br /&gt;
&lt;br /&gt;
4. ''Work at Proper Heights'': Working at the right height is also a way to make things easier.&lt;br /&gt;
[[Image:P23_elbow_ht_typing.jpg|thumb|alt=Puzzle globe logo|A good rule of thumb is that most work should be done at about elbow height, whether sitting or standing.]]&lt;br /&gt;
&lt;br /&gt;
5. ''Reduce Excessive Motions'': The next principle to think about is the number of motions you make throughout a day, whether with your fingers, your wrists, your arms, or your back.&lt;br /&gt;
&lt;br /&gt;
6. ''Minimize Fatigue and Static Load'': Holding the same position for a period of time is known as static load. It creates fatigue and discomfort and can interfere with work.&lt;br /&gt;
&lt;br /&gt;
7. ''Minimize Pressure Points'': Another thing to watch out for is excessive pressure points, sometimes called &amp;quot;contact stress.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
8. ''Provide Clearance'': Having enough clearance is a concept that is easy to relate to.&lt;br /&gt;
&lt;br /&gt;
9. ''Move, Exercise, and Stretch'': To be healthy the human body needs to be exercised and stretched.&lt;br /&gt;
&lt;br /&gt;
10. ''Maintain a Comfortable Environment'': This principle is more or less a catch-all that can mean different things depending upon the nature of the types of operations that you do.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
this is [http://en.wikipedia.org/wiki/Fitts's_law Fitts's] law&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://www.duke.edu/web/informatics/HF/HF-ergonomics.html&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
:'''1.''' A brief history of human-computer interaction technology. ACM Interactions. http://portal.acm.org/citation.cfm?doid=274430.274436&lt;br /&gt;
&lt;br /&gt;
:'''2.''' Using while moving: HCI issues in fieldwork environments. ACM Transactions on Computer-Human Interaction (TOCHI) http://delivery.acm.org/10.1145/360000/355329/p417-pascoe.pdf?key1=355329&amp;amp;key2=2746298521&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=64390082&amp;amp;CFTOKEN=12638977&lt;br /&gt;
&lt;br /&gt;
:'''3.''' Reuters: Microsoft unveils new Xbox technology, enlists Facebook. http://www.reuters.com/article/internetNews/idUSTRE5506FO20090601&lt;br /&gt;
&lt;br /&gt;
:'''4.''' Poelman, S. (2009) Software Engineering 4D03/6D03/Computer Science 4HC3 Lecture Notes&lt;br /&gt;
&lt;br /&gt;
:'''5.''' Human Factors 101. http://human-factors.arc.nasa.gov/web/hf101/&lt;br /&gt;
&lt;br /&gt;
:'''6.''' Fitts's Law. http://en.wikipedia.org/wiki/Fitts's_law&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/File:Ergonomics.jpg</id>
		<title>File:Ergonomics.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/File:Ergonomics.jpg"/>
				<updated>2009-11-23T06:55:31Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-12T03:51:58Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|thumb|Cryptography is Our Security|right|'''Cryptography is Our Security''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word [http://en.wikipedia.org/wiki/Cryptography cryptography] comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. [http://en.wikipedia.org/wiki/Cryptanalyst Cryptanalysis] is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;[http://en.wikipedia.org/wiki/Quintuple Quintuple] (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep [http://en.wikipedia.org/wiki/Enciphered enciphered] information secret. An [http://en.wikipedia.org/wiki/Adversary adversary] wishes to break a [http://en.wikipedia.org/wiki/Ciphertext ciphertext]. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the [http://en.wikipedia.org/wiki/Plaintext plaintext], but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or [http://en.wikipedia.org/wiki/Symmetric_cryptosystems symmetric cryptosystems]) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a [http://en.wikipedia.org/wiki/Caesar Caesar] cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|thumb|Casear Cipher Machine|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of [http://en.wikipedia.org/wiki/Roman_letters Roman letters] }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the [http://en.wikipedia.org/wiki/Period_of_the_cipher period of the cipher]. Because this requires several different key letters, this type of cipher is called [http://en.wikipedia.org/wiki/Polyalphabetic polyalphabetic].&lt;br /&gt;
[[Image:Vigenere.png|thumb|Vigenere Square Table|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the [http://www.cas.mcmaster.ca/wiki/index.php/Conventional_Encryption_Algorithms Vigenère] cipher was considered unbreakable. Then a Prussian cavalry officer named [http://en.wikipedia.org/wiki/Kasiski Kasiski] noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is [http://en.wikipedia.org/wiki/Bit-oriented bit-oriented], unlike the other ciphers we have seen. It uses both [http://en.wikipedia.org/wiki/Transposition_cipher transposition] and [http://en.wikipedia.org/wiki/Substitution_cipher substitution] &lt;br /&gt;
and for that reason is sometimes referred to as a [http://en.wikipedia.org/wiki/Product_cipher product cipher]. Its input, output, and key are each 64 bits long.&lt;br /&gt;
The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
1]Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
*Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
2] Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
*Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
*Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
3] Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
4] Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of [[Public_Key_Authentication]] that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment [http://en.wikipedia.org/wiki/Key_(cryptography) key] is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
[[Image:deffie.png|350px|right|Deffie example Diagram]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be &lt;br /&gt;
-kAlice = 5 and&lt;br /&gt;
-kBob   = 7.&lt;br /&gt;
Their [http://en.wikipedia.org/wiki/Public_key public keys] are&lt;br /&gt;
*KAlice = 175 mod 53 = 40 and &lt;br /&gt;
*KBob = 177 mod 53 = 6&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his &lt;br /&gt;
[http://en.wikipedia.org/wiki/Private_key private key]:&lt;br /&gt;
-SBob,Alice = KAlice&amp;lt;br&amp;gt;&lt;br /&gt;
*kBob mod p = 407 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as:&lt;br /&gt;
-SAlice,Bob = KBob&amp;lt;br&amp;gt;&lt;br /&gt;
*kAlice mod p = 65 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an [http://en.wikipedia.org/wiki/Exponentiation exponentiation cipher]. Choose two large [http://en.wikipedia.org/wiki/Prime_numbers prime numbers] p and q, and let n = pq. The totient(n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
The [http://en.wikipedia.org/wiki/Security security] of [http://www.cas.mcmaster.ca/wiki/index.php/Public_Key_Encryption_Algorithms RSA] is based on the difficulty of [http://en.wikipedia.org/wiki/Integer_factorization integer factorization]: Finding large primes and multiplying them together is easy. However, from the product to find the factors is hard. There is no known efficient general technique to solve this problem. &lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, [http://en.wikipedia.org/wiki/Totient totient](10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a [http://en.wikipedia.org/wiki/Checksum checksum]&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The [http://en.wikipedia.org/wiki/Parity_bit parity bit] in the [http://en.wikipedia.org/wiki/ASCII ASCII] representation is often used as a [http://en.wikipedia.org/wiki/Single-bit single-bit checksum]. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a [http://en.wikipedia.org/wiki/Generic generic] term for an algorithm that uses a keyless [http://en.wikipedia.org/wiki/Hash_function hash function] and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to [http://en.wikipedia.org/wiki/Conceal conceal information]. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and [http://en.wikipedia.org/w/index.php?title=Special%3ASearch&amp;amp;search=origin+authentication origin authentication] (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and [http://en.wikipedia.org/wiki/Permutation permutation] (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and [http://en.wikipedia.org/wiki/Linear_cryptanalysis linear cryptanalysis]. New public key ciphers use simple instances of [http://en.wikipedia.org/wiki/NP-hard NP-hard] problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;[http://en.wikipedia.org/wiki/Provable_security provable security].&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic [http://en.wikipedia.org/wiki/Protocol_(computing) protocols]. This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;references-small&amp;quot;&amp;gt;&lt;br /&gt;
* [[Ross Anderson|Ross J. Anderson]]: &amp;lt;cite&amp;gt;[http://www.cl.cam.ac.uk/~rja14/book.html Security Engineering: A Guide to Building Dependable Distributed Systems]&amp;lt;/cite&amp;gt;, ISBN 0-471-38922-6&lt;br /&gt;
* [[Morrie Gasser]]: [http://cs.unomaha.edu/~stanw/gasserbook.pdf &amp;lt;cite&amp;gt;Building a secure computer system&amp;lt;/cite&amp;gt;] ISBN 0-442-23022-2 1988&lt;br /&gt;
* [[Stephen Haag]], [[Maeve Cummings]], [[Donald McCubbrey]], [[Alain Pinsonneault]], [[Richard Donovan]]: &amp;lt;cite&amp;gt;Management Information Systems for the information age&amp;lt;/cite&amp;gt;, ISBN 0-07-091120-7&lt;br /&gt;
* [[E. Stewart Lee]]: [http://www.cl.cam.ac.uk/~mgk25/lee-essays.pdf &amp;lt;cite&amp;gt;Essays about Computer Security&amp;lt;/cite&amp;gt;] Cambridge, 1999&lt;br /&gt;
* [[Peter G. Neumann]]: [http://www.csl.sri.com/neumann/chats4.pdf &amp;lt;cite&amp;gt;Principled Assuredly Trustworthy Composable Architectures&amp;lt;/cite&amp;gt;] 2004&lt;br /&gt;
* [[Paul A. Karger]], [[Roger R. Schell]]: [http://www.acsac.org/2002/papers/classic-multics.pdf&amp;lt;cite&amp;gt;Thirty Years Later: Lessons from the Multics Security Evaluation&amp;lt;/cite&amp;gt;], IBM white paper.&lt;br /&gt;
* [[Robert C. Seacord]]: &amp;lt;cite&amp;gt;Secure Coding in C and C++&amp;lt;/cite&amp;gt;. Addison Wesley, September, 2005. ISBN 0-321-33572-4&lt;br /&gt;
* [[Clifford Stoll]]: &amp;lt;cite&amp;gt;Cuckoo's Egg: Tracking a Spy Through the Maze of Computer Espionage&amp;lt;/cite&amp;gt;, Pocket Books, ISBN 0-7434-1146-3&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
&lt;br /&gt;
* [[Conventional_Encryption_Algorithms]]&lt;br /&gt;
* [[Payment_Card_Industry_Data_Security_Standard]]&lt;br /&gt;
* [[Information_Security_References]]&lt;br /&gt;
* [[Security_and_Storage_Mediums]]&lt;br /&gt;
&lt;br /&gt;
=External Links=&lt;br /&gt;
&lt;br /&gt;
*[http://security.practitioner.com/introduction/ An Introduction to Information Security]&lt;br /&gt;
*[http://www.logicalsecurity.com/resources/resources_articles.html Introduction to Security Governance]&lt;br /&gt;
*[http://www.coesecurity.com/services/resources.asp COE Security - Information Security Articles]&lt;br /&gt;
*[http://www.davidstclair.co.uk/example-security-templates/example-internet-e-mail-usage-policy-2.html Example Security Policy]&lt;br /&gt;
*[http://www.iwar.org.uk/comsec/ IWS - Information Security Chapter]&lt;br /&gt;
*[http://www.issa.org/ Information Systems Security Association]&lt;br /&gt;
*[http://msdn2.microsoft.com/en-us/library/ms998382.aspx patterns &amp;amp; practices Security Engineering Explained]&lt;br /&gt;
*[http://www.opensecurityarchitecture.org Open Security Architecture- Controls and patterns to secure IT systems]&lt;br /&gt;
&lt;br /&gt;
--[[User:Katmehm|Katmehm]] 23:43, 11 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-12T03:48:43Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|Cryptography is Our Security|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word [http://en.wikipedia.org/wiki/Cryptography cryptography] comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. [http://en.wikipedia.org/wiki/Cryptanalyst Cryptanalysis] is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;[http://en.wikipedia.org/wiki/Quintuple Quintuple] (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep [http://en.wikipedia.org/wiki/Enciphered enciphered] information secret. An [http://en.wikipedia.org/wiki/Adversary adversary] wishes to break a [http://en.wikipedia.org/wiki/Ciphertext ciphertext]. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the [http://en.wikipedia.org/wiki/Plaintext plaintext], but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or [http://en.wikipedia.org/wiki/Symmetric_cryptosystems symmetric cryptosystems]) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a [http://en.wikipedia.org/wiki/Caesar Caesar] cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of [http://en.wikipedia.org/wiki/Roman_letters Roman letters] }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the [http://en.wikipedia.org/wiki/Period_of_the_cipher period of the cipher]. Because this requires several different key letters, this type of cipher is called [http://en.wikipedia.org/wiki/Polyalphabetic polyalphabetic].&lt;br /&gt;
[[Image:Vigenere.png|Vigenere Square Table|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the [http://www.cas.mcmaster.ca/wiki/index.php/Conventional_Encryption_Algorithms Vigenère] cipher was considered unbreakable. Then a Prussian cavalry officer named [http://en.wikipedia.org/wiki/Kasiski Kasiski] noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is [http://en.wikipedia.org/wiki/Bit-oriented bit-oriented], unlike the other ciphers we have seen. It uses both [http://en.wikipedia.org/wiki/Transposition_cipher transposition] and [http://en.wikipedia.org/wiki/Substitution_cipher substitution] &lt;br /&gt;
and for that reason is sometimes referred to as a [http://en.wikipedia.org/wiki/Product_cipher product cipher]. Its input, output, and key are each 64 bits long.&lt;br /&gt;
The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
1]Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
*Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
2] Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
*Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
*Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
3] Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
4] Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of [[Public_Key_Authentication]] that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment [http://en.wikipedia.org/wiki/Key_(cryptography) key] is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
[[Image:deffie.png|350px|right|Deffie example Diagram]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be &lt;br /&gt;
-kAlice = 5 and&lt;br /&gt;
-kBob   = 7.&lt;br /&gt;
Their [http://en.wikipedia.org/wiki/Public_key public keys] are&lt;br /&gt;
*KAlice = 175 mod 53 = 40 and &lt;br /&gt;
*KBob = 177 mod 53 = 6&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his &lt;br /&gt;
[http://en.wikipedia.org/wiki/Private_key private key]:&lt;br /&gt;
-SBob,Alice = KAlice&amp;lt;br&amp;gt;&lt;br /&gt;
*kBob mod p = 407 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as:&lt;br /&gt;
-SAlice,Bob = KBob&amp;lt;br&amp;gt;&lt;br /&gt;
*kAlice mod p = 65 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an [http://en.wikipedia.org/wiki/Exponentiation exponentiation cipher]. Choose two large [http://en.wikipedia.org/wiki/Prime_numbers prime numbers] p and q, and let n = pq. The totient(n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
The [http://en.wikipedia.org/wiki/Security security] of [http://www.cas.mcmaster.ca/wiki/index.php/Public_Key_Encryption_Algorithms RSA] is based on the difficulty of [http://en.wikipedia.org/wiki/Integer_factorization integer factorization]: Finding large primes and multiplying them together is easy. However, from the product to find the factors is hard. There is no known efficient general technique to solve this problem. &lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, [http://en.wikipedia.org/wiki/Totient totient](10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a [http://en.wikipedia.org/wiki/Checksum checksum]&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The [http://en.wikipedia.org/wiki/Parity_bit parity bit] in the [http://en.wikipedia.org/wiki/ASCII ASCII] representation is often used as a [http://en.wikipedia.org/wiki/Single-bit single-bit checksum]. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a [http://en.wikipedia.org/wiki/Generic generic] term for an algorithm that uses a keyless [http://en.wikipedia.org/wiki/Hash_function hash function] and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to [http://en.wikipedia.org/wiki/Conceal conceal information]. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and [http://en.wikipedia.org/w/index.php?title=Special%3ASearch&amp;amp;search=origin+authentication origin authentication] (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and [http://en.wikipedia.org/wiki/Permutation permutation] (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and [http://en.wikipedia.org/wiki/Linear_cryptanalysis linear cryptanalysis]. New public key ciphers use simple instances of [http://en.wikipedia.org/wiki/NP-hard NP-hard] problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;[http://en.wikipedia.org/wiki/Provable_security provable security].&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic [http://en.wikipedia.org/wiki/Protocol_(computing) protocols]. This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;references-small&amp;quot;&amp;gt;&lt;br /&gt;
* [[Ross Anderson|Ross J. Anderson]]: &amp;lt;cite&amp;gt;[http://www.cl.cam.ac.uk/~rja14/book.html Security Engineering: A Guide to Building Dependable Distributed Systems]&amp;lt;/cite&amp;gt;, ISBN 0-471-38922-6&lt;br /&gt;
* [[Morrie Gasser]]: [http://cs.unomaha.edu/~stanw/gasserbook.pdf &amp;lt;cite&amp;gt;Building a secure computer system&amp;lt;/cite&amp;gt;] ISBN 0-442-23022-2 1988&lt;br /&gt;
* [[Stephen Haag]], [[Maeve Cummings]], [[Donald McCubbrey]], [[Alain Pinsonneault]], [[Richard Donovan]]: &amp;lt;cite&amp;gt;Management Information Systems for the information age&amp;lt;/cite&amp;gt;, ISBN 0-07-091120-7&lt;br /&gt;
* [[E. Stewart Lee]]: [http://www.cl.cam.ac.uk/~mgk25/lee-essays.pdf &amp;lt;cite&amp;gt;Essays about Computer Security&amp;lt;/cite&amp;gt;] Cambridge, 1999&lt;br /&gt;
* [[Peter G. Neumann]]: [http://www.csl.sri.com/neumann/chats4.pdf &amp;lt;cite&amp;gt;Principled Assuredly Trustworthy Composable Architectures&amp;lt;/cite&amp;gt;] 2004&lt;br /&gt;
* [[Paul A. Karger]], [[Roger R. Schell]]: [http://www.acsac.org/2002/papers/classic-multics.pdf&amp;lt;cite&amp;gt;Thirty Years Later: Lessons from the Multics Security Evaluation&amp;lt;/cite&amp;gt;], IBM white paper.&lt;br /&gt;
* [[Robert C. Seacord]]: &amp;lt;cite&amp;gt;Secure Coding in C and C++&amp;lt;/cite&amp;gt;. Addison Wesley, September, 2005. ISBN 0-321-33572-4&lt;br /&gt;
* [[Clifford Stoll]]: &amp;lt;cite&amp;gt;Cuckoo's Egg: Tracking a Spy Through the Maze of Computer Espionage&amp;lt;/cite&amp;gt;, Pocket Books, ISBN 0-7434-1146-3&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
&lt;br /&gt;
* [[Conventional_Encryption_Algorithms]]&lt;br /&gt;
* [[Payment_Card_Industry_Data_Security_Standard]]&lt;br /&gt;
* [[Information_Security_References]]&lt;br /&gt;
* [[Security_and_Storage_Mediums]]&lt;br /&gt;
&lt;br /&gt;
=External Links=&lt;br /&gt;
&lt;br /&gt;
*[http://security.practitioner.com/introduction/ An Introduction to Information Security]&lt;br /&gt;
*[http://www.logicalsecurity.com/resources/resources_articles.html Introduction to Security Governance]&lt;br /&gt;
*[http://www.coesecurity.com/services/resources.asp COE Security - Information Security Articles]&lt;br /&gt;
*[http://www.davidstclair.co.uk/example-security-templates/example-internet-e-mail-usage-policy-2.html Example Security Policy]&lt;br /&gt;
*[http://www.iwar.org.uk/comsec/ IWS - Information Security Chapter]&lt;br /&gt;
*[http://www.issa.org/ Information Systems Security Association]&lt;br /&gt;
*[http://msdn2.microsoft.com/en-us/library/ms998382.aspx patterns &amp;amp; practices Security Engineering Explained]&lt;br /&gt;
*[http://www.opensecurityarchitecture.org Open Security Architecture- Controls and patterns to secure IT systems]&lt;br /&gt;
&lt;br /&gt;
--[[User:Katmehm|Katmehm]] 23:43, 11 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-12T03:45:57Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word [http://en.wikipedia.org/wiki/Cryptography cryptography] comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. [http://en.wikipedia.org/wiki/Cryptanalyst Cryptanalysis] is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;[http://en.wikipedia.org/wiki/Quintuple Quintuple] (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep [http://en.wikipedia.org/wiki/Enciphered enciphered] information secret. An [http://en.wikipedia.org/wiki/Adversary adversary] wishes to break a [http://en.wikipedia.org/wiki/Ciphertext ciphertext]. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the [http://en.wikipedia.org/wiki/Plaintext plaintext], but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or [http://en.wikipedia.org/wiki/Symmetric_cryptosystems symmetric cryptosystems]) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a [http://en.wikipedia.org/wiki/Caesar Caesar] cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of [http://en.wikipedia.org/wiki/Roman_letters Roman letters] }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the [http://en.wikipedia.org/wiki/Period_of_the_cipher period of the cipher]. Because this requires several different key letters, this type of cipher is called [http://en.wikipedia.org/wiki/Polyalphabetic polyalphabetic].&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square '''Vigenere Square Table]]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the [http://www.cas.mcmaster.ca/wiki/index.php/Conventional_Encryption_Algorithms Vigenère] cipher was considered unbreakable. Then a Prussian cavalry officer named [http://en.wikipedia.org/wiki/Kasiski Kasiski] noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is [http://en.wikipedia.org/wiki/Bit-oriented bit-oriented], unlike the other ciphers we have seen. It uses both [http://en.wikipedia.org/wiki/Transposition_cipher transposition] and [http://en.wikipedia.org/wiki/Substitution_cipher substitution] &lt;br /&gt;
and for that reason is sometimes referred to as a [http://en.wikipedia.org/wiki/Product_cipher product cipher]. Its input, output, and key are each 64 bits long.&lt;br /&gt;
The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
1]Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
*Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
2] Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
*Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
*Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
3] Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
4] Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of [[Public_Key_Authentication]] that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment [http://en.wikipedia.org/wiki/Key_(cryptography) key] is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
[[Image:deffie.png|350px|right|Deffie example Diagram]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be &lt;br /&gt;
-kAlice = 5 and&lt;br /&gt;
-kBob   = 7.&lt;br /&gt;
Their [http://en.wikipedia.org/wiki/Public_key public keys] are&lt;br /&gt;
*KAlice = 175 mod 53 = 40 and &lt;br /&gt;
*KBob = 177 mod 53 = 6&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his &lt;br /&gt;
[http://en.wikipedia.org/wiki/Private_key private key]:&lt;br /&gt;
-SBob,Alice = KAlice&amp;lt;br&amp;gt;&lt;br /&gt;
*kBob mod p = 407 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as:&lt;br /&gt;
-SAlice,Bob = KBob&amp;lt;br&amp;gt;&lt;br /&gt;
*kAlice mod p = 65 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an [http://en.wikipedia.org/wiki/Exponentiation exponentiation cipher]. Choose two large [http://en.wikipedia.org/wiki/Prime_numbers prime numbers] p and q, and let n = pq. The totient(n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
The [http://en.wikipedia.org/wiki/Security security] of [http://www.cas.mcmaster.ca/wiki/index.php/Public_Key_Encryption_Algorithms RSA] is based on the difficulty of [http://en.wikipedia.org/wiki/Integer_factorization integer factorization]: Finding large primes and multiplying them together is easy. However, from the product to find the factors is hard. There is no known efficient general technique to solve this problem. &lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, [http://en.wikipedia.org/wiki/Totient totient](10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a [http://en.wikipedia.org/wiki/Checksum checksum]&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The [http://en.wikipedia.org/wiki/Parity_bit parity bit] in the [http://en.wikipedia.org/wiki/ASCII ASCII] representation is often used as a [http://en.wikipedia.org/wiki/Single-bit single-bit checksum]. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a [http://en.wikipedia.org/wiki/Generic generic] term for an algorithm that uses a keyless [http://en.wikipedia.org/wiki/Hash_function hash function] and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to [http://en.wikipedia.org/wiki/Conceal conceal information]. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and [http://en.wikipedia.org/w/index.php?title=Special%3ASearch&amp;amp;search=origin+authentication origin authentication] (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and [http://en.wikipedia.org/wiki/Permutation permutation] (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and [http://en.wikipedia.org/wiki/Linear_cryptanalysis linear cryptanalysis]. New public key ciphers use simple instances of [http://en.wikipedia.org/wiki/NP-hard NP-hard] problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;[http://en.wikipedia.org/wiki/Provable_security provable security].&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic [http://en.wikipedia.org/wiki/Protocol_(computing) protocols]. This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;references-small&amp;quot;&amp;gt;&lt;br /&gt;
* [[Ross Anderson|Ross J. Anderson]]: &amp;lt;cite&amp;gt;[http://www.cl.cam.ac.uk/~rja14/book.html Security Engineering: A Guide to Building Dependable Distributed Systems]&amp;lt;/cite&amp;gt;, ISBN 0-471-38922-6&lt;br /&gt;
* [[Morrie Gasser]]: [http://cs.unomaha.edu/~stanw/gasserbook.pdf &amp;lt;cite&amp;gt;Building a secure computer system&amp;lt;/cite&amp;gt;] ISBN 0-442-23022-2 1988&lt;br /&gt;
* [[Stephen Haag]], [[Maeve Cummings]], [[Donald McCubbrey]], [[Alain Pinsonneault]], [[Richard Donovan]]: &amp;lt;cite&amp;gt;Management Information Systems for the information age&amp;lt;/cite&amp;gt;, ISBN 0-07-091120-7&lt;br /&gt;
* [[E. Stewart Lee]]: [http://www.cl.cam.ac.uk/~mgk25/lee-essays.pdf &amp;lt;cite&amp;gt;Essays about Computer Security&amp;lt;/cite&amp;gt;] Cambridge, 1999&lt;br /&gt;
* [[Peter G. Neumann]]: [http://www.csl.sri.com/neumann/chats4.pdf &amp;lt;cite&amp;gt;Principled Assuredly Trustworthy Composable Architectures&amp;lt;/cite&amp;gt;] 2004&lt;br /&gt;
* [[Paul A. Karger]], [[Roger R. Schell]]: [http://www.acsac.org/2002/papers/classic-multics.pdf&amp;lt;cite&amp;gt;Thirty Years Later: Lessons from the Multics Security Evaluation&amp;lt;/cite&amp;gt;], IBM white paper.&lt;br /&gt;
* [[Robert C. Seacord]]: &amp;lt;cite&amp;gt;Secure Coding in C and C++&amp;lt;/cite&amp;gt;. Addison Wesley, September, 2005. ISBN 0-321-33572-4&lt;br /&gt;
* [[Clifford Stoll]]: &amp;lt;cite&amp;gt;Cuckoo's Egg: Tracking a Spy Through the Maze of Computer Espionage&amp;lt;/cite&amp;gt;, Pocket Books, ISBN 0-7434-1146-3&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
&lt;br /&gt;
* [[Conventional_Encryption_Algorithms]]&lt;br /&gt;
* [[Payment_Card_Industry_Data_Security_Standard]]&lt;br /&gt;
* [[Information_Security_References]]&lt;br /&gt;
* [[Security_and_Storage_Mediums]]&lt;br /&gt;
&lt;br /&gt;
=External Links=&lt;br /&gt;
&lt;br /&gt;
*[http://security.practitioner.com/introduction/ An Introduction to Information Security]&lt;br /&gt;
*[http://www.logicalsecurity.com/resources/resources_articles.html Introduction to Security Governance]&lt;br /&gt;
*[http://www.coesecurity.com/services/resources.asp COE Security - Information Security Articles]&lt;br /&gt;
*[http://www.davidstclair.co.uk/example-security-templates/example-internet-e-mail-usage-policy-2.html Example Security Policy]&lt;br /&gt;
*[http://www.iwar.org.uk/comsec/ IWS - Information Security Chapter]&lt;br /&gt;
*[http://www.issa.org/ Information Systems Security Association]&lt;br /&gt;
*[http://msdn2.microsoft.com/en-us/library/ms998382.aspx patterns &amp;amp; practices Security Engineering Explained]&lt;br /&gt;
*[http://www.opensecurityarchitecture.org Open Security Architecture- Controls and patterns to secure IT systems]&lt;br /&gt;
&lt;br /&gt;
--[[User:Katmehm|Katmehm]] 23:43, 11 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-12T03:43:36Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word [http://en.wikipedia.org/wiki/Cryptography cryptography] comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. [http://en.wikipedia.org/wiki/Cryptanalyst Cryptanalysis] is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;[http://en.wikipedia.org/wiki/Quintuple Quintuple] (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep [http://en.wikipedia.org/wiki/Enciphered enciphered] information secret. An [http://en.wikipedia.org/wiki/Adversary adversary] wishes to break a [http://en.wikipedia.org/wiki/Ciphertext ciphertext]. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the [http://en.wikipedia.org/wiki/Plaintext plaintext], but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or [http://en.wikipedia.org/wiki/Symmetric_cryptosystems symmetric cryptosystems]) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a [http://en.wikipedia.org/wiki/Caesar Caesar] cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of [http://en.wikipedia.org/wiki/Roman_letters Roman letters] }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the [http://en.wikipedia.org/wiki/Period_of_the_cipher period of the cipher]. Because this requires several different key letters, this type of cipher is called [http://en.wikipedia.org/wiki/Polyalphabetic polyalphabetic].&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the [http://www.cas.mcmaster.ca/wiki/index.php/Conventional_Encryption_Algorithms Vigenère] cipher was considered unbreakable. Then a Prussian cavalry officer named [http://en.wikipedia.org/wiki/Kasiski Kasiski] noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is [http://en.wikipedia.org/wiki/Bit-oriented bit-oriented], unlike the other ciphers we have seen. It uses both [http://en.wikipedia.org/wiki/Transposition_cipher transposition] and [http://en.wikipedia.org/wiki/Substitution_cipher substitution] &lt;br /&gt;
and for that reason is sometimes referred to as a [http://en.wikipedia.org/wiki/Product_cipher product cipher]. Its input, output, and key are each 64 bits long.&lt;br /&gt;
The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
1]Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
*Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
2] Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
*Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
*Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
3] Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
4] Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of [[Public_Key_Authentication]] that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment [http://en.wikipedia.org/wiki/Key_(cryptography) key] is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
[[Image:deffie.png|350px|right|Deffie example Diagram]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be &lt;br /&gt;
-kAlice = 5 and&lt;br /&gt;
-kBob   = 7.&lt;br /&gt;
Their [http://en.wikipedia.org/wiki/Public_key public keys] are&lt;br /&gt;
*KAlice = 175 mod 53 = 40 and &lt;br /&gt;
*KBob = 177 mod 53 = 6&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his &lt;br /&gt;
[http://en.wikipedia.org/wiki/Private_key private key]:&lt;br /&gt;
-SBob,Alice = KAlice&amp;lt;br&amp;gt;&lt;br /&gt;
*kBob mod p = 407 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as:&lt;br /&gt;
-SAlice,Bob = KBob&amp;lt;br&amp;gt;&lt;br /&gt;
*kAlice mod p = 65 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an [http://en.wikipedia.org/wiki/Exponentiation exponentiation cipher]. Choose two large [http://en.wikipedia.org/wiki/Prime_numbers prime numbers] p and q, and let n = pq. The totient(n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
The [http://en.wikipedia.org/wiki/Security security] of [http://www.cas.mcmaster.ca/wiki/index.php/Public_Key_Encryption_Algorithms RSA] is based on the difficulty of [http://en.wikipedia.org/wiki/Integer_factorization integer factorization]: Finding large primes and multiplying them together is easy. However, from the product to find the factors is hard. There is no known efficient general technique to solve this problem. &lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, [http://en.wikipedia.org/wiki/Totient totient](10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a [http://en.wikipedia.org/wiki/Checksum checksum]&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The [http://en.wikipedia.org/wiki/Parity_bit parity bit] in the [http://en.wikipedia.org/wiki/ASCII ASCII] representation is often used as a [http://en.wikipedia.org/wiki/Single-bit single-bit checksum]. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a [http://en.wikipedia.org/wiki/Generic generic] term for an algorithm that uses a keyless [http://en.wikipedia.org/wiki/Hash_function hash function] and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to [http://en.wikipedia.org/wiki/Conceal conceal information]. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and [http://en.wikipedia.org/w/index.php?title=Special%3ASearch&amp;amp;search=origin+authentication origin authentication] (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and [http://en.wikipedia.org/wiki/Permutation permutation] (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and [http://en.wikipedia.org/wiki/Linear_cryptanalysis linear cryptanalysis]. New public key ciphers use simple instances of [http://en.wikipedia.org/wiki/NP-hard NP-hard] problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;[http://en.wikipedia.org/wiki/Provable_security provable security].&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic [http://en.wikipedia.org/wiki/Protocol_(computing) protocols]. This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;references-small&amp;quot;&amp;gt;&lt;br /&gt;
* [[Ross Anderson|Ross J. Anderson]]: &amp;lt;cite&amp;gt;[http://www.cl.cam.ac.uk/~rja14/book.html Security Engineering: A Guide to Building Dependable Distributed Systems]&amp;lt;/cite&amp;gt;, ISBN 0-471-38922-6&lt;br /&gt;
* [[Morrie Gasser]]: [http://cs.unomaha.edu/~stanw/gasserbook.pdf &amp;lt;cite&amp;gt;Building a secure computer system&amp;lt;/cite&amp;gt;] ISBN 0-442-23022-2 1988&lt;br /&gt;
* [[Stephen Haag]], [[Maeve Cummings]], [[Donald McCubbrey]], [[Alain Pinsonneault]], [[Richard Donovan]]: &amp;lt;cite&amp;gt;Management Information Systems for the information age&amp;lt;/cite&amp;gt;, ISBN 0-07-091120-7&lt;br /&gt;
* [[E. Stewart Lee]]: [http://www.cl.cam.ac.uk/~mgk25/lee-essays.pdf &amp;lt;cite&amp;gt;Essays about Computer Security&amp;lt;/cite&amp;gt;] Cambridge, 1999&lt;br /&gt;
* [[Peter G. Neumann]]: [http://www.csl.sri.com/neumann/chats4.pdf &amp;lt;cite&amp;gt;Principled Assuredly Trustworthy Composable Architectures&amp;lt;/cite&amp;gt;] 2004&lt;br /&gt;
* [[Paul A. Karger]], [[Roger R. Schell]]: [http://www.acsac.org/2002/papers/classic-multics.pdf&amp;lt;cite&amp;gt;Thirty Years Later: Lessons from the Multics Security Evaluation&amp;lt;/cite&amp;gt;], IBM white paper.&lt;br /&gt;
* [[Robert C. Seacord]]: &amp;lt;cite&amp;gt;Secure Coding in C and C++&amp;lt;/cite&amp;gt;. Addison Wesley, September, 2005. ISBN 0-321-33572-4&lt;br /&gt;
* [[Clifford Stoll]]: &amp;lt;cite&amp;gt;Cuckoo's Egg: Tracking a Spy Through the Maze of Computer Espionage&amp;lt;/cite&amp;gt;, Pocket Books, ISBN 0-7434-1146-3&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
&lt;br /&gt;
* [[Conventional_Encryption_Algorithms]]&lt;br /&gt;
* [[Payment_Card_Industry_Data_Security_Standard]]&lt;br /&gt;
* [[Information_Security_References]]&lt;br /&gt;
* [[Security_and_Storage_Mediums]]&lt;br /&gt;
&lt;br /&gt;
=External Links=&lt;br /&gt;
&lt;br /&gt;
*[http://security.practitioner.com/introduction/ An Introduction to Information Security]&lt;br /&gt;
*[http://www.logicalsecurity.com/resources/resources_articles.html Introduction to Security Governance]&lt;br /&gt;
*[http://www.coesecurity.com/services/resources.asp COE Security - Information Security Articles]&lt;br /&gt;
*[http://www.davidstclair.co.uk/example-security-templates/example-internet-e-mail-usage-policy-2.html Example Security Policy]&lt;br /&gt;
*[http://www.iwar.org.uk/comsec/ IWS - Information Security Chapter]&lt;br /&gt;
*[http://www.issa.org/ Information Systems Security Association]&lt;br /&gt;
*[http://msdn2.microsoft.com/en-us/library/ms998382.aspx patterns &amp;amp; practices Security Engineering Explained]&lt;br /&gt;
*[http://www.opensecurityarchitecture.org Open Security Architecture- Controls and patterns to secure IT systems]&lt;br /&gt;
&lt;br /&gt;
--[[User:Katmehm|Katmehm]] 23:43, 11 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-12T03:41:57Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word [http://en.wikipedia.org/wiki/Cryptography cryptography] comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. [http://en.wikipedia.org/wiki/Cryptanalyst Cryptanalysis] is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;[http://en.wikipedia.org/wiki/Quintuple Quintuple] (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep [http://en.wikipedia.org/wiki/Enciphered enciphered] information secret. An [http://en.wikipedia.org/wiki/Adversary adversary] wishes to break a [http://en.wikipedia.org/wiki/Ciphertext ciphertext]. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the [http://en.wikipedia.org/wiki/Plaintext plaintext], but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or [http://en.wikipedia.org/wiki/Symmetric_cryptosystems symmetric cryptosystems]) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a [http://en.wikipedia.org/wiki/Caesar Caesar] cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of [http://en.wikipedia.org/wiki/Roman_letters Roman letters] }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the [http://en.wikipedia.org/wiki/Period_of_the_cipher period of the cipher]. Because this requires several different key letters, this type of cipher is called [http://en.wikipedia.org/wiki/Polyalphabetic polyalphabetic].&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the [http://www.cas.mcmaster.ca/wiki/index.php/Conventional_Encryption_Algorithms Vigenère] cipher was considered unbreakable. Then a Prussian cavalry officer named [http://en.wikipedia.org/wiki/Kasiski Kasiski] noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is [http://en.wikipedia.org/wiki/Bit-oriented bit-oriented], unlike the other ciphers we have seen. It uses both [http://en.wikipedia.org/wiki/Transposition_cipher transposition] and [http://en.wikipedia.org/wiki/Substitution_cipher substitution] &lt;br /&gt;
and for that reason is sometimes referred to as a [http://en.wikipedia.org/wiki/Product_cipher product cipher]. Its input, output, and key are each 64 bits long.&lt;br /&gt;
The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
1]Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
*Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
2] Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
*Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
*Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
3] Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
4] Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of [[Public_Key_Authentication]] that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment [http://en.wikipedia.org/wiki/Key_(cryptography) key] is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
[[Image:deffie.png|350px|right|Deffie example Diagram]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be &lt;br /&gt;
-kAlice = 5 and&lt;br /&gt;
-kBob   = 7.&lt;br /&gt;
Their [http://en.wikipedia.org/wiki/Public_key public keys] are&lt;br /&gt;
*KAlice = 175 mod 53 = 40 and &lt;br /&gt;
*KBob = 177 mod 53 = 6&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his &lt;br /&gt;
[http://en.wikipedia.org/wiki/Private_key private key]:&lt;br /&gt;
-SBob,Alice = KAlice&amp;lt;br&amp;gt;&lt;br /&gt;
*kBob mod p = 407 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as:&lt;br /&gt;
-SAlice,Bob = KBob&amp;lt;br&amp;gt;&lt;br /&gt;
*kAlice mod p = 65 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an [http://en.wikipedia.org/wiki/Exponentiation exponentiation cipher]. Choose two large [http://en.wikipedia.org/wiki/Prime_numbers prime numbers] p and q, and let n = pq. The totient(n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
The [http://en.wikipedia.org/wiki/Security security] of [http://www.cas.mcmaster.ca/wiki/index.php/Public_Key_Encryption_Algorithms RSA] is based on the difficulty of [http://en.wikipedia.org/wiki/Integer_factorization integer factorization]: Finding large primes and multiplying them together is easy. However, from the product to find the factors is hard. There is no known efficient general technique to solve this problem. &lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, [http://en.wikipedia.org/wiki/Totient totient](10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a [http://en.wikipedia.org/wiki/Checksum checksum]&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The [http://en.wikipedia.org/wiki/Parity_bit parity bit] in the [http://en.wikipedia.org/wiki/ASCII ASCII] representation is often used as a [http://en.wikipedia.org/wiki/Single-bit single-bit checksum]. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a [http://en.wikipedia.org/wiki/Generic generic] term for an algorithm that uses a keyless [http://en.wikipedia.org/wiki/Hash_function hash function] and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to [http://en.wikipedia.org/wiki/Conceal conceal information]. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and [http://en.wikipedia.org/w/index.php?title=Special%3ASearch&amp;amp;search=origin+authentication origin authentication] (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and [http://en.wikipedia.org/wiki/Permutation permutation] (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and [http://en.wikipedia.org/wiki/Linear_cryptanalysis linear cryptanalysis]. New public key ciphers use simple instances of [http://en.wikipedia.org/wiki/NP-hard NP-hard] problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;[http://en.wikipedia.org/wiki/Provable_security provable security].&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic [http://en.wikipedia.org/wiki/Protocol_(computing) protocols]. This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;references-small&amp;quot;&amp;gt;&lt;br /&gt;
* [[Ross Anderson|Ross J. Anderson]]: &amp;lt;cite&amp;gt;[http://www.cl.cam.ac.uk/~rja14/book.html Security Engineering: A Guide to Building Dependable Distributed Systems]&amp;lt;/cite&amp;gt;, ISBN 0-471-38922-6&lt;br /&gt;
* [[Morrie Gasser]]: [http://cs.unomaha.edu/~stanw/gasserbook.pdf &amp;lt;cite&amp;gt;Building a secure computer system&amp;lt;/cite&amp;gt;] ISBN 0-442-23022-2 1988&lt;br /&gt;
* [[Stephen Haag]], [[Maeve Cummings]], [[Donald McCubbrey]], [[Alain Pinsonneault]], [[Richard Donovan]]: &amp;lt;cite&amp;gt;Management Information Systems for the information age&amp;lt;/cite&amp;gt;, ISBN 0-07-091120-7&lt;br /&gt;
* [[E. Stewart Lee]]: [http://www.cl.cam.ac.uk/~mgk25/lee-essays.pdf &amp;lt;cite&amp;gt;Essays about Computer Security&amp;lt;/cite&amp;gt;] Cambridge, 1999&lt;br /&gt;
* [[Peter G. Neumann]]: [http://www.csl.sri.com/neumann/chats4.pdf &amp;lt;cite&amp;gt;Principled Assuredly Trustworthy Composable Architectures&amp;lt;/cite&amp;gt;] 2004&lt;br /&gt;
* [[Paul A. Karger]], [[Roger R. Schell]]: [http://www.acsac.org/2002/papers/classic-multics.pdf&amp;lt;cite&amp;gt;Thirty Years Later: Lessons from the Multics Security Evaluation&amp;lt;/cite&amp;gt;], IBM white paper.&lt;br /&gt;
* [[Robert C. Seacord]]: &amp;lt;cite&amp;gt;Secure Coding in C and C++&amp;lt;/cite&amp;gt;. Addison Wesley, September, 2005. ISBN 0-321-33572-4&lt;br /&gt;
* [[Clifford Stoll]]: &amp;lt;cite&amp;gt;Cuckoo's Egg: Tracking a Spy Through the Maze of Computer Espionage&amp;lt;/cite&amp;gt;, Pocket Books, ISBN 0-7434-1146-3&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
&lt;br /&gt;
* [[Conventional_Encryption_Algorithms]]&lt;br /&gt;
* [[Payment_Card_Industry_Data_Security_Standard]]&lt;br /&gt;
* [[Information_Security_References]]&lt;br /&gt;
* [[Security_and_Storage_Mediums]]&lt;br /&gt;
&lt;br /&gt;
=External Links=&lt;br /&gt;
&lt;br /&gt;
*[http://security.practitioner.com/introduction/ An Introduction to Information Security]&lt;br /&gt;
*[http://www.logicalsecurity.com/resources/resources_articles.html Introduction to Security Governance]&lt;br /&gt;
*[http://www.coesecurity.com/services/resources.asp COE Security - Information Security Articles]&lt;br /&gt;
*[http://www.davidstclair.co.uk/example-security-templates/example-internet-e-mail-usage-policy-2.html Example Security Policy]&lt;br /&gt;
*[http://www.iwar.org.uk/comsec/ IWS - Information Security Chapter]&lt;br /&gt;
*[http://www.issa.org/ Information Systems Security Association]&lt;br /&gt;
*[http://msdn2.microsoft.com/en-us/library/ms998382.aspx patterns &amp;amp; practices Security Engineering Explained]&lt;br /&gt;
*[http://www.opensecurityarchitecture.org Open Security Architecture- Controls and patterns to secure IT systems]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-12T03:39:27Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word [http://en.wikipedia.org/wiki/Cryptography cryptography] comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. [http://en.wikipedia.org/wiki/Cryptanalyst Cryptanalysis] is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;[http://en.wikipedia.org/wiki/Quintuple Quintuple] (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep [http://en.wikipedia.org/wiki/Enciphered enciphered] information secret. An [http://en.wikipedia.org/wiki/Adversary adversary] wishes to break a [http://en.wikipedia.org/wiki/Ciphertext ciphertext]. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the [http://en.wikipedia.org/wiki/Plaintext plaintext], but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or [http://en.wikipedia.org/wiki/Symmetric_cryptosystems symmetric cryptosystems]) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a [http://en.wikipedia.org/wiki/Caesar Caesar] cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of [http://en.wikipedia.org/wiki/Roman_letters Roman letters] }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the [http://en.wikipedia.org/wiki/Period_of_the_cipher period of the cipher]. Because this requires several different key letters, this type of cipher is called [http://en.wikipedia.org/wiki/Polyalphabetic polyalphabetic].&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the [http://www.cas.mcmaster.ca/wiki/index.php/Conventional_Encryption_Algorithms Vigenère] cipher was considered unbreakable. Then a Prussian cavalry officer named [http://en.wikipedia.org/wiki/Kasiski Kasiski] noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is [http://en.wikipedia.org/wiki/Bit-oriented bit-oriented], unlike the other ciphers we have seen. It uses both [http://en.wikipedia.org/wiki/Transposition_cipher transposition] and [http://en.wikipedia.org/wiki/Substitution_cipher substitution] &lt;br /&gt;
and for that reason is sometimes referred to as a [http://en.wikipedia.org/wiki/Product_cipher product cipher]. Its input, output, and key are each 64 bits long.&lt;br /&gt;
The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
1]Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
*Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
2] Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
*Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
*Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
3] Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
4] Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of [[Public_Key_Authentication]] that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment [http://en.wikipedia.org/wiki/Key_(cryptography) key] is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
[[Image:deffie.png|350px|right|Deffie example Diagram]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be &lt;br /&gt;
-kAlice = 5 and&lt;br /&gt;
-kBob   = 7.&lt;br /&gt;
Their [http://en.wikipedia.org/wiki/Public_key public keys] are&lt;br /&gt;
*KAlice = 175 mod 53 = 40 and &lt;br /&gt;
*KBob = 177 mod 53 = 6&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his &lt;br /&gt;
[http://en.wikipedia.org/wiki/Private_key private key]:&lt;br /&gt;
-SBob,Alice = KAlice&amp;lt;br&amp;gt;&lt;br /&gt;
*kBob mod p = 407 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as:&lt;br /&gt;
-SAlice,Bob = KBob&amp;lt;br&amp;gt;&lt;br /&gt;
*kAlice mod p = 65 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an [http://en.wikipedia.org/wiki/Exponentiation exponentiation cipher]. Choose two large [http://en.wikipedia.org/wiki/Prime_numbers prime numbers] p and q, and let n = pq. The totient(n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
The [http://en.wikipedia.org/wiki/Security security] of [http://www.cas.mcmaster.ca/wiki/index.php/Public_Key_Encryption_Algorithms RSA] is based on the difficulty of [http://en.wikipedia.org/wiki/Integer_factorization integer factorization]: Finding large primes and multiplying them together is easy. However, from the product to find the factors is hard. There is no known efficient general technique to solve this problem. &lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, [http://en.wikipedia.org/wiki/Totient totient](10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a [http://en.wikipedia.org/wiki/Checksum checksum]&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The [http://en.wikipedia.org/wiki/Parity_bit parity bit] in the [http://en.wikipedia.org/wiki/ASCII ASCII] representation is often used as a [http://en.wikipedia.org/wiki/Single-bit single-bit checksum]. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a [http://en.wikipedia.org/wiki/Generic generic] term for an algorithm that uses a keyless [http://en.wikipedia.org/wiki/Hash_function hash function] and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to [http://en.wikipedia.org/wiki/Conceal conceal information]. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and [http://en.wikipedia.org/w/index.php?title=Special%3ASearch&amp;amp;search=origin+authentication origin authentication] (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and [http://en.wikipedia.org/wiki/Permutation permutation] (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and [http://en.wikipedia.org/wiki/Linear_cryptanalysis linear cryptanalysis]. New public key ciphers use simple instances of [http://en.wikipedia.org/wiki/NP-hard NP-hard] problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;[http://en.wikipedia.org/wiki/Provable_security provable security].&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic [http://en.wikipedia.org/wiki/Protocol_(computing) protocols]. This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
&lt;br /&gt;
* [[Conventional_Encryption_Algorithms]]&lt;br /&gt;
* [[Payment_Card_Industry_Data_Security_Standard]]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Information_security Information Security]&lt;br /&gt;
* [[Piggybacking]]&lt;br /&gt;
* [[Information_Security_References]]&lt;br /&gt;
* [[Security_and_Storage_Mediums]]&lt;br /&gt;
&lt;br /&gt;
=External Links=&lt;br /&gt;
&lt;br /&gt;
*[http://security.practitioner.com/introduction/ An Introduction to Information Security]&lt;br /&gt;
*[http://www.logicalsecurity.com/resources/resources_articles.html Introduction to Security Governance]&lt;br /&gt;
*[http://www.coesecurity.com/services/resources.asp COE Security - Information Security Articles]&lt;br /&gt;
*[http://www.davidstclair.co.uk/example-security-templates/example-internet-e-mail-usage-policy-2.html Example Security Policy]&lt;br /&gt;
*[http://www.iwar.org.uk/comsec/ IWS - Information Security Chapter]&lt;br /&gt;
*[http://www.issa.org/ Information Systems Security Association]&lt;br /&gt;
*[http://msdn2.microsoft.com/en-us/library/ms998382.aspx patterns &amp;amp; practices Security Engineering Explained]&lt;br /&gt;
*[http://www.opensecurityarchitecture.org Open Security Architecture- Controls and patterns to secure IT systems]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-12T03:33:52Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word [http://en.wikipedia.org/wiki/Cryptography cryptography] comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. [http://en.wikipedia.org/wiki/Cryptanalyst Cryptanalysis] is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;[http://en.wikipedia.org/wiki/Quintuple Quintuple] (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep [http://en.wikipedia.org/wiki/Enciphered enciphered] information secret. An [http://en.wikipedia.org/wiki/Adversary adversary] wishes to break a [http://en.wikipedia.org/wiki/Ciphertext ciphertext]. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the [http://en.wikipedia.org/wiki/Plaintext plaintext], but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or [http://en.wikipedia.org/wiki/Symmetric_cryptosystems symmetric cryptosystems]) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a [http://en.wikipedia.org/wiki/Caesar Caesar] cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of [http://en.wikipedia.org/wiki/Roman_letters Roman letters] }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the [http://en.wikipedia.org/wiki/Period_of_the_cipher period of the cipher]. Because this requires several different key letters, this type of cipher is called [http://en.wikipedia.org/wiki/Polyalphabetic polyalphabetic].&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the [http://www.cas.mcmaster.ca/wiki/index.php/Conventional_Encryption_Algorithms Vigenère] cipher was considered unbreakable. Then a Prussian cavalry officer named [http://en.wikipedia.org/wiki/Kasiski Kasiski] noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is [http://en.wikipedia.org/wiki/Bit-oriented bit-oriented], unlike the other ciphers we have seen. It uses both [http://en.wikipedia.org/wiki/Transposition_cipher transposition] and [http://en.wikipedia.org/wiki/Substitution_cipher substitution] &lt;br /&gt;
and for that reason is sometimes referred to as a [http://en.wikipedia.org/wiki/Product_cipher product cipher]. Its input, output, and key are each 64 bits long.&lt;br /&gt;
The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
1]Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
*Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
2] Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
*Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
*Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
3] Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
4] Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of [[Public_Key_Authentication]] that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment [http://en.wikipedia.org/wiki/Key_(cryptography) key] is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
[[Image:deffie.png|350px|right|Deffie example Diagram]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be &lt;br /&gt;
-kAlice = 5 and&lt;br /&gt;
-kBob   = 7.&lt;br /&gt;
Their [http://en.wikipedia.org/wiki/Public_key public keys] are&lt;br /&gt;
*KAlice = 175 mod 53 = 40 and &lt;br /&gt;
*KBob = 177 mod 53 = 6&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his &lt;br /&gt;
[http://en.wikipedia.org/wiki/Private_key private key]:&lt;br /&gt;
-SBob,Alice = KAlice&amp;lt;br&amp;gt;&lt;br /&gt;
*kBob mod p = 407 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as:&lt;br /&gt;
-SAlice,Bob = KBob&amp;lt;br&amp;gt;&lt;br /&gt;
*kAlice mod p = 65 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an [http://en.wikipedia.org/wiki/Exponentiation exponentiation cipher]. Choose two large [http://en.wikipedia.org/wiki/Prime_numbers prime numbers] p and q, and let n = pq. The totient(n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
The [http://en.wikipedia.org/wiki/Security security] of [http://www.cas.mcmaster.ca/wiki/index.php/Public_Key_Encryption_Algorithms RSA] is based on the difficulty of [http://en.wikipedia.org/wiki/Integer_factorization integer factorization]: Finding large primes and multiplying them together is easy. However, from the product to find the factors is hard. There is no known efficient general technique to solve this problem. &lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, [http://en.wikipedia.org/wiki/Totient totient](10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a [http://en.wikipedia.org/wiki/Checksum checksum]&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The [http://en.wikipedia.org/wiki/Parity_bit parity bit] in the [http://en.wikipedia.org/wiki/ASCII ASCII] representation is often used as a [http://en.wikipedia.org/wiki/Single-bit single-bit checksum]. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a [http://en.wikipedia.org/wiki/Generic generic] term for an algorithm that uses a keyless [http://en.wikipedia.org/wiki/Hash_function hash function] and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to [http://en.wikipedia.org/wiki/Conceal conceal information]. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and [http://en.wikipedia.org/w/index.php?title=Special%3ASearch&amp;amp;search=origin+authentication origin authentication] (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and [http://en.wikipedia.org/wiki/Permutation permutation] (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and [http://en.wikipedia.org/wiki/Linear_cryptanalysis linear cryptanalysis]. New public key ciphers use simple instances of [http://en.wikipedia.org/wiki/NP-hard NP-hard] problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;[http://en.wikipedia.org/wiki/Provable_security provable security].&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic [http://en.wikipedia.org/wiki/Protocol_(computing) protocols]. This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
* [[Conventional_Encryption_Algorithms]]&lt;br /&gt;
* [[Piggybacking]]&lt;br /&gt;
=External Links=&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-12T03:30:36Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word [http://en.wikipedia.org/wiki/Cryptography cryptography] comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. [http://en.wikipedia.org/wiki/Cryptanalyst Cryptanalysis] is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;[http://en.wikipedia.org/wiki/Quintuple Quintuple] (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep [http://en.wikipedia.org/wiki/Enciphered enciphered] information secret. An [http://en.wikipedia.org/wiki/Adversary adversary] wishes to break a [http://en.wikipedia.org/wiki/Ciphertext ciphertext]. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the [http://en.wikipedia.org/wiki/Plaintext plaintext], but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or [http://en.wikipedia.org/wiki/Symmetric_cryptosystems symmetric cryptosystems]) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a [http://en.wikipedia.org/wiki/Caesar Caesar] cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of [http://en.wikipedia.org/wiki/Roman_letters Roman letters] }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the [http://en.wikipedia.org/wiki/Period_of_the_cipher period of the cipher]. Because this requires several different key letters, this type of cipher is called [http://en.wikipedia.org/wiki/Polyalphabetic polyalphabetic].&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows:&lt;br /&gt;
Key    &amp;lt;br&amp;gt;B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the [http://www.cas.mcmaster.ca/wiki/index.php/Conventional_Encryption_Algorithms Vigenère] cipher was considered unbreakable. Then a Prussian cavalry officer named [http://en.wikipedia.org/wiki/Kasiski Kasiski] noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is [http://en.wikipedia.org/wiki/Bit-oriented bit-oriented], unlike the other ciphers we have seen. It uses both [http://en.wikipedia.org/wiki/Transposition_cipher transposition] and [http://en.wikipedia.org/wiki/Substitution_cipher substitution] &lt;br /&gt;
and for that reason is sometimes referred to as a [http://en.wikipedia.org/wiki/Product_cipher product cipher]. Its input, output, and key are each 64 bits long.&lt;br /&gt;
The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
1]Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
*Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
2] Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
*Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
*Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
3] Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
4] Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of [[Public_Key_Authentication]] that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment [http://en.wikipedia.org/wiki/Key_(cryptography) key] is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
[[Image:deffie.png|350px|right|Deffie example Diagram]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be &lt;br /&gt;
-kAlice = 5 and&lt;br /&gt;
-kBob   = 7.&lt;br /&gt;
Their [http://en.wikipedia.org/wiki/Public_key public keys] are&lt;br /&gt;
*KAlice = 175 mod 53 = 40 and &lt;br /&gt;
*KBob = 177 mod 53 = 6&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his &lt;br /&gt;
[http://en.wikipedia.org/wiki/Private_key private key]:&lt;br /&gt;
-SBob,Alice = KAlice&amp;lt;br&amp;gt;&lt;br /&gt;
*kBob mod p = 407 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as:&lt;br /&gt;
-SAlice,Bob = KBob&amp;lt;br&amp;gt;&lt;br /&gt;
*kAlice mod p = 65 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an [http://en.wikipedia.org/wiki/Exponentiation exponentiation cipher]. Choose two large [http://en.wikipedia.org/wiki/Prime_numbers prime numbers] p and q, and let n = pq. The totient(n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
The [http://en.wikipedia.org/wiki/Security security] of [http://www.cas.mcmaster.ca/wiki/index.php/Public_Key_Encryption_Algorithms RSA] is based on the difficulty of [http://en.wikipedia.org/wiki/Integer_factorization integer factorization]: Finding large primes and multiplying them together is easy. However, from the product to find the factors is hard. There is no known efficient general technique to solve this problem. &lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, [http://en.wikipedia.org/wiki/Totient totient](10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a [http://en.wikipedia.org/wiki/Checksum checksum]&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The [http://en.wikipedia.org/wiki/Parity_bit parity bit] in the [http://en.wikipedia.org/wiki/ASCII ASCII] representation is often used as a [http://en.wikipedia.org/wiki/Single-bit single-bit checksum]. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a [http://en.wikipedia.org/wiki/Generic generic] term for an algorithm that uses a keyless [http://en.wikipedia.org/wiki/Hash_function hash function] and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to [http://en.wikipedia.org/wiki/Conceal conceal information]. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and [http://en.wikipedia.org/w/index.php?title=Special%3ASearch&amp;amp;search=origin+authentication origin authentication] (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and [http://en.wikipedia.org/wiki/Permutation permutation] (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and [http://en.wikipedia.org/wiki/Linear_cryptanalysis linear cryptanalysis]. New public key ciphers use simple instances of [http://en.wikipedia.org/wiki/NP-hard NP-hard] problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;[http://en.wikipedia.org/wiki/Provable_security provable security].&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic [http://en.wikipedia.org/wiki/Protocol_(computing) protocols]. This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
&lt;br /&gt;
=External Links=&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-12T03:28:43Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word [http://en.wikipedia.org/wiki/Cryptography cryptography] comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. [http://en.wikipedia.org/wiki/Cryptanalyst Cryptanalysis] is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;[http://en.wikipedia.org/wiki/Quintuple Quintuple] (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep [http://en.wikipedia.org/wiki/Enciphered enciphered] information secret. An [http://en.wikipedia.org/wiki/Adversary adversary] wishes to break a [http://en.wikipedia.org/wiki/Ciphertext ciphertext]. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the [http://en.wikipedia.org/wiki/Plaintext plaintext], but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or [http://en.wikipedia.org/wiki/Symmetric_cryptosystems symmetric cryptosystems]) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a [http://en.wikipedia.org/wiki/Caesar Caesar] cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of [http://en.wikipedia.org/wiki/Roman_letters Roman letters] }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the [http://en.wikipedia.org/wiki/Period_of_the_cipher period of the cipher]. Because this requires several different key letters, this type of cipher is called [http://en.wikipedia.org/wiki/Polyalphabetic polyalphabetic].&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the [http://www.cas.mcmaster.ca/wiki/index.php/Conventional_Encryption_Algorithms Vigenère] cipher was considered unbreakable. Then a Prussian cavalry officer named [http://en.wikipedia.org/wiki/Kasiski Kasiski] noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is [http://en.wikipedia.org/wiki/Bit-oriented bit-oriented], unlike the other ciphers we have seen. It uses both [http://en.wikipedia.org/wiki/Transposition_cipher transposition] and [http://en.wikipedia.org/wiki/Substitution_cipher substitution] &lt;br /&gt;
and for that reason is sometimes referred to as a [http://en.wikipedia.org/wiki/Product_cipher product cipher]. Its input, output, and key are each 64 bits long.&lt;br /&gt;
The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
1]Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
*Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
2] Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
*Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
*Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
3] Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
4] Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of [[Public_Key_Authentication]] that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment [http://en.wikipedia.org/wiki/Key_(cryptography) key] is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
[[Image:deffie.png|350px|right|Deffie example Diagram]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be &lt;br /&gt;
-kAlice = 5 and&lt;br /&gt;
-kBob   = 7.&lt;br /&gt;
Their [http://en.wikipedia.org/wiki/Public_key public keys] are&lt;br /&gt;
*KAlice = 175 mod 53 = 40 and &lt;br /&gt;
*KBob = 177 mod 53 = 6&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his &lt;br /&gt;
[http://en.wikipedia.org/wiki/Private_key private key]:&lt;br /&gt;
-SBob,Alice = KAlice&amp;lt;br&amp;gt;&lt;br /&gt;
*kBob mod p = 407 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as:&lt;br /&gt;
-SAlice,Bob = KBob&amp;lt;br&amp;gt;&lt;br /&gt;
*kAlice mod p = 65 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an [http://en.wikipedia.org/wiki/Exponentiation exponentiation cipher]. Choose two large [http://en.wikipedia.org/wiki/Prime_numbers prime numbers] p and q, and let n = pq. The totient(n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
The [http://en.wikipedia.org/wiki/Security security] of [http://www.cas.mcmaster.ca/wiki/index.php/Public_Key_Encryption_Algorithms RSA] is based on the difficulty of [http://en.wikipedia.org/wiki/Integer_factorization integer factorization]: Finding large primes and multiplying them together is easy. However, from the product to find the factors is hard. There is no known efficient general technique to solve this problem. &lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, [http://en.wikipedia.org/wiki/Totient totient](10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a [http://en.wikipedia.org/wiki/Checksum checksum]&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The [http://en.wikipedia.org/wiki/Parity_bit parity bit] in the [http://en.wikipedia.org/wiki/ASCII ASCII] representation is often used as a [http://en.wikipedia.org/wiki/Single-bit single-bit checksum]. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a [http://en.wikipedia.org/wiki/Generic generic] term for an algorithm that uses a keyless [http://en.wikipedia.org/wiki/Hash_function hash function] and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to [http://en.wikipedia.org/wiki/Conceal conceal information]. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and [http://en.wikipedia.org/w/index.php?title=Special%3ASearch&amp;amp;search=origin+authentication origin authentication] (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and [http://en.wikipedia.org/wiki/Permutation permutation] (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and [http://en.wikipedia.org/wiki/Linear_cryptanalysis linear cryptanalysis]. New public key ciphers use simple instances of [http://en.wikipedia.org/wiki/NP-hard NP-hard] problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;[http://en.wikipedia.org/wiki/Provable_security provable security].&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic [http://en.wikipedia.org/wiki/Protocol_(computing) protocols]. This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
&lt;br /&gt;
=External Links=&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-12T03:27:08Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word [http://en.wikipedia.org/wiki/Cryptography cryptography] comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. [http://en.wikipedia.org/wiki/Cryptanalyst Cryptanalysis] is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;[http://en.wikipedia.org/wiki/Quintuple Quintuple] (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep [http://en.wikipedia.org/wiki/Enciphered enciphered] information secret. An [http://en.wikipedia.org/wiki/Adversary adversary] wishes to break a [http://en.wikipedia.org/wiki/Ciphertext ciphertext]. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the [http://en.wikipedia.org/wiki/Plaintext plaintext], but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or [http://en.wikipedia.org/wiki/Symmetric_cryptosystems symmetric cryptosystems]) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a [http://en.wikipedia.org/wiki/Caesar Caesar] cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of [http://en.wikipedia.org/wiki/Roman_letters Roman letters] }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the [http://en.wikipedia.org/wiki/Period_of_the_cipher period of the cipher]. Because this requires several different key letters, this type of cipher is called [http://en.wikipedia.org/wiki/Polyalphabetic polyalphabetic].&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the [http://www.cas.mcmaster.ca/wiki/index.php/Conventional_Encryption_Algorithms Vigenère] cipher was considered unbreakable. Then a Prussian cavalry officer named [http://en.wikipedia.org/wiki/Kasiski Kasiski] noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is [http://en.wikipedia.org/wiki/Bit-oriented bit-oriented], unlike the other ciphers we have seen. It uses both [http://en.wikipedia.org/wiki/Transposition_cipher transposition] and [http://en.wikipedia.org/wiki/Substitution_cipher substitution] &lt;br /&gt;
and for that reason is sometimes referred to as a [http://en.wikipedia.org/wiki/Product_cipher product cipher]. Its input, output, and key are each 64 bits long.&lt;br /&gt;
The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
1]Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
*Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
2] Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
*Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
*Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
3] Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
4] Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of [[Public_Key_Authentication]] that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment [http://en.wikipedia.org/wiki/Key_(cryptography) key] is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
[[Image:deffie.png|350px|right|Deffie example Diagram]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be &lt;br /&gt;
-kAlice = 5 and&lt;br /&gt;
-kBob   = 7.&lt;br /&gt;
Their [http://en.wikipedia.org/wiki/Public_key public keys] are&lt;br /&gt;
*KAlice = 175 mod 53 = 40 and &lt;br /&gt;
*KBob = 177 mod 53 = 6&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his &lt;br /&gt;
[http://en.wikipedia.org/wiki/Private_key private key]:&lt;br /&gt;
-SBob,Alice = KAlice&amp;lt;br&amp;gt;&lt;br /&gt;
*kBob mod p = 407 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as:&lt;br /&gt;
-SAlice,Bob = KBob&amp;lt;br&amp;gt;&lt;br /&gt;
*kAlice mod p = 65 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an [http://en.wikipedia.org/wiki/Exponentiation exponentiation cipher]. Choose two large [http://en.wikipedia.org/wiki/Prime_numbers prime numbers] p and q, and let n = pq. The totient(n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
The [http://en.wikipedia.org/wiki/Security security] of [http://www.cas.mcmaster.ca/wiki/index.php/Public_Key_Encryption_Algorithms RSA] is based on the difficulty of [http://en.wikipedia.org/wiki/Integer_factorization integer factorization]: Finding large primes and multiplying them together is easy. However, from the product to find the factors is hard. There is no known efficient general technique to solve this problem. &lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, [http://en.wikipedia.org/wiki/Totient totient](10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a [http://en.wikipedia.org/wiki/Checksum checksum]&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The [http://en.wikipedia.org/wiki/Parity_bit parity bit] in the [http://en.wikipedia.org/wiki/ASCII ASCII] representation is often used as a [http://en.wikipedia.org/wiki/Single-bit single-bit checksum]. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a [http://en.wikipedia.org/wiki/Generic generic] term for an algorithm that uses a keyless [http://en.wikipedia.org/wiki/Hash_function hash function] and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to [http://en.wikipedia.org/wiki/Conceal conceal information]. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and [http://en.wikipedia.org/w/index.php?title=Special%3ASearch&amp;amp;search=origin+authentication origin authentication] (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and [http://en.wikipedia.org/wiki/Permutation permutation] (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and [http://en.wikipedia.org/wiki/Linear_cryptanalysis linear cryptanalysis]. New public key ciphers use simple instances of [http://en.wikipedia.org/wiki/NP-hard NP-hard] problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;[http://en.wikipedia.org/wiki/Provable_security provable security].&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic [http://en.wikipedia.org/wiki/Protocol_(computing) protocols]. This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-12T03:12:36Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word [http://en.wikipedia.org/wiki/Cryptography cryptography] comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. [http://en.wikipedia.org/wiki/Cryptanalyst Cryptanalysis] is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;[http://en.wikipedia.org/wiki/Quintuple Quintuple] (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep [http://en.wikipedia.org/wiki/Enciphered enciphered] information secret. An [http://en.wikipedia.org/wiki/Adversary adversary] wishes to break a [http://en.wikipedia.org/wiki/Ciphertext ciphertext]. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the [http://en.wikipedia.org/wiki/Plaintext plaintext], but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or [http://en.wikipedia.org/wiki/Symmetric_cryptosystems symmetric cryptosystems]) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a [http://en.wikipedia.org/wiki/Caesar Caesar] cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of [http://en.wikipedia.org/wiki/Roman_letters Roman letters] }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the [http://en.wikipedia.org/wiki/Period_of_the_cipher period of the cipher]. Because this requires several different key letters, this type of cipher is called [http://en.wikipedia.org/wiki/Polyalphabetic polyalphabetic].&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the [http://www.cas.mcmaster.ca/wiki/index.php/Conventional_Encryption_Algorithms Vigenère] cipher was considered unbreakable. Then a Prussian cavalry officer named [http://en.wikipedia.org/wiki/Kasiski Kasiski] noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is [http://en.wikipedia.org/wiki/Bit-oriented bit-oriented], unlike the other ciphers we have seen. It uses both [ http://en.wikipedia.org/wiki/Transposition_cipher transposition] and [http://en.wikipedia.org/wiki/Substitution_cipher substitution] &lt;br /&gt;
and for that reason is sometimes referred to as a [http://en.wikipedia.org/wiki/Product_cipher product cipher]. Its input, output, and key are each 64 bits long.&lt;br /&gt;
The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
1]Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
*Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
2] Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
*Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
*Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
3] Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
4] Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of [[Public_Key_Authentication]] that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
[[Image:deffie.png|350px|right|Deffie example Diagram]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be &lt;br /&gt;
-kAlice = 5 and&lt;br /&gt;
-kBob   = 7.&lt;br /&gt;
Their public keys are&lt;br /&gt;
*KAlice = 175 mod 53 = 40 and &lt;br /&gt;
*KBob = 177 mod 53 = 6&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his &lt;br /&gt;
private key:&lt;br /&gt;
-SBob,Alice = KAlice&amp;lt;br&amp;gt;&lt;br /&gt;
*kBob mod p = 407 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as:&lt;br /&gt;
-SAlice,Bob = KBob&amp;lt;br&amp;gt;&lt;br /&gt;
*kAlice mod p = 65 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient(n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
The security of [http://www.cas.mcmaster.ca/wiki/index.php/Public_Key_Encryption_Algorithms RSA] is based on the difficulty of integer factorization: Finding large primes and multiplying them together is easy. However, from the product to find the factors is hard. There is no known efficient general technique to solve this problem. &lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, [http://en.wikipedia.org/wiki/Totient totient](10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-12T03:04:05Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word [http://en.wikipedia.org/wiki/Cryptography cryptography] comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. [http://en.wikipedia.org/wiki/Cryptanalyst Cryptanalysis] is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;[http://en.wikipedia.org/wiki/Quintuple Quintuple] (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep [http://en.wikipedia.org/wiki/Enciphered enciphered] information secret. An [http://en.wikipedia.org/wiki/Adversary adversary] wishes to break a [http://en.wikipedia.org/wiki/Ciphertext ciphertext]. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the [http://en.wikipedia.org/wiki/Plaintext plaintext], but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or [http://en.wikipedia.org/wiki/Symmetric_cryptosystems symmetric cryptosystems]) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a [http://en.wikipedia.org/wiki/Caesar Caesar] cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of [http://en.wikipedia.org/wiki/Roman_letters Roman letters] }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the [http://en.wikipedia.org/wiki/Period_of_the_cipher period of the cipher]. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the [[http://www.cas.mcmaster.ca/wiki/index.php/Conventional_Encryption_Algorithms Vigenère]] cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution &lt;br /&gt;
and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long.&lt;br /&gt;
The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
1]Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
*Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
2] Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
*Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
*Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
3] Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
4] Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
[[Image:deffie.png|350px|right|Deffie example Diagram]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be &lt;br /&gt;
-kAlice = 5 and&lt;br /&gt;
-kBob   = 7.&lt;br /&gt;
Their public keys are&lt;br /&gt;
*KAlice = 175 mod 53 = 40 and &lt;br /&gt;
*KBob = 177 mod 53 = 6&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his &lt;br /&gt;
private key:&lt;br /&gt;
-SBob,Alice = KAlice&amp;lt;br&amp;gt;&lt;br /&gt;
*kBob mod p = 407 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as:&lt;br /&gt;
-SAlice,Bob = KBob&amp;lt;br&amp;gt;&lt;br /&gt;
*kAlice mod p = 65 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient(n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
The security of [http://www.cas.mcmaster.ca/wiki/index.php/Public_Key_Encryption_Algorithms RSA] is based on the difficulty of integer factorization: Finding large primes and multiplying them together is easy. However, from the product to find the factors is hard. There is no known efficient general technique to solve this problem. &lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, [http://en.wikipedia.org/wiki/Totient totient](10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-12T02:57:58Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word [http://en.wikipedia.org/wiki/Cryptography cryptography] comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. [http://en.wikipedia.org/wiki/Cryptanalyst Cryptanalysis] is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;[http://en.wikipedia.org/wiki/Quintuple Quintuple] (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An [http://en.wikipedia.org/wiki/Adversary adversary] wishes to break a [http://en.wikipedia.org/wiki/Ciphertext ciphertext]. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the [http://en.wikipedia.org/wiki/Plaintext plaintext], but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the [[http://www.cas.mcmaster.ca/wiki/index.php/Conventional_Encryption_Algorithms Vigenère]] cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The [http://en.wikipedia.org/wiki/One_time_pad one-time pad] is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution &lt;br /&gt;
and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long.&lt;br /&gt;
The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
1]Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
*Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
2] Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
*Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
*Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
3] Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
4] Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
[[Image:deffie.png|350px|right|Deffie example Diagram]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be &lt;br /&gt;
-kAlice = 5 and&lt;br /&gt;
-kBob   = 7.&lt;br /&gt;
Their public keys are&lt;br /&gt;
*KAlice = 175 mod 53 = 40 and &lt;br /&gt;
*KBob = 177 mod 53 = 6&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his &lt;br /&gt;
private key:&lt;br /&gt;
-SBob,Alice = KAlice&amp;lt;br&amp;gt;&lt;br /&gt;
*kBob mod p = 407 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as:&lt;br /&gt;
-SAlice,Bob = KBob&amp;lt;br&amp;gt;&lt;br /&gt;
*kAlice mod p = 65 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient(n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
The security of [http://www.cas.mcmaster.ca/wiki/index.php/Public_Key_Encryption_Algorithms RSA] is based on the difficulty of integer factorization: Finding large primes and multiplying them together is easy. However, from the product to find the factors is hard. There is no known efficient general technique to solve this problem. &lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, [http://en.wikipedia.org/wiki/Totient totient](10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-12T02:49:32Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word [http://en.wikipedia.org/wiki/Cryptography cryptography] comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. [http://en.wikipedia.org/wiki/Cryptanalyst Cryptanalysis] is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a [http://en.wikipedia.org/wiki/Ciphertext ciphertext]. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the [http://en.wikipedia.org/wiki/Plaintext plaintext], but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution &lt;br /&gt;
and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long.&lt;br /&gt;
The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
1]Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
*Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
2] Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
*Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
*Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
3] Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
4] Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
[[Image:deffie.png|350px|right|Deffie example Diagram]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be &lt;br /&gt;
-kAlice = 5 and&lt;br /&gt;
-kBob   = 7.&lt;br /&gt;
Their public keys are&lt;br /&gt;
*KAlice = 175 mod 53 = 40 and &lt;br /&gt;
*KBob = 177 mod 53 = 6&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his &lt;br /&gt;
private key:&lt;br /&gt;
-SBob,Alice = KAlice&amp;lt;br&amp;gt;&lt;br /&gt;
*kBob mod p = 407 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as:&lt;br /&gt;
-SAlice,Bob = KBob&amp;lt;br&amp;gt;&lt;br /&gt;
*kAlice mod p = 65 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient(n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-12T02:48:10Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word [http://en.wikipedia.org/wiki/Cryptography cryptography] comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. [http://en.wikipedia.org/wiki/Cryptanalyst Cryptanalysis] is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the [http://en.wikipedia.org/wiki/Plaintext plaintext], but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution &lt;br /&gt;
and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long.&lt;br /&gt;
The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
1]Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
*Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
2] Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
*Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
*Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
3] Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
4] Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
[[Image:deffie.png|350px|right|Deffie example Diagram]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be &lt;br /&gt;
-kAlice = 5 and&lt;br /&gt;
-kBob   = 7.&lt;br /&gt;
Their public keys are&lt;br /&gt;
*KAlice = 175 mod 53 = 40 and &lt;br /&gt;
*KBob = 177 mod 53 = 6&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his &lt;br /&gt;
private key:&lt;br /&gt;
-SBob,Alice = KAlice&amp;lt;br&amp;gt;&lt;br /&gt;
*kBob mod p = 407 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as:&lt;br /&gt;
-SAlice,Bob = KBob&amp;lt;br&amp;gt;&lt;br /&gt;
*kAlice mod p = 65 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient(n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-12T02:44:17Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word [http://en.wikipedia.org/wiki/Cryptography cryptography] comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. Cryptanalysis is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the plaintext, but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution &lt;br /&gt;
and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long.&lt;br /&gt;
The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
1]Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
*Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
2] Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
*Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
*Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
3] Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
4] Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
[[Image:deffie.png|350px|right|Deffie example Diagram]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be &lt;br /&gt;
-kAlice = 5 and&lt;br /&gt;
-kBob   = 7.&lt;br /&gt;
Their public keys are&lt;br /&gt;
*KAlice = 175 mod 53 = 40 and &lt;br /&gt;
*KBob = 177 mod 53 = 6&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his &lt;br /&gt;
private key:&lt;br /&gt;
-SBob,Alice = KAlice&amp;lt;br&amp;gt;&lt;br /&gt;
*kBob mod p = 407 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as:&lt;br /&gt;
-SAlice,Bob = KBob&amp;lt;br&amp;gt;&lt;br /&gt;
*kAlice mod p = 65 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient(n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-12T02:40:21Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word cryptography comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. Cryptanalysis is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography[http://en.wikipedia.org/wiki/Cryptography] is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the plaintext, but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution &lt;br /&gt;
and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long.&lt;br /&gt;
The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
1]Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
*Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
2] Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
*Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
*Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
3] Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
4] Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
[[Image:deffie.png|350px|right|Deffie example Diagram]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be &lt;br /&gt;
-kAlice = 5 and&lt;br /&gt;
-kBob   = 7.&lt;br /&gt;
Their public keys are&lt;br /&gt;
*KAlice = 175 mod 53 = 40 and &lt;br /&gt;
*KBob = 177 mod 53 = 6&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his &lt;br /&gt;
private key:&lt;br /&gt;
-SBob,Alice = KAlice&amp;lt;br&amp;gt;&lt;br /&gt;
*kBob mod p = 407 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as:&lt;br /&gt;
-SAlice,Bob = KBob&amp;lt;br&amp;gt;&lt;br /&gt;
*kAlice mod p = 65 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient(n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-12T02:21:49Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word cryptography comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. Cryptanalysis is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the plaintext, but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution &lt;br /&gt;
and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long.&lt;br /&gt;
The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
1]Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
*Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
2] Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
*Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
*Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
3] Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
4] Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
[[Image:deffie.png|350px|right|Deffie example Diagram]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be &lt;br /&gt;
-kAlice = 5 and&lt;br /&gt;
-kBob   = 7.&lt;br /&gt;
Their public keys are&lt;br /&gt;
*KAlice = 175 mod 53 = 40 and &lt;br /&gt;
*KBob = 177 mod 53 = 6&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his &lt;br /&gt;
private key:&lt;br /&gt;
-SBob,Alice = KAlice&amp;lt;br&amp;gt;&lt;br /&gt;
*kBob mod p = 407 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as:&lt;br /&gt;
-SAlice,Bob = KBob&amp;lt;br&amp;gt;&lt;br /&gt;
*kAlice mod p = 65 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient(n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-11T06:11:12Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word cryptography comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. Cryptanalysis is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the plaintext, but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution &lt;br /&gt;
and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long.&lt;br /&gt;
The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
1]Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
*Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
2] Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
*Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
*Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
3] Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
4] Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
[[Image:deffie.png|350px|right|Deffie example Diagram]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be &lt;br /&gt;
-kAlice = 5 and&lt;br /&gt;
-kBob   = 7.&lt;br /&gt;
Their public keys are&lt;br /&gt;
*KAlice = 175 mod 53 = 40 and &lt;br /&gt;
*KBob = 177 mod 53 = 6&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his &lt;br /&gt;
private key:&lt;br /&gt;
-SBob,Alice = KAlice&amp;lt;br&amp;gt;&lt;br /&gt;
*kBob mod p = 407 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as:&lt;br /&gt;
-SAlice,Bob = KBob&amp;lt;br&amp;gt;&lt;br /&gt;
*kAlice mod p = 65 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient (n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-11T06:09:41Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word cryptography comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. Cryptanalysis is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the plaintext, but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution &lt;br /&gt;
and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long.&lt;br /&gt;
The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
1]Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
*Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
2] Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
*Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
*Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
3] Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
4] Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
[[Image:deffie.png|350px|right|Deffie example Diagram]]&amp;lt;br&amp;gt;&lt;br /&gt;
*'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be &lt;br /&gt;
-kAlice = 5 and&lt;br /&gt;
-kBob   = 7.&lt;br /&gt;
Their public keys are&lt;br /&gt;
-KAlice = 175 mod 53 = 40 and &lt;br /&gt;
-KBob = 177 mod 53 = 6&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his &lt;br /&gt;
private key:&lt;br /&gt;
-SBob,Alice = KAlice&amp;lt;br&amp;gt;&lt;br /&gt;
-kBob mod p = 407 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as:&lt;br /&gt;
-SAlice,Bob = KBob&amp;lt;br&amp;gt;&lt;br /&gt;
-kAlice mod p = 65 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient (n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-11T06:07:26Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word cryptography comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. Cryptanalysis is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the plaintext, but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution &lt;br /&gt;
and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long.&lt;br /&gt;
The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
1]Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
*Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
2] Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
*Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
*Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
3] Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
4] Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be kAlice = 5 and kBob = 7. Their public keys are&lt;br /&gt;
-KAlice = 175 mod 53 = 40 and &lt;br /&gt;
-KBob = 177 mod 53 = 6&lt;br /&gt;
[[Image:deffie.png|350px|right|Deffie example Diagram]]&amp;lt;br&amp;gt;&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his &lt;br /&gt;
private key:&lt;br /&gt;
SBob,Alice = KAlice&amp;lt;br&amp;gt;&lt;br /&gt;
kBob mod p = 407 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as:&lt;br /&gt;
SAlice,Bob = KBob&amp;lt;br&amp;gt;&lt;br /&gt;
kAlice mod p = 65 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient (n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-11T06:06:28Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word cryptography comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. Cryptanalysis is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the plaintext, but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution &lt;br /&gt;
and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long.&lt;br /&gt;
The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
1]Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
*Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
2] Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
*Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
*Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
3] Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
4] Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be kAlice = 5 and kBob = 7. Their public keys are&lt;br /&gt;
-KAlice = 175 mod 53 = 40 and &lt;br /&gt;
-KBob = 177 mod 53 = 6.&lt;br /&gt;
&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his &lt;br /&gt;
[[Image:deffie.png|350px|right|Deffie example Diagram]]&amp;lt;br&amp;gt;&lt;br /&gt;
private key:&lt;br /&gt;
SBob,Alice = KAlice&amp;lt;br&amp;gt;&lt;br /&gt;
kBob mod p = 407 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as:&lt;br /&gt;
SAlice,Bob = KBob&amp;lt;br&amp;gt;&lt;br /&gt;
kAlice mod p = 65 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient (n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/File:Deffie.png</id>
		<title>File:Deffie.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/File:Deffie.png"/>
				<updated>2009-04-11T06:05:22Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-11T06:05:06Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word cryptography comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. Cryptanalysis is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the plaintext, but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution &lt;br /&gt;
and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long.&lt;br /&gt;
The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
1]Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
*Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
2] Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
*Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
*Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
3] Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
4] Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be kAlice = 5 and kBob = 7. Their public keys are&lt;br /&gt;
-KAlice = 175 mod 53 = 40 and &lt;br /&gt;
-KBob = 177 mod 53 = 6.&lt;br /&gt;
&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his private key:&lt;br /&gt;
SBob,Alice = KAlice&amp;lt;br&amp;gt;&lt;br /&gt;
kBob mod p = 407 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:deffie.png|300px|right|Deffie example Diagram]]&amp;lt;br&amp;gt;&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as:&lt;br /&gt;
SAlice,Bob = KBob&amp;lt;br&amp;gt;&lt;br /&gt;
kAlice mod p = 65 mod 53 = 38&amp;lt;br&amp;gt;&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient (n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-11T05:59:51Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word cryptography comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. Cryptanalysis is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the plaintext, but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution &lt;br /&gt;
and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long.&lt;br /&gt;
The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
1]Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
*Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
2] Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
*Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
*Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
3] Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
4] Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
*c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be kAlice = 5 and kBob = 7. Their public keys are&lt;br /&gt;
-KAlice = 175 mod 53 = 40 and &lt;br /&gt;
-KBob = 177 mod 53 = 6.&lt;br /&gt;
&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his private key:&lt;br /&gt;
SBob,Alice = KAlice&lt;br /&gt;
kBob mod p = 407 mod 53 = 38&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as&lt;br /&gt;
SAlice,Bob = KBob&lt;br /&gt;
kAlice mod p = 65 mod 53 = 38&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient (n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-11T05:58:39Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word cryptography comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. Cryptanalysis is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the plaintext, but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution &lt;br /&gt;
and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long.&lt;br /&gt;
The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
*Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
-Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
* Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
-Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
-Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
* Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
-c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
* Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
-c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be kAlice = 5 and kBob = 7. Their public keys are&lt;br /&gt;
-KAlice = 175 mod 53 = 40 and &lt;br /&gt;
-KBob = 177 mod 53 = 6.&lt;br /&gt;
&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his private key:&lt;br /&gt;
SBob,Alice = KAlice&lt;br /&gt;
kBob mod p = 407 mod 53 = 38&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as&lt;br /&gt;
SAlice,Bob = KBob&lt;br /&gt;
kAlice mod p = 65 mod 53 = 38&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient (n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-11T05:58:09Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word cryptography comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. Cryptanalysis is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the plaintext, but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution &lt;br /&gt;
and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long.&lt;br /&gt;
The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
*Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
  -Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
* Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
  -Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
  -Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
* Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
  -c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
* Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
  -c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be kAlice = 5 and kBob = 7. Their public keys are&lt;br /&gt;
-KAlice = 175 mod 53 = 40 and &lt;br /&gt;
-KBob = 177 mod 53 = 6.&lt;br /&gt;
&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his private key:&lt;br /&gt;
SBob,Alice = KAlice&lt;br /&gt;
kBob mod p = 407 mod 53 = 38&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as&lt;br /&gt;
SAlice,Bob = KBob&lt;br /&gt;
kAlice mod p = 65 mod 53 = 38&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient (n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-11T05:57:29Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word cryptography comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. Cryptanalysis is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the plaintext, but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution &lt;br /&gt;
and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long.&lt;br /&gt;
The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
*Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
  Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
* Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
  Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
  Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
* Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
  c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
* Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
  c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be kAlice = 5 and kBob = 7. Their public keys are&lt;br /&gt;
-KAlice = 175 mod 53 = 40 and &lt;br /&gt;
-KBob = 177 mod 53 = 6.&lt;br /&gt;
&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his private key:&lt;br /&gt;
SBob,Alice = KAlice&lt;br /&gt;
kBob mod p = 407 mod 53 = 38&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as&lt;br /&gt;
SAlice,Bob = KBob&lt;br /&gt;
kAlice mod p = 65 mod 53 = 38&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient (n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-11T05:56:37Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word cryptography comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. Cryptanalysis is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the plaintext, but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution &lt;br /&gt;
and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long.&lt;br /&gt;
The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
*Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
    Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
* Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
   Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
    Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
* Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
    c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
* Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
    c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be kAlice = 5 and kBob = 7. Their public keys are&lt;br /&gt;
-KAlice = 175 mod 53 = 40 and &lt;br /&gt;
-KBob = 177 mod 53 = 6.&lt;br /&gt;
&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his private key:&lt;br /&gt;
SBob,Alice = KAlice&lt;br /&gt;
kBob mod p = 407 mod 53 = 38&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as&lt;br /&gt;
SAlice,Bob = KBob&lt;br /&gt;
kAlice mod p = 65 mod 53 = 38&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient (n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-11T05:55:24Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word cryptography comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. Cryptanalysis is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the plaintext, but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution &lt;br /&gt;
and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long. The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
*Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
• Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
* Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
• Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
• Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
* Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
• c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
* Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
• c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be kAlice = 5 and kBob = 7. Their public keys are&lt;br /&gt;
-KAlice = 175 mod 53 = 40 and &lt;br /&gt;
-KBob = 177 mod 53 = 6.&lt;br /&gt;
&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his private key:&lt;br /&gt;
SBob,Alice = KAlice&lt;br /&gt;
kBob mod p = 407 mod 53 = 38&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as&lt;br /&gt;
SAlice,Bob = KBob&lt;br /&gt;
kAlice mod p = 65 mod 53 = 38&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient (n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-11T05:54:25Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word cryptography comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. Cryptanalysis is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the plaintext, but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution &lt;br /&gt;
and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long. The sets of 64 bits are referred to as blocks.&lt;br /&gt;
&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
*Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
• Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
* Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
• Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:DES.png|300px|right|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
• Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
* Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
• c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
* Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
• c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be kAlice = 5 and kBob = 7. Their public keys are&lt;br /&gt;
-KAlice = 175 mod 53 = 40 and &lt;br /&gt;
-KBob = 177 mod 53 = 6.&lt;br /&gt;
&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his private key:&lt;br /&gt;
SBob,Alice = KAlice&lt;br /&gt;
kBob mod p = 407 mod 53 = 38&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as&lt;br /&gt;
SAlice,Bob = KBob&lt;br /&gt;
kAlice mod p = 65 mod 53 = 38&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient (n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-11T05:51:53Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word cryptography comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. Cryptanalysis is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the plaintext, but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution &lt;br /&gt;
and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long. The sets of 64 bits are referred to as blocks.&lt;br /&gt;
&lt;br /&gt;
'''DES Modes'''&amp;lt;br&amp;gt;&lt;br /&gt;
Electronic Code Book Mode (ECB)&amp;lt;br&amp;gt;&lt;br /&gt;
* Encipher each block independently&amp;lt;br&amp;gt;&lt;br /&gt;
• Cipher Block Chaining Mode (CBC)&amp;lt;br&amp;gt;&lt;br /&gt;
* Xor each block with previous ciphertext block&amp;lt;br&amp;gt;&lt;br /&gt;
* Requires an initialization vector for the first one&amp;lt;br&amp;gt;&lt;br /&gt;
• Encrypt-Decrypt-Encrypt Mode (2 keys: k, k')&amp;lt;br&amp;gt;&lt;br /&gt;
* c = DESk(DESk^(–1)(DESk(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
• Encrypt-Encrypt-Encrypt Mode (3 keys: k, k', k'')&amp;lt;br&amp;gt;&lt;br /&gt;
* c = DESk(DESk' (DESk''(m)))&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:DES.png|300px|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be kAlice = 5 and kBob = 7. Their public keys are&lt;br /&gt;
-KAlice = 175 mod 53 = 40 and &lt;br /&gt;
-KBob = 177 mod 53 = 6.&lt;br /&gt;
&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his private key:&lt;br /&gt;
SBob,Alice = KAlice&lt;br /&gt;
kBob mod p = 407 mod 53 = 38&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as&lt;br /&gt;
SAlice,Bob = KBob&lt;br /&gt;
kAlice mod p = 65 mod 53 = 38&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient (n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-11T05:45:23Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word cryptography comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. Cryptanalysis is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the plaintext, but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution &lt;br /&gt;
and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long. The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|The Feistel function (F function) of DES]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be kAlice = 5 and kBob = 7. Their public keys are&lt;br /&gt;
-KAlice = 175 mod 53 = 40 and &lt;br /&gt;
-KBob = 177 mod 53 = 6.&lt;br /&gt;
&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his private key:&lt;br /&gt;
SBob,Alice = KAlice&lt;br /&gt;
kBob mod p = 407 mod 53 = 38&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as&lt;br /&gt;
SAlice,Bob = KBob&lt;br /&gt;
kAlice mod p = 65 mod 53 = 38&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient (n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-11T05:44:46Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word cryptography comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. Cryptanalysis is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the plaintext, but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution &lt;br /&gt;
and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long. The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|300px|thumb|The Feistel function (F function) of DES]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be kAlice = 5 and kBob = 7. Their public keys are&lt;br /&gt;
-KAlice = 175 mod 53 = 40 and &lt;br /&gt;
-KBob = 177 mod 53 = 6.&lt;br /&gt;
&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his private key:&lt;br /&gt;
SBob,Alice = KAlice&lt;br /&gt;
kBob mod p = 407 mod 53 = 38&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as&lt;br /&gt;
SAlice,Bob = KBob&lt;br /&gt;
kAlice mod p = 65 mod 53 = 38&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient (n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-11T05:44:05Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word cryptography comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. Cryptanalysis is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the plaintext, but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution &lt;br /&gt;
[[Image:DES.png|250px|thumb|The Feistel function (F function) of DES]]&lt;br /&gt;
and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long. The sets of 64 bits are referred to as blocks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be kAlice = 5 and kBob = 7. Their public keys are&lt;br /&gt;
-KAlice = 175 mod 53 = 40 and &lt;br /&gt;
-KBob = 177 mod 53 = 6.&lt;br /&gt;
&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his private key:&lt;br /&gt;
SBob,Alice = KAlice&lt;br /&gt;
kBob mod p = 407 mod 53 = 38&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as&lt;br /&gt;
SAlice,Bob = KBob&lt;br /&gt;
kAlice mod p = 65 mod 53 = 38&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient (n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-11T05:43:01Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word cryptography comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. Cryptanalysis is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the plaintext, but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data.&lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution &lt;br /&gt;
[[Image:DES.png|250px|right|thumb|The Feistel function (F function) of DES]]&lt;br /&gt;
and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long. The sets of 64 bits are referred to as blocks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be kAlice = 5 and kBob = 7. Their public keys are&lt;br /&gt;
-KAlice = 175 mod 53 = 40 and &lt;br /&gt;
-KBob = 177 mod 53 = 6.&lt;br /&gt;
&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his private key:&lt;br /&gt;
SBob,Alice = KAlice&lt;br /&gt;
kBob mod p = 407 mod 53 = 38&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as&lt;br /&gt;
SAlice,Bob = KBob&lt;br /&gt;
kAlice mod p = 65 mod 53 = 38&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient (n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-11T05:36:52Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word cryptography comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. Cryptanalysis is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the plaintext, but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data. &lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long. The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|400px|'''Data Encryption Standard InfoBox Diagram''']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be kAlice = 5 and kBob = 7. Their public keys are&lt;br /&gt;
-KAlice = 175 mod 53 = 40 and &lt;br /&gt;
-KBob = 177 mod 53 = 6.&lt;br /&gt;
&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his private key:&lt;br /&gt;
SBob,Alice = KAlice&lt;br /&gt;
kBob mod p = 407 mod 53 = 38&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as&lt;br /&gt;
SAlice,Bob = KBob&lt;br /&gt;
kAlice mod p = 65 mod 53 = 38&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient (n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-11T05:32:23Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word cryptography comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. Cryptanalysis is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the plaintext, but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data. &lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long. The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|230px|'''Data Encryption Standard InfoBox Diagram''']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be kAlice = 5 and kBob = 7. Their public keys are&lt;br /&gt;
-KAlice = 175 mod 53 = 40 and &lt;br /&gt;
-KBob = 177 mod 53 = 6.&lt;br /&gt;
&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his private key:&lt;br /&gt;
SBob,Alice = KAlice&lt;br /&gt;
kBob mod p = 407 mod 53 = 38&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as&lt;br /&gt;
SAlice,Bob = KBob&lt;br /&gt;
kAlice mod p = 65 mod 53 = 38&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient (n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-11T05:31:47Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word cryptography comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. Cryptanalysis is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the plaintext, but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data. &lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long. The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|180px|right|'''Data Encryption Standard InfoBox Diagram''']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be kAlice = 5 and kBob = 7. Their public keys are&lt;br /&gt;
-KAlice = 175 mod 53 = 40 and &lt;br /&gt;
-KBob = 177 mod 53 = 6.&lt;br /&gt;
&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his private key:&lt;br /&gt;
SBob,Alice = KAlice&lt;br /&gt;
kBob mod p = 407 mod 53 = 38&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as&lt;br /&gt;
SAlice,Bob = KBob&lt;br /&gt;
kAlice mod p = 65 mod 53 = 38&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient (n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/File:DES.png</id>
		<title>File:DES.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/File:DES.png"/>
				<updated>2009-04-11T05:31:07Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-11T05:30:54Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word cryptography comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. Cryptanalysis is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the plaintext, but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data. &lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long. The sets of 64 bits are referred to as blocks.&lt;br /&gt;
[[Image:DES.png|right|'''Data Encryption Standard InfoBox Diagram''']]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be kAlice = 5 and kBob = 7. Their public keys are&lt;br /&gt;
-KAlice = 175 mod 53 = 40 and &lt;br /&gt;
-KBob = 177 mod 53 = 6.&lt;br /&gt;
&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his private key:&lt;br /&gt;
SBob,Alice = KAlice&lt;br /&gt;
kBob mod p = 407 mod 53 = 38&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as&lt;br /&gt;
SAlice,Bob = KBob&lt;br /&gt;
kAlice mod p = 65 mod 53 = 38&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient (n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-11T05:26:47Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word cryptography comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. Cryptanalysis is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the plaintext, but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data. &lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long. The sets of 64 bits are referred to as blocks&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be kAlice = 5 and kBob = 7. Their public keys are&lt;br /&gt;
-KAlice = 175 mod 53 = 40 and &lt;br /&gt;
-KBob = 177 mod 53 = 6.&lt;br /&gt;
&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his private key:&lt;br /&gt;
SBob,Alice = KAlice&lt;br /&gt;
kBob mod p = 407 mod 53 = 38&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as&lt;br /&gt;
SAlice,Bob = KBob&lt;br /&gt;
kAlice mod p = 65 mod 53 = 38&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient (n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-11T05:26:11Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word cryptography comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. Cryptanalysis is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the plaintext, but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|right|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data. &lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long. The sets of 64 bits are referred to as blocks&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be kAlice = 5 and kBob = 7. Their public keys are&lt;br /&gt;
-KAlice = 175 mod 53 = 40 and &lt;br /&gt;
-KBob = 177 mod 53 = 6.&lt;br /&gt;
&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his private key:&lt;br /&gt;
SBob,Alice = KAlice&lt;br /&gt;
kBob mod p = 407 mod 53 = 38&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as&lt;br /&gt;
SAlice,Bob = KBob&lt;br /&gt;
kAlice mod p = 65 mod 53 = 38&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient (n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-11T05:25:38Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word cryptography comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. Cryptanalysis is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the plaintext, but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
[[Image:Vigenere.png|180px|''' Vigenere square ''']]&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data. &lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long. The sets of 64 bits are referred to as blocks&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be kAlice = 5 and kBob = 7. Their public keys are&lt;br /&gt;
-KAlice = 175 mod 53 = 40 and &lt;br /&gt;
-KBob = 177 mod 53 = 6.&lt;br /&gt;
&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his private key:&lt;br /&gt;
SBob,Alice = KAlice&lt;br /&gt;
kBob mod p = 407 mod 53 = 38&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as&lt;br /&gt;
SAlice,Bob = KBob&lt;br /&gt;
kAlice mod p = 65 mod 53 = 38&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient (n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security</id>
		<title>Cryptography in Information Security</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Cryptography_in_Information_Security"/>
				<updated>2009-04-11T05:24:27Z</updated>
		
		<summary type="html">&lt;p&gt;Katmehm:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:public_key_cryptography_and_pgp.jpg|right|'''Description''']]&lt;br /&gt;
===Introduction=== &lt;br /&gt;
The word cryptography comes from two Greek words meaning &amp;quot;secret writing&amp;quot; and is the art and science of concealing meaning. Cryptanalysis is the breaking of codes. The basic component of cryptography is a&lt;br /&gt;
cryptosystem.&lt;br /&gt;
&amp;lt;br&amp;gt;Quintuple (E, D, M, K, C):&lt;br /&gt;
* M set of plaintexts&amp;lt;br&amp;gt;&lt;br /&gt;
* K set of keys&amp;lt;br&amp;gt;&lt;br /&gt;
* C set of ciphertexts&amp;lt;br&amp;gt;&lt;br /&gt;
* E set of encryption functions&amp;lt;br&amp;gt; &lt;br /&gt;
* D set of decryption functions &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal of cryptography is to keep enciphered information secret. An adversary wishes to break a ciphertext. Standard cryptographic practice is to assume that one knows the algorithm used to encipher the plaintext, but not the specific cryptographic key (in other words, she knows D and E). One may use three types of attacks.&lt;br /&gt;
&lt;br /&gt;
=Classical Cryptosystems=&lt;br /&gt;
Classical cryptosystems (also called single-key or symmetric cryptosystems) are cryptosystems that use the same key for encipherment and decipherment. So the sender, receiver share common key. Keys may be the same, or trivial to derive from one another. The are sometime called symmetric cryptography.&lt;br /&gt;
&lt;br /&gt;
[[Image:Images.jpg|right|'''Caesar cipher machine''']]&lt;br /&gt;
==Cæsar cipher==&lt;br /&gt;
The action of a Caesar cipher is to replace each plaintext letter with one a fixed number of places down the alphabet. This example is with a shift of three, so that a B in the plaintext becomes E in the ciphertext &lt;br /&gt;
&lt;br /&gt;
* '''EXAMPLE''': &lt;br /&gt;
The Caesar cipher is the widely known cipher in which letters are shifted. For example, if the key is 3, the letter A becomes D, B becomes E, and so forth, ending with Z becoming C. So the word &amp;quot;HELLO&amp;quot; is enciphered as &amp;quot;KHOOR.&amp;quot; Informally, this cipher is a cryptosystem with:&lt;br /&gt;
M = { all sequences of Roman letters }&amp;lt;br&amp;gt;&lt;br /&gt;
K = { i | i an integer such that 0 ≤ I ≤ 25 }&amp;lt;br&amp;gt;&lt;br /&gt;
E = { Ek | k≤ K and for all m M, Ek(m) = (m + k) mod 26 }&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Representing each letter by its position in the alphabet (with A in position 0),&lt;br /&gt;
&amp;quot;HELLO&amp;quot; is 7 4 11 11 14;&amp;lt;br&amp;gt;&lt;br /&gt;
if k = 3, the ciphertext is 10 7 14 14 17, or &amp;quot;KHOOR.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
D = { Dk | k K and for all c C, Dk(c) = (26 + c – k) mod 26 }&lt;br /&gt;
Each Dk simply inverts the corresponding Ek.&lt;br /&gt;
C = M&lt;br /&gt;
because E is clearly a set of onto functions.&lt;br /&gt;
&lt;br /&gt;
[[Image:Vigenere.png|180px|''' Vigenere square ''']]&lt;br /&gt;
==Vigènere cipher==&lt;br /&gt;
A longer key might obscure the statistics. The Vigenère cipher chooses a sequence of keys, represented by a string. The key letters are applied to successive plaintext characters, and when the end of the key is reached, the key starts over. The length of the key is called the period of the cipher. Because this requires several different key letters, this type of cipher is called polyalphabetic.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The first line of a limerick is enciphered using the key &amp;quot;BENCH,&amp;quot; as follows.&amp;lt;br&amp;gt;&lt;br /&gt;
Key        B ENCHBENC HBENC HBENCH BENCHBENCH&amp;lt;br&amp;gt;&lt;br /&gt;
Plaintext  A LIMERICK PACKS LAUGHS ANATOMICAL&amp;lt;br&amp;gt;&lt;br /&gt;
Ciphertext B PVOLSMPM WBGXU SBYTJZ BRNVVNMPCS&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For many years, the Vigenère cipher was considered unbreakable. Then a Prussian cavalry officer named Kasiski noticed that repetitions occur when characters of the key appear over the same characters in the&lt;br /&gt;
ciphertext. The number of characters between the repetitions is a multiple of the period.&lt;br /&gt;
&lt;br /&gt;
''One Time Pad''&lt;br /&gt;
The one-time pad is a variant of the Vigenère cipher. The technique is the same. The key string is chosen&lt;br /&gt;
at random, and is at least as long as the message, so it does not repeat.&lt;br /&gt;
&lt;br /&gt;
==Data Encryption Standard==&lt;br /&gt;
The Data Encryption Standard (DES) was designed to encipher sensitive but nonclassified data. &lt;br /&gt;
It is bit-oriented, unlike the other ciphers we have seen. It uses both transposition and substitution and for that reason is sometimes referred to as a product cipher. Its input, output, and key are each 64 bits long. The sets of 64 bits are referred to as blocks&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Public Key Cryptography=&lt;br /&gt;
==Diffie-Hellman==&lt;br /&gt;
In 1976, Diffie and Hellman proposed a new type of cryptography that distinguished between&lt;br /&gt;
encipherment and decipherment keys.&lt;br /&gt;
&lt;br /&gt;
One of the keys would be publicly known; the other would be&lt;br /&gt;
kept private by its owner. Classical cryptography requires the sender and recipient to share a common key.&lt;br /&gt;
Public key cryptography does not. If the encipherment key is public, to send a secret message simply&lt;br /&gt;
encipher the message with the recipient's public key. Then send it. The recipient can decipher it using his&lt;br /&gt;
private key.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Alice and Bob have chosen p = 53 and g = 17. They choose their private keys to be kAlice = 5 and kBob = 7. Their public keys are&lt;br /&gt;
-KAlice = 175 mod 53 = 40 and &lt;br /&gt;
-KBob = 177 mod 53 = 6.&lt;br /&gt;
&lt;br /&gt;
Suppose Bob wishes to send Alice a message. He computes a shared secret key by enciphering Alice's public key using his private key:&lt;br /&gt;
SBob,Alice = KAlice&lt;br /&gt;
kBob mod p = 407 mod 53 = 38&lt;br /&gt;
and enciphers his message using this key (and any desired secret key cryptosystem). When Alice gets the message, she computes the key she shares with Bob as&lt;br /&gt;
SAlice,Bob = KBob&lt;br /&gt;
kAlice mod p = 65 mod 53 = 38&lt;br /&gt;
The mathematical properties of modular exponentiation ensure that for any two users A and B, SA,B = SB,A&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==RSA==&lt;br /&gt;
is an exponentiation cipher. Choose two large prime numbers p and q, and let n = pq. The totient (n) of n is the number of numbers less than n with no factors in common with n. &lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': Let n = 10. The numbers that are less than 10 and are relatively prime to (have no factors in common with) n are 1, 3, 7, and 9. Hence, totient(10) = 4. Similarly, if n = 21, the numbers that are relatively prime to n are 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, and 20. So totient(21) = 12&lt;br /&gt;
&lt;br /&gt;
=Cryptographic Checksums=&lt;br /&gt;
==HMAC==&lt;br /&gt;
Alice wants to send Bob a message of n bits. She wants Bob to be able to verify that the message he&lt;br /&gt;
receives is the same one that was sent. So she applies a mathematical function, called a checksum&lt;br /&gt;
function, to generate a smaller set of k bits from the original n bits. This smaller set is called the checksum&lt;br /&gt;
or message digest. Alice then sends Bob both the message and the checksum. When Bob gets the&lt;br /&gt;
message, he recomputes the checksum and compares it with the one Alice sent. If they match, he assumes&lt;br /&gt;
that the message has not been changed.&lt;br /&gt;
&lt;br /&gt;
*'''EXAMPLE''': The parity bit in the ASCII representation is often used as a single-bit checksum. If&lt;br /&gt;
odd parity is used, the sum of the 1-bits in the ASCII representation of the character, and the&lt;br /&gt;
parity bit, is odd. Assume that Alice sends Bob the letter &amp;quot;A.&amp;quot;&lt;br /&gt;
In ASCII, the representation of &amp;quot;A&amp;quot; using odd parity is p0111101 in binary, where p represents&lt;br /&gt;
the parity bit. Because five bits are set, the parity bit is 0 for odd parity.&lt;br /&gt;
When Bob gets the message 00111101, he counts the 1-bits in the message. Because this&lt;br /&gt;
number is odd, Bob knows that the message has arrived unchanged.&lt;br /&gt;
&lt;br /&gt;
HMAC is a generic term for an algorithm that uses a keyless hash function and a cryptographic key to&lt;br /&gt;
produce a keyed hash function [594]. This mechanism enables Alice to validate that data Bob sent to her is&lt;br /&gt;
unchanged in transit. Without the key, anyone could change the data and recompute the message&lt;br /&gt;
authentication code, and Alice would be none the wiser.&lt;br /&gt;
The need for HMAC arose because keyed hash functions are derived from cryptographic algorithms. Many&lt;br /&gt;
countries restrict the import and export of software that implements such algorithms. They do not restrict&lt;br /&gt;
software implementing keyless hash functions, because such functions cannot be used to conceal&lt;br /&gt;
information. Hence, HMAC builds on a keyless hash function using a cryptographic key to create a keyed&lt;br /&gt;
hash function.&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
For our purposes, three aspects of cryptography require study. Classical cryptography uses a single key&lt;br /&gt;
shared by all involved. Public key cryptography uses two keys, one shared and the other private. Both&lt;br /&gt;
types of cryptosystems can provide secrecy and origin authentication (although classical cryptography&lt;br /&gt;
requires a trusted third party to provide both). Cryptographic hash functions may or may not use a secret&lt;br /&gt;
key and provide data authentication.&lt;br /&gt;
All cryptosystems are based on substitution (of some quantity for another) and permutation (scrambling of&lt;br /&gt;
some quantity). Cryptanalysis, the breaking of ciphers, uses statistical approaches (such as the Kasiski&lt;br /&gt;
method and differential cryptanalysis) and mathematical approaches (such as attacks on the RSA method).&lt;br /&gt;
As techniques of cryptanalysis improve, our understanding of encipherment methods also improves and&lt;br /&gt;
ciphers become harder to break. The same holds for cryptographic checksum functions. However, as&lt;br /&gt;
computing power increases, key length must also increase. A 56-bit key was deemed secure by many in&lt;br /&gt;
1976; it is clearly not secure now.&lt;br /&gt;
&lt;br /&gt;
=Research Issues=&lt;br /&gt;
Cryptography is an exciting area of research, and all aspects of it are being studied. New secret key ciphers incorporate techniques for defeating differential and linear cryptanalysis. New public key ciphers use simple&lt;br /&gt;
instances of NP-hard problems as their bases, and they cast those instances into the more general framework of the NP-hard problem. Other public key ciphers revisit well-studied, difficult classical problems&lt;br /&gt;
(such as factoring) and use them so that mathematically breaking the  cipher is equivalent to solving the hard problem. Still others are built on the notion of randomness (in the sense of unpredictability). Cryptanalytic techniques are also improving. From the development of differential cryptanalysis came linear cryptanalysis. The use of NP-hard problems leads to an analysis of the problem underlying the cipher to reduce it to the simpler, solvable case. The use of classical mathematical problems leads to the application of advanced technology to make the specific problem computable; for example, advances in technology&lt;br /&gt;
have increased the sizes of numbers that can be factored, which in turn lead to the use of larger primes as the basis for ciphers such as RSA.&lt;br /&gt;
Advances in both cryptography and cryptanalysis lead to a notion of &amp;quot;provable security.&amp;quot; The issue is to prove under what conditions a cipher is unbreakable. Then, if the conditions are met, perfect secrecy is obtained. Similar issues arise with cryptographic protocols (some of which the next chapters will explore). This leads to the area of assurance and serves as an excellent test base for many assurance techniques&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. ''Onion Routing for Anonymous Communications.'' [http://en.wikipedia.org/wiki/Cryptography]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Caesar_cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Encrypt]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Plaintext]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Cipher]&lt;br /&gt;
[http://en.wikipedia.org/wiki/Julius_Caesar]&lt;/div&gt;</summary>
		<author><name>Katmehm</name></author>	</entry>

	</feed>