<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.1" version="1.1">
  <file original="NoName" source-language="en" datatype="plaintext" target-language="en">
    <body>
      <trans-unit xml:space="preserve" approved="no" id="75eabdc867002434" weblate-flags="read-only">
        <source>Network security</source>
        <target state="translated">Network security</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">8</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="2202862521018d70" weblate-flags="read-only">
        <source>In the early days, data networks were mainly used by researchers and security was not a concern. A few users were connected and capable of using the network. Almost all the devices attached to the network were openly accessible and users were trusted. As the utilization of the networks grew, security concerns started to appear. In universities, researchers and professors did not always trust their students and required some forms of access control. On standalone computers, the common access control mechanism is the password. A `username` is assigned to each user and when this user wants to access the computer, he or she needs to provide his/her `username` and his/her `password`. Most passwords are composed of a sequence of characters. The strength of the password is function of the difficulty of guessing the  characters chosen by each user. Various guidelines have been defined on how  to select a good password [#fpasswords]_. Some systems require regular modifications of the passwords chosen by their users.</source>
        <target state="translated">In the early days, data networks were mainly used by researchers and security was not a concern. A few users were connected and capable of using the network. Almost all the devices attached to the network were openly accessible and users were trusted. As the utilization of the networks grew, security concerns started to appear. In universities, researchers and professors did not always trust their students and required some forms of access control. On standalone computers, the common access control mechanism is the password. A `username` is assigned to each user and when this user wants to access the computer, he or she needs to provide his/her `username` and his/her `password`. Most passwords are composed of a sequence of characters. The strength of the password is function of the difficulty of guessing the  characters chosen by each user. Various guidelines have been defined on how  to select a good password [#fpasswords]_. Some systems require regular modifications of the passwords chosen by their users.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">10</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="0911b35eb4b28f56" weblate-flags="read-only">
        <source>When the first computers were attached to data networks, applications were developed to enable them to access to remote computers through the network. To authenticate the remote users, these applications have also relied on usernames and passwords. When a user connects to a distant computer, she sends her username through the network and then provides her password to confirm her `identity`. This authentication scheme is presented in the time sequence diagram below.</source>
        <target state="translated">When the first computers were attached to data networks, applications were developed to enable them to access to remote computers through the network. To authenticate the remote users, these applications have also relied on usernames and passwords. When a user connects to a distant computer, she sends her username through the network and then provides her password to confirm her `identity`. This authentication scheme is presented in the time sequence diagram below.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">12</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="7f255af5125d1759" weblate-flags="read-only">
        <source>Alice and Bob</source>
        <target state="translated">Alice and Bob</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">46</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="8e8207236fc5333c" weblate-flags="read-only">
        <source>Alice and Bob are the first names that are used in examples for security techniques. They first appeared in a seminal paper by Diffie and Hellman [DH1976]_. Since then, Alice and Bob are the most frequently used names to represent the users who interact with a network. Other characters such as Eve or Mallory have been added over the years. We will explain their respective roles later.</source>
        <target state="translated">Alice and Bob are the first names that are used in examples for security techniques. They first appeared in a seminal paper by Diffie and Hellman [DH1976]_. Since then, Alice and Bob are the most frequently used names to represent the users who interact with a network. Other characters such as Eve or Mallory have been added over the years. We will explain their respective roles later.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">48</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="02b8fb6865f432d5" weblate-flags="read-only">
        <source>Threats</source>
        <target state="translated">Threats</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">62</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="da6d331670ed7c32" weblate-flags="read-only">
        <source>When analyzing security issues in computer networks, it is useful to reason about the capabilities of the attacker who wants to exploit some breach in the security of the network. There are different types of attackers. Some have generic capabilities, others are specific to a given technology or network protocol. In this section, we discuss some important threats that a network architect must take into account.</source>
        <target state="translated">When analyzing security issues in computer networks, it is useful to reason about the capabilities of the attacker who wants to exploit some breach in the security of the network. There are different types of attackers. Some have generic capabilities, others are specific to a given technology or network protocol. In this section, we discuss some important threats that a network architect must take into account.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">64</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="11a0b067c12eb2c5" weblate-flags="read-only">
        <source>The first type of attacker is called the `passive attacker`. A `passive attacker` is someone able to observe and usually store the information (e.g. the packets) exchanged in a given network or subset of it (e.g. a specific link). This attacker has access to all the data passing through this specific link. This is the most basic type of attacker and many network technologies are vulnerable to such attacks. In the above example, a passive attacker could easily capture the password sent by Alice and reuse it later to be authenticated as Alice on the remote computer. This is illustrated in the figure below where we do not show anymore the ``DATA.req`` and ``DATA.ind`` primitives but only the messages exchanged. Throughout this chapter, we will always use `Eve` as a user who is able to eavesdrop the data passing in front of her.</source>
        <target state="translated">The first type of attacker is called the `passive attacker`. A `passive attacker` is someone able to observe and usually store the information (e.g. the packets) exchanged in a given network or subset of it (e.g. a specific link). This attacker has access to all the data passing through this specific link. This is the most basic type of attacker and many network technologies are vulnerable to such attacks. In the above example, a passive attacker could easily capture the password sent by Alice and reuse it later to be authenticated as Alice on the remote computer. This is illustrated in the figure below where we do not show anymore the ``DATA.req`` and ``DATA.ind`` primitives but only the messages exchanged. Throughout this chapter, we will always use `Eve` as a user who is able to eavesdrop the data passing in front of her.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">73</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="5020d45fa6a56f9e" weblate-flags="read-only">
        <source>In the above example, `Eve` can capture all the packets exchanged by Bob and Alice. This implies that Eve can discover Alice's username and Alice's password. With this information, Eve can then authenticate as Alice on Bob's computer and do whatever Alice is authorized to do. This is a major problem from a security point of view. To prevent this attack, Alice should never send her password in clear over a network where someone could eavesdrop the information. In some networks, such as an open wireless network, an attacker can easily collect all the data sent by a particular user. In other networks, this is a bit more complex depending on the network technology used, but various software packages exist to automate this process. As will be described later, the best approach to prevent this type of attack is to rely on cryptographic techniques to ensure that passwords are never sent in clear.</source>
        <target state="translated">In the above example, `Eve` can capture all the packets exchanged by Bob and Alice. This implies that Eve can discover Alice's username and Alice's password. With this information, Eve can then authenticate as Alice on Bob's computer and do whatever Alice is authorized to do. This is a major problem from a security point of view. To prevent this attack, Alice should never send her password in clear over a network where someone could eavesdrop the information. In some networks, such as an open wireless network, an attacker can easily collect all the data sent by a particular user. In other networks, this is a bit more complex depending on the network technology used, but various software packages exist to automate this process. As will be described later, the best approach to prevent this type of attack is to rely on cryptographic techniques to ensure that passwords are never sent in clear.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">113</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="f6cdee0fd71a986c" weblate-flags="read-only">
        <source>Pervasive monitoring</source>
        <target state="translated">Pervasive monitoring</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">132</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="3f3353f01a170543" weblate-flags="read-only">
        <source>In the previous example, we have explained how Eve could capture data from a particular user. This is not the only attack of this type. In 2013, based on documents collected by Edward Snowden, the press revealed that several governmental agencies were collecting lots of data on various links that compose the global Internet [Greenwald2014]_. Thanks to this massive amount of data, these governmental agencies have been able to extract lots of information about the behavior of Internet users. Like Eve, they are in a position to extract passwords, usernames and other privacy sensitive data from all the packets that they have captured. However, it seems that these agencies were often more interested in various meta data, e.g. information showing with whom a given user communicates than the actual data exchanged. These revelations have shocked the Internet community and the `Internet Engineering Task Force &lt;https://www.ietf.org&gt;`_ that manages the standardization of Internet protocols has declared in :rfc:`7258` that such pervasive monitoring is an attack that need to be countered in the development of new protocols. Several new protocols and extensions to existing ones are being developed to counter these attacks.</source>
        <target state="translated">In the previous example, we have explained how Eve could capture data from a particular user. This is not the only attack of this type. In 2013, based on documents collected by Edward Snowden, the press revealed that several governmental agencies were collecting lots of data on various links that compose the global Internet [Greenwald2014]_. Thanks to this massive amount of data, these governmental agencies have been able to extract lots of information about the behavior of Internet users. Like Eve, they are in a position to extract passwords, usernames and other privacy sensitive data from all the packets that they have captured. However, it seems that these agencies were often more interested in various meta data, e.g. information showing with whom a given user communicates than the actual data exchanged. These revelations have shocked the Internet community and the `Internet Engineering Task Force &lt;https://www.ietf.org&gt;`_ that manages the standardization of Internet protocols has declared in :rfc:`7258` that such pervasive monitoring is an attack that need to be countered in the development of new protocols. Several new protocols and extensions to existing ones are being developed to counter these attacks.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">134</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="6765991d3cd16b3d" weblate-flags="read-only">
        <source>Eavesdropping and pervasive monitoring are not the only possible attacks against a network. Another type of attacker is the active attacker. In the literature, these attacks are often called `Man in the middle` or `MITM` attacks. Such attacks occur when one user, let us call him `Mallory`, has managed to configure the network so that he can both capture and modify the packets exchanged by two users. The simplest scenario is when Mallory controls a router that is on the path used by both Alice and Bob. For example, Alice could be connected to a WiFi access router controlled by Mallory and Bob would be a regular server on the Internet.</source>
        <target state="translated">Eavesdropping and pervasive monitoring are not the only possible attacks against a network. Another type of attacker is the active attacker. In the literature, these attacks are often called `Man in the middle` or `MITM` attacks. Such attacks occur when one user, let us call him `Mallory`, has managed to configure the network so that he can both capture and modify the packets exchanged by two users. The simplest scenario is when Mallory controls a router that is on the path used by both Alice and Bob. For example, Alice could be connected to a WiFi access router controlled by Mallory and Bob would be a regular server on the Internet.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">155</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="5c1706249d303f91" weblate-flags="read-only">
        <source>As Mallory receives all the packets sent by both Bob and Alice, he can modify them at will. For example, he could modify the commands sent by Alice to the server managed by Bob and change the responses sent by the server. This type of attack is very powerful and sometimes difficult to counter without relying on advanced cryptographic techniques.</source>
        <target state="translated">As Mallory receives all the packets sent by both Bob and Alice, he can modify them at will. For example, he could modify the commands sent by Alice to the server managed by Bob and change the responses sent by the server. This type of attack is very powerful and sometimes difficult to counter without relying on advanced cryptographic techniques.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">179</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="279f07670f08a8a2" weblate-flags="read-only">
        <source>The last type of attack that we consider in this introduction are the `Denial of Service` or DoS attacks. During such an attack, the attacker generates enough packets to saturate a given service and prevent it from operating correctly. The simplest Denial of Service attack is to send more packets that the bandwidth of the link that attaches the target to the network. The target could be a single server, a company or even an entire country. If these packets all come from the same source, then the victim can identify the attacker and contact the law enforcement authorities. In practice, such denial of service attacks do not originate from a single source. The attacker usually compromises a (possibly very large) set of sources and forces them to send packets to saturate a given target. Since the attacking traffic comes from a wide range of sources, it is difficult for the victim to locate the culprit and also to counter the attack. Saturating a link is the simplest example of `Distributed Denial of Service (DDoS)` attacks.</source>
        <target state="translated">The last type of attack that we consider in this introduction are the `Denial of Service` or DoS attacks. During such an attack, the attacker generates enough packets to saturate a given service and prevent it from operating correctly. The simplest Denial of Service attack is to send more packets that the bandwidth of the link that attaches the target to the network. The target could be a single server, a company or even an entire country. If these packets all come from the same source, then the victim can identify the attacker and contact the law enforcement authorities. In practice, such denial of service attacks do not originate from a single source. The attacker usually compromises a (possibly very large) set of sources and forces them to send packets to saturate a given target. Since the attacking traffic comes from a wide range of sources, it is difficult for the victim to locate the culprit and also to counter the attack. Saturating a link is the simplest example of `Distributed Denial of Service (DDoS)` attacks.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">187</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="a85b70ff78fe46fe" weblate-flags="read-only">
        <source>In practice, there is a possibility of denial of service attacks as soon as there is a limited resource somewhere in the network. This resource can be the bandwidth of a link, but it could also be the computational power of a server, its memory or even the size of tables used by a given protocol implementation. Defending against real DoS attacks can be difficult, especially if the attacker controls a large number of sources that are used to launch the attacks. In terms of bandwidth, DoS attacks composed of a few Gbps to a few tens of Gbps of traffic are frequent on the Internet. In 2015, `github.com &lt;http://www.github.com&gt;`_ suffered from a distributed DoS that reached a top bandwidth of 400 Gbps according to some `reports &lt;http://www.techworld.com/news/security/worlds-largest-ddos-attack-reached-400gbps-says-arbor-networks-3595715/&gt;`_.</source>
        <target state="translated">In practice, there is a possibility of denial of service attacks as soon as there is a limited resource somewhere in the network. This resource can be the bandwidth of a link, but it could also be the computational power of a server, its memory or even the size of tables used by a given protocol implementation. Defending against real DoS attacks can be difficult, especially if the attacker controls a large number of sources that are used to launch the attacks. In terms of bandwidth, DoS attacks composed of a few Gbps to a few tens of Gbps of traffic are frequent on the Internet. In 2015, `github.com &lt;http://www.github.com&gt;`_ suffered from a distributed DoS that reached a top bandwidth of 400 Gbps according to some `reports &lt;http://www.techworld.com/news/security/worlds-largest-ddos-attack-reached-400gbps-says-arbor-networks-3595715/&gt;`_.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">198</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="c45c2f0be43acf79" weblate-flags="read-only">
        <source>When designing network protocols and applications that will be deployed on a large scale, it is important to take those DDoS attacks into account. Attackers use different strategies to launch DDoS attacks. Some have managed to gain control of a large number of sources by injecting malware on them. Others, and this is where protocol designers have an important role to play, simply exploit design flaws in some protocols. Consider a simple request-response protocol where the client sends a request and the server replies with a response. Often the response is larger or much larger than the request sent by the client. Consider that such a simple protocol is used over a datagram network. When Alice sends a datagram to Bob containing her request, Bob extracts both the request and Alice's address from the packet. He then sends his response in a single packet destined to Alice. Mallory would like to create a DoS attack against Alice without being identified. Since he has studied the specification of this protocol, he can send a request to Bob inside a packet having Alice's address as its source address. Bob will process the request and send his (large) response to Alice. If the response has the same size as the request, Mallory is producing a `reflection attack` since his packets are reflected by Bob. Alice would think that she is attacked by Bob. If there are many servers that operate the same service as Bob, Mallory could hide behind a large number of such reflectors. Unfortunately, the reflection attack can also become an amplification attack. This happens when the response sent by Bob is larger than the request that it has received. If the response is :math:`k` times larger than the request, then when Mallory consumes 1 Gbps of bandwidth to send requests, his victim receives :math:`k` Gbps of attack traffic. Such amplification attacks are a very important problem and protocol designers should ensure that they never send a large response before having received the proof that the request that they have received originated from the source indicated in the request.</source>
        <target state="translated">When designing network protocols and applications that will be deployed on a large scale, it is important to take those DDoS attacks into account. Attackers use different strategies to launch DDoS attacks. Some have managed to gain control of a large number of sources by injecting malware on them. Others, and this is where protocol designers have an important role to play, simply exploit design flaws in some protocols. Consider a simple request-response protocol where the client sends a request and the server replies with a response. Often the response is larger or much larger than the request sent by the client. Consider that such a simple protocol is used over a datagram network. When Alice sends a datagram to Bob containing her request, Bob extracts both the request and Alice's address from the packet. He then sends his response in a single packet destined to Alice. Mallory would like to create a DoS attack against Alice without being identified. Since he has studied the specification of this protocol, he can send a request to Bob inside a packet having Alice's address as its source address. Bob will process the request and send his (large) response to Alice. If the response has the same size as the request, Mallory is producing a `reflection attack` since his packets are reflected by Bob. Alice would think that she is attacked by Bob. If there are many servers that operate the same service as Bob, Mallory could hide behind a large number of such reflectors. Unfortunately, the reflection attack can also become an amplification attack. This happens when the response sent by Bob is larger than the request that it has received. If the response is :math:`k` times larger than the request, then when Mallory consumes 1 Gbps of bandwidth to send requests, his victim receives :math:`k` Gbps of attack traffic. Such amplification attacks are a very important problem and protocol designers should ensure that they never send a large response before having received the proof that the request that they have received originated from the source indicated in the request.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">213</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="2d61207594aabce7" weblate-flags="read-only">
        <source>Cryptographic primitives</source>
        <target state="translated">Cryptographic primitives</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">245</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="ac2e60b939015b78" weblate-flags="read-only">
        <source>Cryptography techniques have initially been defined and used by spies and armies to exchange secret information in manner that ensures that adversaries cannot decode the information even if they capture the message or the person carrying the message. A wide range of techniques have been defined. The first techniques relied on their secrecy to operate. One of the first encryption schemes is attributed to Julius Caesar. When he sent confidential information to his generals, he would encode each message by replacing each letter with another letter that is :math:`n` positions after this letter in the alphabet. For example, the message `SECRET` becomes `VHFUHW` when encoded using Caesar's cipher. This technique could have puzzled some soldiers during Caesar's wars, but today even young kids can recover the original message from the ciphered one.</source>
        <target state="translated">Cryptography techniques have initially been defined and used by spies and armies to exchange secret information in manner that ensures that adversaries cannot decode the information even if they capture the message or the person carrying the message. A wide range of techniques have been defined. The first techniques relied on their secrecy to operate. One of the first encryption schemes is attributed to Julius Caesar. When he sent confidential information to his generals, he would encode each message by replacing each letter with another letter that is :math:`n` positions after this letter in the alphabet. For example, the message `SECRET` becomes `VHFUHW` when encoded using Caesar's cipher. This technique could have puzzled some soldiers during Caesar's wars, but today even young kids can recover the original message from the ciphered one.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">247</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="55339aaf2a3eb6a2" weblate-flags="read-only">
        <source>The security of the Caesar cipher depends on the confidentiality of the algorithm, but experience has shown that it is impossible to assume that an algorithm will remain secret, even for military applications. Instead, cryptographic techniques must be designed by assuming that the algorithm will be public and known to anyone. However, its behavior must be controlled by a small parameter, known as the key, that will only be known by the users who need to communicate secretly. This principle is attributed to Auguste Kerckhoff, a French cryptographer who first documented it :</source>
        <target state="translated">The security of the Caesar cipher depends on the confidentiality of the algorithm, but experience has shown that it is impossible to assume that an algorithm will remain secret, even for military applications. Instead, cryptographic techniques must be designed by assuming that the algorithm will be public and known to anyone. However, its behavior must be controlled by a small parameter, known as the key, that will only be known by the users who need to communicate secretly. This principle is attributed to Auguste Kerckhoff, a French cryptographer who first documented it :</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">261</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="64d0576a12b5b44d" weblate-flags="read-only">
        <source>`A cryptographic algorithm should be secure even if the attacker knows everything about the system, except one parameter known as the secret key.`</source>
        <target state="translated">`A cryptographic algorithm should be secure even if the attacker knows everything about the system, except one parameter known as the secret key.`</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">270</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="b65ec9f5ccd521cc" weblate-flags="read-only">
        <source>This principle is important because it remains the basic assumption of all cryptographers. Any system that relies on the secrecy of its algorithm to be considered secure is doomed to fail and be broken one day.</source>
        <target state="translated">This principle is important because it remains the basic assumption of all cryptographers. Any system that relies on the secrecy of its algorithm to be considered secure is doomed to fail and be broken one day.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">279</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="35521a9848e357cf" weblate-flags="read-only">
        <source>With the Kerckhoff principle, we can now discuss a simple but powerful encryption scheme that relies on the `XOR` logic operation. This operation is easily implemented in hardware and is supported by all microprocessors. Given a secret, :math:`K`, it is possible to encode a message `M` by computing :math:`C_M = K \oplus M`. The receiver of this messages can recover the original message as since :math:`M = K \oplus (K \oplus M)`. This `XOR` operation is the key operation of the perfect cipher that is also called the Vernam cipher or the one-time pad. This cipher relies on a key that contains purely random bits. The encrypted message is then produced by XORing all the bits of the message with all the bits of the key. Since the key is random, it is impossible for an attacker to recover the original text (or plain text) from the encrypted one. From a security viewpoint, the one-time-pad is the best solution provided that the key is as long as the message.</source>
        <target state="translated">With the Kerckhoff principle, we can now discuss a simple but powerful encryption scheme that relies on the `XOR` logic operation. This operation is easily implemented in hardware and is supported by all microprocessors. Given a secret, :math:`K`, it is possible to encode a message `M` by computing :math:`C_M = K \oplus M`. The receiver of this messages can recover the original message as since :math:`M = K \oplus (K \oplus M)`. This `XOR` operation is the key operation of the perfect cipher that is also called the Vernam cipher or the one-time pad. This cipher relies on a key that contains purely random bits. The encrypted message is then produced by XORing all the bits of the message with all the bits of the key. Since the key is random, it is impossible for an attacker to recover the original text (or plain text) from the encrypted one. From a security viewpoint, the one-time-pad is the best solution provided that the key is as long as the message.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">287</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="1ba3728c0a7f6d1a" weblate-flags="read-only">
        <source>Unfortunately, it is difficult to use this cipher in practice since the key must be as long as the message that needs to be transmitted. If the key is smaller than the message and the message is divided into blocks that have the same length as the key, then the scheme becomes less secure since the same key is used to decrypt different parts of the message. In practice, `XOR` is often one of the basic operations used by encryption schemes. To be usable, the deployed encryption schemes use keys that are composed of a small number of bits, typically 56, 64, 128, 256, ...</source>
        <target state="translated">Unfortunately, it is difficult to use this cipher in practice since the key must be as long as the message that needs to be transmitted. If the key is smaller than the message and the message is divided into blocks that have the same length as the key, then the scheme becomes less secure since the same key is used to decrypt different parts of the message. In practice, `XOR` is often one of the basic operations used by encryption schemes. To be usable, the deployed encryption schemes use keys that are composed of a small number of bits, typically 56, 64, 128, 256, ...</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">301</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="6e817ecfac808d39" weblate-flags="read-only">
        <source>A secret key encryption scheme is a perfectly reversible functions, i.e. given an encryption function `E`, there is an associated decryption function `D` such that :math:`\forall k \forall M : D(K, E(M,K))=M`.</source>
        <target state="translated">A secret key encryption scheme is a perfectly reversible functions, i.e. given an encryption function `E`, there is an associated decryption function `D` such that :math:`\forall k \forall M : D(K, E(M,K))=M`.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">310</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="42435b3e98157975" weblate-flags="read-only">
        <source>Various secret key cryptographic functions have been proposed, implemented and deployed. The most popular ones are :</source>
        <target state="translated">Various secret key cryptographic functions have been proposed, implemented and deployed. The most popular ones are :</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">316</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="f3bfe4a54140884e" weblate-flags="read-only">
        <source>DES, the Data Encryption Standard that became a standard in 1977 and has been widely used by industry. It uses 56 bits keys that are not considered sufficiently secure nowadays since attackers can launch brute-force attacks by testing all possible keys. Triple DES combines three 56 bits keys, making the brute force attacks more difficult.</source>
        <target state="translated">DES, the Data Encryption Standard that became a standard in 1977 and has been widely used by industry. It uses 56 bits keys that are not considered sufficiently secure nowadays since attackers can launch brute-force attacks by testing all possible keys. Triple DES combines three 56 bits keys, making the brute force attacks more difficult.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">319</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="56223838dfbe371b" weblate-flags="read-only">
        <source>RC4 is an encryption scheme defined in the late 1980s by Ron Rivest for RSA Security. Given the speed of its software implementation, it has been included in various protocols and implementations. However, cryptographers have identified several weaknesses in this algorithm. It is now deprecated and should not be used anymore :rfc:`7465`.</source>
        <target state="translated">RC4 is an encryption scheme defined in the late 1980s by Ron Rivest for RSA Security. Given the speed of its software implementation, it has been included in various protocols and implementations. However, cryptographers have identified several weaknesses in this algorithm. It is now deprecated and should not be used anymore :rfc:`7465`.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">324</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="bafcd843867f4c9c" weblate-flags="read-only">
        <source>AES or the Advanced Encryption Standard is an encryption scheme that was designed by the Belgian cryptographers Joan Daemen and Vincent Rijmen in 2001 [DR2002]_. This algorithm  has been standardized by the U.S. National Institute of Standards and Technology (NIST). It is now used by a wide range of applications and various hardware and software implementations exist. Many microprocessors include special instructions that ease the implementation of AES. AES divides the message to be encrypted in blocks of 128 bits and uses keys of length 128, 192 or 256 bits. The block size and the key length are important parameters of an encryption scheme. The block size indicates the smallest message that can be encrypted and forces the sender to divide each message in blocks of the supported size. If the message is larger than an integer number of blocks, then the message must be padded before being encrypted and this padding must be removed after decryption. The key size indicates the resistance of the encryption scheme against brute force attacks, i.e. attacks where the attacker tries all possible keys to find the correct one.</source>
        <target state="translated">AES or the Advanced Encryption Standard is an encryption scheme that was designed by the Belgian cryptographers Joan Daemen and Vincent Rijmen in 2001 [DR2002]_. This algorithm  has been standardized by the U.S. National Institute of Standards and Technology (NIST). It is now used by a wide range of applications and various hardware and software implementations exist. Many microprocessors include special instructions that ease the implementation of AES. AES divides the message to be encrypted in blocks of 128 bits and uses keys of length 128, 192 or 256 bits. The block size and the key length are important parameters of an encryption scheme. The block size indicates the smallest message that can be encrypted and forces the sender to divide each message in blocks of the supported size. If the message is larger than an integer number of blocks, then the message must be padded before being encrypted and this padding must be removed after decryption. The key size indicates the resistance of the encryption scheme against brute force attacks, i.e. attacks where the attacker tries all possible keys to find the correct one.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">329</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="cf984c69a85ddc47" weblate-flags="read-only">
        <source>AES is widely used as of this writing, but other secret key encryption schemes continue to appear. ChaCha20, proposed by D. Bernstein is now used by several internet protocols :rfc:`7539`. A detailed discussion of encryption schemes is outside the scope of this book. We will consider encryption schemes as black boxes whose operation depends on a single key. A detailed overview of several of these schemes may be found in [MVV2011]_.</source>
        <target state="translated">AES is widely used as of this writing, but other secret key encryption schemes continue to appear. ChaCha20, proposed by D. Bernstein is now used by several internet protocols :rfc:`7539`. A detailed discussion of encryption schemes is outside the scope of this book. We will consider encryption schemes as black boxes whose operation depends on a single key. A detailed overview of several of these schemes may be found in [MVV2011]_.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">354</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="aa9134a90095265d" weblate-flags="read-only">
        <source>In the 1970s, Diffie and Hellman proposed in their seminal paper [DH1976]_, a different type of encryption : `public key cryptography`. In public key cryptography, each user has two different keys :</source>
        <target state="translated">In the 1970s, Diffie and Hellman proposed in their seminal paper [DH1976]_, a different type of encryption : `public key cryptography`. In public key cryptography, each user has two different keys :</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">363</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="f21371b70fa8db11" weblate-flags="read-only">
        <source>a public key (:math:`K_{pub}`) that he can distribute to everyone</source>
        <target state="translated">a public key (:math:`K_{pub}`) that he can distribute to everyone</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">367</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="aab990f251e30d98" weblate-flags="read-only">
        <source>a private key (:math:`K_{priv}`) that he needs to store in a secure manner and never reveal to anyone</source>
        <target state="translated">a private key (:math:`K_{priv}`) that he needs to store in a secure manner and never reveal to anyone</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">368</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="24458fa581786542" weblate-flags="read-only">
        <source>These two keys are generated together and they are linked by a complex mathematical relationship that is such that it is computationally difficult to compute :math:`K_{priv}` from :math:`K_{pub}`.</source>
        <target state="translated">These two keys are generated together and they are linked by a complex mathematical relationship that is such that it is computationally difficult to compute :math:`K_{priv}` from :math:`K_{pub}`.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">371</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="bb277fea40e1d47f" weblate-flags="read-only">
        <source>A public key cryptographic scheme is a combination of two functions :</source>
        <target state="translated">A public key cryptographic scheme is a combination of two functions :</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">375</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="2fca6e0ae4a80230" weblate-flags="read-only">
        <source>an encryption function, :math:`E_{p}`, that takes a key and a message as parameters</source>
        <target state="translated">an encryption function, :math:`E_{p}`, that takes a key and a message as parameters</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">377</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="d5146955a01fe924" weblate-flags="read-only">
        <source>a decryption function, :math:`D_{p}`, that takes a key and a message as parameters</source>
        <target state="translated">a decryption function, :math:`D_{p}`, that takes a key and a message as parameters</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">378</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="07053e1a2dd984a2" weblate-flags="read-only">
        <source>The public key is used to encrypt a message so that it can only be read by the intended recipient. For example, let us consider two users : Alice and Bob. Alice (resp. Bob) uses the keys :math:`A_{priv}` and :math:`A_{pub}` (resp. :math:`B_{priv}` and :math:`B_{pub}`). To send a secure message `M` to Alice, Bob computes :math:`CM=E_p(A_{pub},M)` and Alice can decrypt it by using :math:`D_p(A_{priv},CM)=D_p(A_{priv},E_p(A_{pub},M))=M`.</source>
        <target state="translated">The public key is used to encrypt a message so that it can only be read by the intended recipient. For example, let us consider two users : Alice and Bob. Alice (resp. Bob) uses the keys :math:`A_{priv}` and :math:`A_{pub}` (resp. :math:`B_{priv}` and :math:`B_{pub}`). To send a secure message `M` to Alice, Bob computes :math:`CM=E_p(A_{pub},M)` and Alice can decrypt it by using :math:`D_p(A_{priv},CM)=D_p(A_{priv},E_p(A_{pub},M))=M`.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">380</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="7bff258d82d9a831" weblate-flags="read-only">
        <source>Several public key encryption schemes have been proposed. Two of them have reached wide deployment :</source>
        <target state="translated">Several public key encryption schemes have been proposed. Two of them have reached wide deployment :</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">393</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="acbf04d6fcfe91b2" weblate-flags="read-only">
        <source>The Rivest Shamir Adleman (RSA) algorithm [#frsa]_ proposed in [RSA1978]_ that relies on modular exponentiation with large integers.</source>
        <target state="translated">The Rivest Shamir Adleman (RSA) algorithm [#frsa]_ proposed in [RSA1978]_ that relies on modular exponentiation with large integers.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">396</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="dd22398ce1e8d118" weblate-flags="read-only">
        <source>The Elliptic Curve Cryptography techniques [#fecc]_ that rely on special properties of elliptic curves.</source>
        <target state="translated">The Elliptic Curve Cryptography techniques [#fecc]_ that rely on special properties of elliptic curves.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">398</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="5af5a18ffb3a270f" weblate-flags="read-only">
        <source>Another interesting property of public key cryptography is its ability to compute `signatures` that can be used to authenticate a message. This capability comes from the utilization of two different keys that are linked together. If Alice wants to sign a message `M`, she can compute :math:`SM=E_p(A_{priv},M)`. Anyone who receives this signed messaged can extract its content as :math:`D_p(A_{pub},SM)=D_p(A_{pub},E_p(A_{priv},M))=M`. Everyone can use :math:`A_{pub}` to check that the message was signed by using Alice's private key (:math:`A_{priv}`). Since this key is only known by Alice, the ability to decrypt `SM` is a proof that the message was signed by Alice herself.</source>
        <target state="translated">Another interesting property of public key cryptography is its ability to compute `signatures` that can be used to authenticate a message. This capability comes from the utilization of two different keys that are linked together. If Alice wants to sign a message `M`, she can compute :math:`SM=E_p(A_{priv},M)`. Anyone who receives this signed messaged can extract its content as :math:`D_p(A_{pub},SM)=D_p(A_{pub},E_p(A_{priv},M))=M`. Everyone can use :math:`A_{pub}` to check that the message was signed by using Alice's private key (:math:`A_{priv}`). Since this key is only known by Alice, the ability to decrypt `SM` is a proof that the message was signed by Alice herself.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">401</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="7a95c92463bca2bb" weblate-flags="read-only">
        <source>In practice, encrypting a message to sign it can be computationally costly, in particular if the message is a large file. A faster solution would be to summarize the document and only sign the summary of the document. A naive approach could be based on a checksum or CRC computed over the message. Alice would then compute :math:`C=Checksum(M)` and :math:`SC=E_p(A_{priv},C)`. She would then send both `M` and `SC` to the recipient of the message who can easily compute `C` from `SC` and verify the authenticity of the message. Unfortunately, this solution does not protect Alice and the message's recipient against a man-in-the-middle attack. If Mallory can intercept the message sent by Alice, he can easily modify Alice's message and tweak it so that it has the same checksum as the original one. The CRCs, although more complex to compute, suffer from the same problem.</source>
        <target state="translated">In practice, encrypting a message to sign it can be computationally costly, in particular if the message is a large file. A faster solution would be to summarize the document and only sign the summary of the document. A naive approach could be based on a checksum or CRC computed over the message. Alice would then compute :math:`C=Checksum(M)` and :math:`SC=E_p(A_{priv},C)`. She would then send both `M` and `SC` to the recipient of the message who can easily compute `C` from `SC` and verify the authenticity of the message. Unfortunately, this solution does not protect Alice and the message's recipient against a man-in-the-middle attack. If Mallory can intercept the message sent by Alice, he can easily modify Alice's message and tweak it so that it has the same checksum as the original one. The CRCs, although more complex to compute, suffer from the same problem.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">412</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="50e8cb947028c61a" weblate-flags="read-only">
        <source>To efficiently sign messages, Alice needs to be able to compute a summary of her message in a way that makes prohibits an attacker from generating a different message that has the same summary. `Cryptographic hash functions` were designed to solve this problem. The ideal hash function is a function that returns a different number for every possible input. In practice, it is impossible to find such a function. Cryptographic hash functions are an approximation of this perfect summarization function. They compute a summary of a given message in 128, 160, 256 bits or more. They also exhibit the `avalanche effect`. This effect indicates that a small change in the message causes a large change in the hash value. Finally hash functions are very difficult to invert. Knowing a hash value, it is computationally very difficult to find the corresponding input message. Several hash functions have been proposed by cryptographers. The most popular ones are :</source>
        <target state="translated">To efficiently sign messages, Alice needs to be able to compute a summary of her message in a way that makes prohibits an attacker from generating a different message that has the same summary. `Cryptographic hash functions` were designed to solve this problem. The ideal hash function is a function that returns a different number for every possible input. In practice, it is impossible to find such a function. Cryptographic hash functions are an approximation of this perfect summarization function. They compute a summary of a given message in 128, 160, 256 bits or more. They also exhibit the `avalanche effect`. This effect indicates that a small change in the message causes a large change in the hash value. Finally hash functions are very difficult to invert. Knowing a hash value, it is computationally very difficult to find the corresponding input message. Several hash functions have been proposed by cryptographers. The most popular ones are :</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">433</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="88fba5feb8852861" weblate-flags="read-only">
        <source>MD5, originally proposed in :rfc:`1321`. It has been used in a wide range of applications. In 2010, attacks against MD5 were published and this hash function is now deprecated.</source>
        <target state="translated">MD5, originally proposed in :rfc:`1321`. It has been used in a wide range of applications. In 2010, attacks against MD5 were published and this hash function is now deprecated.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">447</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="50b70c79504e6d2b" weblate-flags="read-only">
        <source>SHA-1 is a cryptographic hash function that was standardized by the NIST in 1995. It outputs 160 bits results. It is now used in a variety of network protocols.</source>
        <target state="translated">SHA-1 is a cryptographic hash function that was standardized by the NIST in 1995. It outputs 160 bits results. It is now used in a variety of network protocols.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">450</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="74271dc661b34323" weblate-flags="read-only">
        <source>SHA-2 is another family of cryptographic hash functions designed by the NIST. Different variants of SHA-2 can produce has values of 224, 256, 384 or 512 bits.</source>
        <target state="translated">SHA-2 is another family of cryptographic hash functions designed by the NIST. Different variants of SHA-2 can produce has values of 224, 256, 384 or 512 bits.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">453</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="cf27d8c6e63fc25c" weblate-flags="read-only">
        <source>Another important point about cryptographic algorithms is that often these algorithms require random numbers to operate correctly (e.g. to generate keys). Generating good random numbers is difficult and any implementation of cryptographic algorithms should also include a secure random number generator. :rfc:`4086` provides useful recommendations.</source>
        <target state="translated">Another important point about cryptographic algorithms is that often these algorithms require random numbers to operate correctly (e.g. to generate keys). Generating good random numbers is difficult and any implementation of cryptographic algorithms should also include a secure random number generator. :rfc:`4086` provides useful recommendations.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">458</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="93fb294c6ce07986" weblate-flags="read-only">
        <source>Cryptographic protocols</source>
        <target state="translated">Cryptographic protocols</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">469</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="3ff6aac4c9284d85" weblate-flags="read-only">
        <source>We can now combine the cryptographic operations described in the previous section to build some protocols to securely exchange information. Let us first go back to the problem of authenticating Alice on Bob's computer. We have shown earlier that using a simple password for this purpose is insecure in the presence of attackers.</source>
        <target state="translated">We can now combine the cryptographic operations described in the previous section to build some protocols to securely exchange information. Let us first go back to the problem of authenticating Alice on Bob's computer. We have shown earlier that using a simple password for this purpose is insecure in the presence of attackers.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">471</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="c2ec8412371e2cfa" weblate-flags="read-only">
        <source>A naive approach would be to rely on hash functions. Since hash functions are non-invertible, Alice and Bob could decide to use them to exchange Alice's password in a secure manner. Then, Alice could be authenticated by using the following exchange.</source>
        <target state="translated">A naive approach would be to rely on hash functions. Since hash functions are non-invertible, Alice and Bob could decide to use them to exchange Alice's password in a secure manner. Then, Alice could be authenticated by using the following exchange.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">478</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="ea277c91c7e905d2" weblate-flags="read-only">
        <source>Since the hash function cannot be inverted, an eavesdropper cannot extract Alice's password by simply observing the data exchanged. However, Alice's real password is not the objective of an attacker. The main objective for Mallory is to be authenticated as Alice. If Mallory can capture `Hash(passwd)`, he can simply replay this data, without being able to invert the hash function. This is called a `replay attack`.</source>
        <target state="translated">Since the hash function cannot be inverted, an eavesdropper cannot extract Alice's password by simply observing the data exchanged. However, Alice's real password is not the objective of an attacker. The main objective for Mallory is to be authenticated as Alice. If Mallory can capture `Hash(passwd)`, he can simply replay this data, without being able to invert the hash function. This is called a `replay attack`.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">509</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="03aaa304ee7232e4" weblate-flags="read-only">
        <source>To counter this replay attack, we need to ensure that Alice never sends the same information twice to Bob. A possible mode of operation is shown below.</source>
        <target state="translated">To counter this replay attack, we need to ensure that Alice never sends the same information twice to Bob. A possible mode of operation is shown below.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">516</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="c2331adb3fc86d2a" weblate-flags="read-only">
        <source>To authenticate herself, Alice sends her user identifier to Bob. Bob replies with a random number as a challenge to verify that Alice knows the shared secret (i.e. her password). Alice replies with the result of the computation of a hash function (e.g. SHA-1) over a string that is the concatenation between the random number chosen by Bob and Alice's password. The random number chosen by Bob is often called a `nonce` since this is a number that should only be used once. Bob performs the same computation locally and can check the message returned by Alice. This type of authentication scheme has been used in various protocols. It prevents replay attacks. If Eve captures the messages exchanged by Alice and Bob, she cannot recover Alice's password from the messages exchanged since hash functions are non-invertible. Furthermore, she cannot replay the hashed value since Bob will always send a different nonce.</source>
        <target state="translated">To authenticate herself, Alice sends her user identifier to Bob. Bob replies with a random number as a challenge to verify that Alice knows the shared secret (i.e. her password). Alice replies with the result of the computation of a hash function (e.g. SHA-1) over a string that is the concatenation between the random number chosen by Bob and Alice's password. The random number chosen by Bob is often called a `nonce` since this is a number that should only be used once. Bob performs the same computation locally and can check the message returned by Alice. This type of authentication scheme has been used in various protocols. It prevents replay attacks. If Eve captures the messages exchanged by Alice and Bob, she cannot recover Alice's password from the messages exchanged since hash functions are non-invertible. Furthermore, she cannot replay the hashed value since Bob will always send a different nonce.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">545</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="adf8181023a90241" weblate-flags="read-only">
        <source>Unfortunately, this solution forces Bob to store Alice's password in clear. Any breach in the security of Bob's computer would reveal Alice's password. Such breaches unfortunately occur and some of them have led to the dissemination of millions of passwords.</source>
        <target state="translated">Unfortunately, this solution forces Bob to store Alice's password in clear. Any breach in the security of Bob's computer would reveal Alice's password. Such breaches unfortunately occur and some of them have led to the dissemination of millions of passwords.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">559</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="697a59ef6c2822ed" weblate-flags="read-only">
        <source>A better approach would be to authenticate Alice without storing her password in clear on Bob's computer. For this, Alice computes a `hash chain` as proposed by Lamport in [Lamport1981]_. A hash chain is a sequence of applications of a hash function (`H`) on an input string. If Alice's password is `P`, then her 10 steps hash chain is : :math:`H(H(H(H(H(H(H(H(H(H(P))))))))))`. The result of this hash chain will be stored on Bob's computer together with the value `10`. This number is the maximum number of remaining authentications for Alice on Bob's computer. To authenticate Alice, Bob sends the remaining number of authentications, i.e. `10` in this example. Since Alice knows her password, `P`, she can compute :math:`H^9(P)=H(H(H(H(H(H(H(H(H(P)))))))))` and send this information to Bob. Bob computes the hash of the value received from Alice (:math:`H(H^9(P))`) and verifies that this value is equal to the value stored in his database. It then decrements the number of authorized authentications and stores :math:`H^9(P)` in his database. Bob is now ready for the next authentication of Alice. When the number of authorized authentications reaches zero, the hash chain needs to be reinitialized. If Eve captures :math:`(H^n(P))`, she cannot use it to authenticate herself as Alice on Bob's computer because Bob will have decremented its number of authorized authentications. Furthermore, given that hash functions are not invertible, Eve cannot compute :math:`H^{n-1}(P)` from :math:`H^{n}(P)`.</source>
        <target state="translated">A better approach would be to authenticate Alice without storing her password in clear on Bob's computer. For this, Alice computes a `hash chain` as proposed by Lamport in [Lamport1981]_. A hash chain is a sequence of applications of a hash function (`H`) on an input string. If Alice's password is `P`, then her 10 steps hash chain is : :math:`H(H(H(H(H(H(H(H(H(H(P))))))))))`. The result of this hash chain will be stored on Bob's computer together with the value `10`. This number is the maximum number of remaining authentications for Alice on Bob's computer. To authenticate Alice, Bob sends the remaining number of authentications, i.e. `10` in this example. Since Alice knows her password, `P`, she can compute :math:`H^9(P)=H(H(H(H(H(H(H(H(H(P)))))))))` and send this information to Bob. Bob computes the hash of the value received from Alice (:math:`H(H^9(P))`) and verifies that this value is equal to the value stored in his database. It then decrements the number of authorized authentications and stores :math:`H^9(P)` in his database. Bob is now ready for the next authentication of Alice. When the number of authorized authentications reaches zero, the hash chain needs to be reinitialized. If Eve captures :math:`(H^n(P))`, she cannot use it to authenticate herself as Alice on Bob's computer because Bob will have decremented its number of authorized authentications. Furthermore, given that hash functions are not invertible, Eve cannot compute :math:`H^{n-1}(P)` from :math:`H^{n}(P)`.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">571</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="caa7ef38948fdc7c" weblate-flags="read-only">
        <source>The two protocols above prevent eavesdropping attacks, but not man-in-the-middle attacks. If Mallory can intercept the messages sent by Alice, he could force her to reveal :math:`H^n(P)` and then use this information to authenticate as Alice on Bob's computer. In practice, hash chains should only be used when the communicating users know that there cannot be any man-in-the-middle on their communication.</source>
        <target state="translated">The two protocols above prevent eavesdropping attacks, but not man-in-the-middle attacks. If Mallory can intercept the messages sent by Alice, he could force her to reveal :math:`H^n(P)` and then use this information to authenticate as Alice on Bob's computer. In practice, hash chains should only be used when the communicating users know that there cannot be any man-in-the-middle on their communication.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">593</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="86e3a8e063af069a" weblate-flags="read-only">
        <source>Public key cryptography provides another possibility to allow Alice to authenticate herself on Bob's computer. Assume again that Alice and Bob know each other from previous encounters. Alice knows Bob's public key (:math:`Bob_{pub}`) and Bob also knows Alice's key (:math:`Alice_{pub}`). To authenticate herself, Alice could send her user identifier. Bob would reply with a random number encrypted with Alice's public key : :math:`E_p(Alice_{pub},R)`. Alice can decrypt this message to recover `R` and sends :math:`E_p(Bob_{pub},R)`. Bob decrypts the nonce and confirms that Alice knows :math:`Alice_{priv}`. If an eavesdropper captures the messages exchanged, he cannot recover the value `R` which could be used as a key to encrypt the information with a secret key algorithm. This is illustrated in the time sequence diagram below.</source>
        <target state="translated">Public key cryptography provides another possibility to allow Alice to authenticate herself on Bob's computer. Assume again that Alice and Bob know each other from previous encounters. Alice knows Bob's public key (:math:`Bob_{pub}`) and Bob also knows Alice's key (:math:`Alice_{pub}`). To authenticate herself, Alice could send her user identifier. Bob would reply with a random number encrypted with Alice's public key : :math:`E_p(Alice_{pub},R)`. Alice can decrypt this message to recover `R` and sends :math:`E_p(Bob_{pub},R)`. Bob decrypts the nonce and confirms that Alice knows :math:`Alice_{priv}`. If an eavesdropper captures the messages exchanged, he cannot recover the value `R` which could be used as a key to encrypt the information with a secret key algorithm. This is illustrated in the time sequence diagram below.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">600</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="92df294020fd8dff" weblate-flags="read-only">
        <source>A drawback of this approach is that Bob is forced to perform two public key computations : one encryption to send the random nonce to Alice and one decryption to recover the nonce encrypted by Alice. If these computations are costly from a CPU viewpoint, this creates a risk of Denial of Service Attacks were attackers could try to access Bob's computer and force it to perform such costly computations. Bob is more at risk than Alice in this situation and he should not perform complex operations before being sure that he is talking with Alice. An alternative is shown in the time sequence diagram below.</source>
        <target state="translated">A drawback of this approach is that Bob is forced to perform two public key computations : one encryption to send the random nonce to Alice and one decryption to recover the nonce encrypted by Alice. If these computations are costly from a CPU viewpoint, this creates a risk of Denial of Service Attacks were attackers could try to access Bob's computer and force it to perform such costly computations. Bob is more at risk than Alice in this situation and he should not perform complex operations before being sure that he is talking with Alice. An alternative is shown in the time sequence diagram below.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">634</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="c7a10a092d1e265a" weblate-flags="read-only">
        <source>Here, Bob simply sends a random nonce to Alice and verifies her signature. Since the random nonce and the signature could be captured by an eavesdropper, they cannot be used as a secret key to encrypt further data. However Bob could propose a secret key and send it encrypted with Alice's public key in response to the signed nonce that he received.</source>
        <target state="translated">Here, Bob simply sends a random nonce to Alice and verifies her signature. Since the random nonce and the signature could be captured by an eavesdropper, they cannot be used as a secret key to encrypt further data. However Bob could propose a secret key and send it encrypted with Alice's public key in response to the signed nonce that he received.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">664</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="43b100242812fe81" weblate-flags="read-only">
        <source>The solution described above works provided that Bob and Alice know their respective public keys before communicating. Otherwise, the protocol is not secure against man-in-the-middle attackers. Consider Mallory sitting in the middle between Alice and Bob and assume that neither Alice nor Bob knows the other's public key.</source>
        <target state="translated">The solution described above works provided that Bob and Alice know their respective public keys before communicating. Otherwise, the protocol is not secure against man-in-the-middle attackers. Consider Mallory sitting in the middle between Alice and Bob and assume that neither Alice nor Bob knows the other's public key.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">671</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="7a4a9157467ef84a" weblate-flags="read-only">
        <source>In the above example, Alice sends her public key, (:math:`Alice_{pub}`), in her first message together with her identity. Mallory intercepts the message and replaces Alice's key with his own key, (:math:`Mallory_{pub}`). Bob replies with a nonce, `R`. Alice then signs the random nonce to prove that she knows :math:`Alice_{priv}`. Mallory discards the information and instead computes :math:`E_p(Mallory_{priv},R)`. Bob now thinks that he is discussing with Alice while Mallory sits in the middle.</source>
        <target state="translated">In the above example, Alice sends her public key, (:math:`Alice_{pub}`), in her first message together with her identity. Mallory intercepts the message and replaces Alice's key with his own key, (:math:`Mallory_{pub}`). Bob replies with a nonce, `R`. Alice then signs the random nonce to prove that she knows :math:`Alice_{priv}`. Mallory discards the information and instead computes :math:`E_p(Mallory_{priv},R)`. Bob now thinks that he is discussing with Alice while Mallory sits in the middle.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">705</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="c9a3c0b24d30dbeb" weblate-flags="read-only">
        <source>There are situations where symmetric authentication is required. In this case, each user must perform some computation with his/her private key. A possible exchange is the following. Alice sends her certificate to Bob. Bob replies with a nonce, :math:`R1`, and provides his certificate. Alice encrypts :math:`R1` with her private key and generates a nonce, :math:`R2`. Bob verifies Alice's computation and encrypts :math:`R2` with his private key. Alice verifies the computation and both have been authenticated.</source>
        <target state="translated">There are situations where symmetric authentication is required. In this case, each user must perform some computation with his/her private key. A possible exchange is the following. Alice sends her certificate to Bob. Bob replies with a nonce, :math:`R1`, and provides his certificate. Alice encrypts :math:`R1` with her private key and generates a nonce, :math:`R2`. Bob verifies Alice's computation and encrypts :math:`R2` with his private key. Alice verifies the computation and both have been authenticated.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">714</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="d2d0d12c2477f6e5" weblate-flags="read-only">
        <source>The protocol described above works, but it takes a long time for Bob to authenticate Alice and for Alice to authenticate Bob. A faster authentication could be the following.</source>
        <target state="translated">The protocol described above works, but it takes a long time for Bob to authenticate Alice and for Alice to authenticate Bob. A faster authentication could be the following.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">747</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="23aa17d7be2e1f7e" weblate-flags="read-only">
        <source>Alice sends her random nonce, :math:`R2`. Bob signs :math:`R2` and sends his nonce : :math:`R1`. Alice signs :math:`R1` and both are authenticated.</source>
        <target state="translated">Alice sends her random nonce, :math:`R2`. Bob signs :math:`R2` and sends his nonce : :math:`R1`. Alice signs :math:`R1` and both are authenticated.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">771</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="af4011b3b93e7c59" weblate-flags="read-only">
        <source>Now consider that Mallory wants to be authenticated as Alice. The above protocol has a subtle flaw that could be exploited by Mallory. This flaw can be exploited if Alice and Bob can act as both client and server. Knowing this, Mallory could operate as follows. Mallory starts an authentication with Bob faking himself as Alice. He sends a first message to Bob including Alice's identity.</source>
        <target state="translated">Now consider that Mallory wants to be authenticated as Alice. The above protocol has a subtle flaw that could be exploited by Mallory. This flaw can be exploited if Alice and Bob can act as both client and server. Knowing this, Mallory could operate as follows. Mallory starts an authentication with Bob faking himself as Alice. He sends a first message to Bob including Alice's identity.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">775</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="8539ec9a94df0249" weblate-flags="read-only">
        <source>In this exchange, Bob authenticates himself by signing the :math:`RA` nonce that was sent by Mallory. Now, to authenticate as Alice, Mallory needs to compute the signature of nonce :math:`RB` with Alice's private key. Mallory does not know Alice's key, but he could exploit the protocol to force Alice to perform the required computation. For this, Mallory can start an authentication to Alice as shown below.</source>
        <target state="translated">In this exchange, Bob authenticates himself by signing the :math:`RA` nonce that was sent by Mallory. Now, to authenticate as Alice, Mallory needs to compute the signature of nonce :math:`RB` with Alice's private key. Mallory does not know Alice's key, but he could exploit the protocol to force Alice to perform the required computation. For this, Mallory can start an authentication to Alice as shown below.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">799</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="bee7dde62535c9ea" weblate-flags="read-only">
        <source>In this example, Mallory has forced Alice to compute :math:`E_p(Alice_{priv},RB)` which is the information required to finalize the first exchange and be authenticated as Alice. This illustrates a common problem with authentication schemes when the same information can be used for different purposes. The problem comes from the fact that Alice agrees to compute her signature on a nonce chosen by Bob (and relayed by Mallory). This problem occurs if the nonce is a simple integer without any structure. If the nonce includes some structure such as some information about Alice and Bob's identities or even a single bit indicating whether the nonce was chosen by a user acting as a client (i.e. starting the authentication) or as a server, then the protocol is not vulnerable anymore.</source>
        <target state="translated">In this example, Mallory has forced Alice to compute :math:`E_p(Alice_{priv},RB)` which is the information required to finalize the first exchange and be authenticated as Alice. This illustrates a common problem with authentication schemes when the same information can be used for different purposes. The problem comes from the fact that Alice agrees to compute her signature on a nonce chosen by Bob (and relayed by Mallory). This problem occurs if the nonce is a simple integer without any structure. If the nonce includes some structure such as some information about Alice and Bob's identities or even a single bit indicating whether the nonce was chosen by a user acting as a client (i.e. starting the authentication) or as a server, then the protocol is not vulnerable anymore.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">822</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="31960ce871b35297" weblate-flags="read-only">
        <source>To cope with some of the above mentioned problems, public-key cryptography is usually combined with certificates. A `certificate` is a data structure that includes a signature from a trusted third party. A simple explanation of the utilization of certificates is to consider that Alice and Bob both know Ted. Ted is trusted by these two users and both have stored Ted's public key : :math:`Ted_{pub}`. Since they both know Ted's key, he can issue certificates. A certificate is mainly a cryptographic link between the identity of a user and his/her public key. Such a certificate can be computed in different ways. A simple solution is for Ted to generate a file that contains the following information for each certified user :</source>
        <target state="translated">To cope with some of the above mentioned problems, public-key cryptography is usually combined with certificates. A `certificate` is a data structure that includes a signature from a trusted third party. A simple explanation of the utilization of certificates is to consider that Alice and Bob both know Ted. Ted is trusted by these two users and both have stored Ted's public key : :math:`Ted_{pub}`. Since they both know Ted's key, he can issue certificates. A certificate is mainly a cryptographic link between the identity of a user and his/her public key. Such a certificate can be computed in different ways. A simple solution is for Ted to generate a file that contains the following information for each certified user :</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">837</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="e0dfefd610d86b25" weblate-flags="read-only">
        <source>his/her identity</source>
        <target state="translated">his/her identity</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">849</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="bb097f957d8cdc76" weblate-flags="read-only">
        <source>his/her public key</source>
        <target state="translated">his/her public key</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">850</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="449ed94854362cbf" weblate-flags="read-only">
        <source>a hash of the entire file signed with Ted's private key</source>
        <target state="translated">a hash of the entire file signed with Ted's private key</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">851</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="24a319954a30112f" weblate-flags="read-only">
        <source>Then, knowing Ted's public key, anyone can verify the validity of a certificate. When a user sends his/her public key, he/she must also attach the certificate to prove the link between his/her identity and the public key. In practice, certificates are more complex than this. Certificates will often be used to authenticate the server and sometimes to authenticate the client.</source>
        <target state="translated">Then, knowing Ted's public key, anyone can verify the validity of a certificate. When a user sends his/her public key, he/she must also attach the certificate to prove the link between his/her identity and the public key. In practice, certificates are more complex than this. Certificates will often be used to authenticate the server and sometimes to authenticate the client.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">853</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="c913927a5f498d98" weblate-flags="read-only">
        <source>A possible protocol could then be the following. Alice sends :math:`Cert(Alice_{pub},Ted)`. Bob replies with a random nonce.</source>
        <target state="translated">A possible protocol could then be the following. Alice sends :math:`Cert(Alice_{pub},Ted)`. Bob replies with a random nonce.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">860</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="413348fe35d5608a" weblate-flags="read-only">
        <source>Until now, we have only discussed the authentication problem. This is an important but not sufficient step to have a secure communication between two users through an insecure network. To securely exchange information, Alice and Bob need to both :</source>
        <target state="translated">Until now, we have only discussed the authentication problem. This is an important but not sufficient step to have a secure communication between two users through an insecure network. To securely exchange information, Alice and Bob need to both :</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">885</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="5741d01294e0a770" weblate-flags="read-only">
        <source>mutually authenticate each other</source>
        <target state="translated">mutually authenticate each other</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">890</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="3a11d975b85697bf" weblate-flags="read-only">
        <source>agree on a way to encrypt the messages that they will exchange</source>
        <target state="translated">agree on a way to encrypt the messages that they will exchange</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">891</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="e8191f4b5f4a17c7" weblate-flags="read-only">
        <source>Let us first explore how this could be realized by using public-key cryptography. We assume that Alice and Bob have both a public-private key pair and the corresponding certificates signed by a trusted third party : Ted.</source>
        <target state="translated">Let us first explore how this could be realized by using public-key cryptography. We assume that Alice and Bob have both a public-private key pair and the corresponding certificates signed by a trusted third party : Ted.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">893</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="1a5603e26bbf3dff" weblate-flags="read-only">
        <source>A possible protocol would be the following. Alice sends :math:`Cert(Alice_{pub},Ted)`. This certificate provides Alice's identity and her public key. Bob replies with the certificate containing his own public key : :math:`Cert(Bob_{pub},Ted)`. At this point, they both know the other public key and could use it to send encrypted messages. Alice would send :math:`E_p(Bob_{pub},M1)` and Bob would send :math:`E_p(Alice_{pub},M2)`. In practice, using public key encryption techniques to encrypt a large number of messages is inefficient because these cryptosystems require a large number of computations. It is more efficient to use secret key cryptosystems for most of the data and only use a public key cryptosystem to encrypt the random secret keys that will be used by the secret key encryption scheme.</source>
        <target state="translated">A possible protocol would be the following. Alice sends :math:`Cert(Alice_{pub},Ted)`. This certificate provides Alice's identity and her public key. Bob replies with the certificate containing his own public key : :math:`Cert(Bob_{pub},Ted)`. At this point, they both know the other public key and could use it to send encrypted messages. Alice would send :math:`E_p(Bob_{pub},M1)` and Bob would send :math:`E_p(Alice_{pub},M2)`. In practice, using public key encryption techniques to encrypt a large number of messages is inefficient because these cryptosystems require a large number of computations. It is more efficient to use secret key cryptosystems for most of the data and only use a public key cryptosystem to encrypt the random secret keys that will be used by the secret key encryption scheme.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">898</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="e098c9f7f4b71deb" weblate-flags="read-only">
        <source>Key exchange</source>
        <target state="translated">Key exchange</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">913</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="5afa2523d47f4327" weblate-flags="read-only">
        <source>When users want to communicate securely through a network, they need to exchange information such as the keys that will be used by an encryption algorithm even in the presence of an eavesdropper. The most widely used algorithm that allows two users to safely exchange an integer in the presence of an eavesdropper is the one proposed by Diffie and Hellman [DH1976]_. It operates with (large) integers. Two of them are public, the modulus, p, which is prime and the base, g, which must be a primitive root of p. The communicating users select a random integer, :math:`a` for Alice and :math:`b` for Bob. The exchange starts as :</source>
        <target state="translated">When users want to communicate securely through a network, they need to exchange information such as the keys that will be used by an encryption algorithm even in the presence of an eavesdropper. The most widely used algorithm that allows two users to safely exchange an integer in the presence of an eavesdropper is the one proposed by Diffie and Hellman [DH1976]_. It operates with (large) integers. Two of them are public, the modulus, p, which is prime and the base, g, which must be a primitive root of p. The communicating users select a random integer, :math:`a` for Alice and :math:`b` for Bob. The exchange starts as :</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">920</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="f6ed1fcc1bf4ce60" weblate-flags="read-only">
        <source>Alice selects a random integer, :math:`a` and sends :math:`A=g^{a} \mod p` to Bob</source>
        <target state="translated">Alice selects a random integer, :math:`a` and sends :math:`A=g^{a} \mod p` to Bob</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">931</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="c424aef012e93d7b" weblate-flags="read-only">
        <source>Bob selects a random integer, :math:`b` and sends :math:`B=g^{b} \mod p` to Alice</source>
        <target state="translated">Bob selects a random integer, :math:`b` and sends :math:`B=g^{b} \mod p` to Alice</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">933</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="582a844d1dbb9ba0" weblate-flags="read-only">
        <source>From her knowledge of :math:`a` and :math:`B`, Alice can compute :math:`Secret=B^{a} \mod p= (g^{b} \mod p) ^{a} \mod p=g^{a \times b} \mod p`</source>
        <target state="translated">From her knowledge of :math:`a` and :math:`B`, Alice can compute :math:`Secret=B^{a} \mod p= (g^{b} \mod p) ^{a} \mod p=g^{a \times b} \mod p`</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">935</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="38c2ad65e8838674" weblate-flags="read-only">
        <source>From is knowledge of :math:`b` and :math:`A`, Bob can compute :math:`Secret=A^{b} \mod p=(g^{a} \mod p) ^{b} \mod p=g^{a \times b} \mod p`</source>
        <target state="translated">From is knowledge of :math:`b` and :math:`A`, Bob can compute :math:`Secret=A^{b} \mod p=(g^{a} \mod p) ^{b} \mod p=g^{a \times b} \mod p`</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">937</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="c618f6603ee45410" weblate-flags="read-only">
        <source>The security of this protocol relies on the difficulty of computing discrete logarithms, i.e. from the knowledge of :math:`A` (resp. :math:`B`), it is very difficult to extract :math:`\log(A)=\log(g^{a} \mod p)=a` (resp. :math:`\log(B)=\log(g^{b} \mod p)=b`).</source>
        <target state="translated">The security of this protocol relies on the difficulty of computing discrete logarithms, i.e. from the knowledge of :math:`A` (resp. :math:`B`), it is very difficult to extract :math:`\log(A)=\log(g^{a} \mod p)=a` (resp. :math:`\log(B)=\log(g^{b} \mod p)=b`).</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">940</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="220f8b40d0c69ebb" weblate-flags="read-only">
        <source>An example of the utilization of the Diffie-Hellman key exchange is shown below. Before starting the exchange, Alice and Bob agree on a modulus (:math:`p=23`) and a base (:math:`g=5`). These two numbers are public. They are typically part of the standard that defines the protocol that uses the key exchange.</source>
        <target state="translated">An example of the utilization of the Diffie-Hellman key exchange is shown below. Before starting the exchange, Alice and Bob agree on a modulus (:math:`p=23`) and a base (:math:`g=5`). These two numbers are public. They are typically part of the standard that defines the protocol that uses the key exchange.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">945</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="d59427aa2361a1c3" weblate-flags="read-only">
        <source>Alice chooses a secret integer : :math:`a=8` and sends :math:`A= g^{a} \mod p= 5^{8} \mod 23=16` to Bob</source>
        <target state="translated">Alice chooses a secret integer : :math:`a=8` and sends :math:`A= g^{a} \mod p= 5^{8} \mod 23=16` to Bob</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">951</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="d74571d3540001e4" weblate-flags="read-only">
        <source>Bob chooses a secret integer : :math:`b=13` and sends :math:`B= g^{b} \mod p=5^{13} \mod 23=21` to Alice</source>
        <target state="translated">Bob chooses a secret integer : :math:`b=13` and sends :math:`B= g^{b} \mod p=5^{13} \mod 23=21` to Alice</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">953</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="2ca74a42906c063c" weblate-flags="read-only">
        <source>Alice computes :math:`S_{A}=B^{a} \mod p= 21^{8} \mod 23=3`</source>
        <target state="translated">Alice computes :math:`S_{A}=B^{a} \mod p= 21^{8} \mod 23=3`</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">955</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="d52aeef5fb13d409" weblate-flags="read-only">
        <source>Bob computes :math:`S_{B}=A^{b} \mod p= 16^{13} \mod 23=3`</source>
        <target state="translated">Bob computes :math:`S_{B}=A^{b} \mod p= 16^{13} \mod 23=3`</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">956</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="fcd8ae9bdbb1126c" weblate-flags="read-only">
        <source>Alice and Bob have agreed on the secret information :math:`3` without having sent it explicitly through the network. If the integers used are large enough and have good properties, then even Eve who can capture all the messages sent by Alice and Bob cannot recover the secret key that they have exchanged. There is no formal proof of the security of the algorithm, but mathematicians have tried to solve similar problems with integers during centuries without finding an efficient algorithm. As long as the integers that are used are random and large enough, the only possible attack for Eve is to test all possible integers that could have been chosen by Alice and Bob. This is computationally very expensive. This algorithm is widely used in security protocols to agree on a secret key.</source>
        <target state="translated">Alice and Bob have agreed on the secret information :math:`3` without having sent it explicitly through the network. If the integers used are large enough and have good properties, then even Eve who can capture all the messages sent by Alice and Bob cannot recover the secret key that they have exchanged. There is no formal proof of the security of the algorithm, but mathematicians have tried to solve similar problems with integers during centuries without finding an efficient algorithm. As long as the integers that are used are random and large enough, the only possible attack for Eve is to test all possible integers that could have been chosen by Alice and Bob. This is computationally very expensive. This algorithm is widely used in security protocols to agree on a secret key.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">958</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="b5b61d1b5e14eb66" weblate-flags="read-only">
        <source>Unfortunately, the Diffie-Hellman key exchange alone cannot cope with man-in-the middle attacks. Consider Mallory who sits in the middle between Alice and Bob and can easily capture and modify their messages. The modulus and the base are public. They are thus known by Mallory as well. He could then operate as follows :</source>
        <target state="translated">Unfortunately, the Diffie-Hellman key exchange alone cannot cope with man-in-the middle attacks. Consider Mallory who sits in the middle between Alice and Bob and can easily capture and modify their messages. The modulus and the base are public. They are thus known by Mallory as well. He could then operate as follows :</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">970</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="c1009ad3698a0266" weblate-flags="read-only">
        <source>Alice chooses a secret integer and sends :math:`A= g^{a} \mod p` to Mallory</source>
        <target state="translated">Alice chooses a secret integer and sends :math:`A= g^{a} \mod p` to Mallory</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">976</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="c68644afec9d73fe" weblate-flags="read-only">
        <source>Mallory generates a secret integer, :math:`m` and sends :math:`M=g^{m} \mod p` to Bob</source>
        <target state="translated">Mallory generates a secret integer, :math:`m` and sends :math:`M=g^{m} \mod p` to Bob</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">977</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="a2347bb59a7986eb" weblate-flags="read-only">
        <source>Bob chooses a secret integer and sends :math:`B=g^{b} \mod p` to Mallory</source>
        <target state="translated">Bob chooses a secret integer and sends :math:`B=g^{b} \mod p` to Mallory</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">978</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="b30f2bd5aef2d351" weblate-flags="read-only">
        <source>Mallory computes :math:`S_{A}=A^{m} \mod p` and :math:`S_{B}=B^{m} \mod p`</source>
        <target state="translated">Mallory computes :math:`S_{A}=A^{m} \mod p` and :math:`S_{B}=B^{m} \mod p`</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">979</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="174b9c396f100f8f" weblate-flags="read-only">
        <source>Alice computes :math:`S_{A}=M^{a} \mod p` and uses this key to communicate with Mallory (acting as Bob)</source>
        <target state="translated">Alice computes :math:`S_{A}=M^{a} \mod p` and uses this key to communicate with Mallory (acting as Bob)</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">980</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="37e3d9b3daf47b04" weblate-flags="read-only">
        <source>Bob computes :math:`S_{B}=M^{b} \mod p` and uses this key to communicate with Mallory (acting as Alice)</source>
        <target state="translated">Bob computes :math:`S_{B}=M^{b} \mod p` and uses this key to communicate with Mallory (acting as Alice)</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">981</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="4b732247108748f2" weblate-flags="read-only">
        <source>When Alice sends a message, she encrypts it with :math:`S_{A}`. Mallory decrypts it with :math:`S_{A}` and encrypts the plaintext with :math:`S_{B}`. When Bob receives the message, he can decrypt it by using :math:`S_{B}`.</source>
        <target state="translated">When Alice sends a message, she encrypts it with :math:`S_{A}`. Mallory decrypts it with :math:`S_{A}` and encrypts the plaintext with :math:`S_{B}`. When Bob receives the message, he can decrypt it by using :math:`S_{B}`.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">983</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="bca04998c8b05e61" weblate-flags="read-only">
        <source>To safely use the Diffie-Hellman key exchange, Alice and Bob must use an `authenticated` exchange. Some of the information sent by Alice or Bob must be signed with a public key known by the other user. In practice, it is often important for Alice to authenticate Bob. If Bob has a certificated signed by Ted, the authenticated key exchange could be organized as follows.</source>
        <target state="translated">To safely use the Diffie-Hellman key exchange, Alice and Bob must use an `authenticated` exchange. Some of the information sent by Alice or Bob must be signed with a public key known by the other user. In practice, it is often important for Alice to authenticate Bob. If Bob has a certificated signed by Ted, the authenticated key exchange could be organized as follows.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">988</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="8fc2b0c9f1b3c55f" weblate-flags="read-only">
        <source>Alice chooses a secret integer : :math:`a` and sends :math:`A= g^{a} \mod p` to Bob</source>
        <target state="translated">Alice chooses a secret integer : :math:`a` and sends :math:`A= g^{a} \mod p` to Bob</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">995</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="847b4f7ae7498c82" weblate-flags="read-only">
        <source>Bob chooses a secret integer : :math:`b`, computes :math:`B= g^{b} \mod p` and sends :math:`Cert(Bob,Bob_{pub},Ted), E_p(Bob_{priv},B)` to Alice</source>
        <target state="translated">Bob chooses a secret integer : :math:`b`, computes :math:`B= g^{b} \mod p` and sends :math:`Cert(Bob,Bob_{pub},Ted), E_p(Bob_{priv},B)` to Alice</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">997</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="9754f87e1083ac16" weblate-flags="read-only">
        <source>Alice checks the signature (with :math:`Bob_{pub}`) and the certificate and computes :math:`S_{A}=B^{a} \mod p`</source>
        <target state="translated">Alice checks the signature (with :math:`Bob_{pub}`) and the certificate and computes :math:`S_{A}=B^{a} \mod p`</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">1000</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="341ab2a94f60cfbc" weblate-flags="read-only">
        <source>Bob computes :math:`S_{B}=A^{b} \mod p`</source>
        <target state="translated">Bob computes :math:`S_{B}=A^{b} \mod p`</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">1002</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="84fe1fd23d16cda9" weblate-flags="read-only">
        <source>This prevents the attack mentioned above since Mallory cannot create a fake certificate and cannot sign a value by using Bob's private key. Given the risk of man-in-the-middle attacks, the Diffie-Hellman key exchange mechanism should never be used without authentication.</source>
        <target state="translated">This prevents the attack mentioned above since Mallory cannot create a fake certificate and cannot sign a value by using Bob's private key. Given the risk of man-in-the-middle attacks, the Diffie-Hellman key exchange mechanism should never be used without authentication.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">1006</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="c463aea6549199a2" weblate-flags="read-only">
        <source>Footnotes</source>
        <target state="translated">Footnotes</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">1015</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="5cb2d1c3d356ac57" weblate-flags="read-only">
        <source>The wikipedia page on passwords provides many of these references : https://en.wikipedia.org/wiki/Password_strength</source>
        <target state="translated">The wikipedia page on passwords provides many of these references : https://en.wikipedia.org/wiki/Password_strength</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">1016</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="37148ee916369f04" weblate-flags="read-only">
        <source>A detailed explanation of the operation of the RSA algorithm is outside the scope of this e-book. Various tutorials such as the `RSA page &lt;https://en.wikipedia.org/wiki/RSA_(cryptosystem)&gt;`_ on wikipedia provide examples and tutorial information.</source>
        <target state="translated">A detailed explanation of the operation of the RSA algorithm is outside the scope of this e-book. Various tutorials such as the `RSA page &lt;https://en.wikipedia.org/wiki/RSA_(cryptosystem)&gt;`_ on wikipedia provide examples and tutorial information.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">1019</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="93568421b3d01e6d" weblate-flags="read-only">
        <source>A detailed explanation of the ECC cryptosystems is outside the scope of this e-book. A simple introduction may be found on `Andrea Corbellini's blog &lt;http://andrea.corbellini.name/2015/05/17/elliptic-curve-cryptography-a-gentle-introduction/&gt;`_. There have been deployments of ECC recently because ECC schemes usually require shorter keys than RSA and consume less CPU.</source>
        <target state="translated">A detailed explanation of the ECC cryptosystems is outside the scope of this e-book. A simple introduction may be found on `Andrea Corbellini's blog &lt;http://andrea.corbellini.name/2015/05/17/elliptic-curve-cryptography-a-gentle-introduction/&gt;`_. There have been deployments of ECC recently because ECC schemes usually require shorter keys than RSA and consume less CPU.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">../../principles/security.rst</context>
          <context context-type="linenumber">1024</context>
        </context-group>
      </trans-unit>
    </body>
  </file>
</xliff>
