Details

Implementing Cryptography Using Python


Implementing Cryptography Using Python


1. Aufl.

von: Shannon W. Bray

32,99 €

Verlag: Wiley
Format: PDF
Veröffentl.: 15.07.2020
ISBN/EAN: 9781119612223
Sprache: englisch
Anzahl Seiten: 304

DRM-geschütztes eBook, Sie benötigen z.B. Adobe Digital Editions und eine Adobe ID zum Lesen.

Beschreibungen

<p><b>Learn to deploy proven cryptographic tools in your applications and services</b></p> <p>Cryptography is, quite simply, what makes security and privacy in the digital world possible. Tech professionals, including programmers, IT admins, and security analysts, need to understand how cryptography works to protect users, data, and assets. <i>Implementing Cryptography Using Python</i> will teach you the essentials, so you can apply proven cryptographic tools to secure your applications and systems. Because this book uses Python, an easily accessible language that has become one of the standards for cryptography implementation, you’ll be able to quickly learn how to secure applications and data of all kinds.</p> <p>In this easy-to-read guide, well-known cybersecurity expert Shannon Bray walks you through creating secure communications in public channels using public-key cryptography. You’ll also explore methods of authenticating messages to ensure that they haven’t been tampered with in transit. Finally, you’ll learn how to use digital signatures to let others verify the messages sent through your services.</p> <ul> <li>Learn how to implement proven cryptographic tools, using easy-to-understand examples written in Python</li> <li>Discover the history of cryptography and understand its critical importance in today’s digital communication systems</li> <li>Work through real-world examples to understand the pros and cons of various authentication methods</li> <li>Protect your end-users and ensure that your applications and systems are using up-to-date cryptography</li> </ul>
<p>Introduction xvii</p> <p><b>Chapter 1 Introduction to Cryptography and Python 1</b></p> <p>Exploring Algorithms 2</p> <p>Why Use Python? 2</p> <p>Downloading and Installing Python 3</p> <p>Installing on Ubuntu 4</p> <p>Installing on macOS 4</p> <p>Installing on Windows 4</p> <p>Installing on a Chromebook 4</p> <p>Installing Additional Packages 5</p> <p>Installing Pip, NumPy, and Matplotlib 6</p> <p>Installing the Cryptography Package 7</p> <p>Installing Additional Packages 8</p> <p>Testing Your Install 9</p> <p>Diving into Python Basics 9</p> <p>Using Variables 10</p> <p>Using Strings 11</p> <p>Introducing Operators 11</p> <p>Understanding Arithmetic Operators 11</p> <p>Understanding Comparison Operators 13</p> <p>Understanding Logical Operators 13</p> <p>Understanding Assignment Operators 14</p> <p>Understanding Bitwise Operators 15</p> <p>Understanding Membership Operators 15</p> <p>Understanding Identity Operators 16</p> <p>Using Conditionals 16</p> <p>Using Loops 17</p> <p>for 17</p> <p>while 18</p> <p>continue 18</p> <p>break 18</p> <p>else 18</p> <p>Using Files 19</p> <p>Understanding Python Semantics 20</p> <p>Sequence Types 20</p> <p>Introducing Custom Functions 26</p> <p>Downloading Files Using Python 27</p> <p>Introducing Python Modules 28</p> <p>Creating a Reverse Cipher 29</p> <p>Summary 30</p> <p><b>Chapter 2 Cryptographic Protocols and Perfect Secrecy 31</b></p> <p>The Study of Cryptology 32</p> <p>Understanding Cryptography 32</p> <p>Cryptography’s Famous Family: Alice and Bob 33</p> <p>Diffie-Hellman 34</p> <p>Data Origin Authentication 34</p> <p>Entity Authentication 35</p> <p>Symmetric Algorithms 36</p> <p>Asymmetric Algorithms 36</p> <p>The Needham-Schroeder Protocols 36</p> <p>The Otway-Rees Protocol 38</p> <p>Kerberos 39</p> <p>Multiple-Domain Kerberos 40</p> <p>X.509 41</p> <p>Formal Validation of Cryptographic Protocols 46</p> <p>Configuring Your First Cryptographic Library 47</p> <p>Understanding Cryptanalysis 47</p> <p>Brute-Force Attacks 47</p> <p>Side-Channel Attacks 48</p> <p>Social Engineering 48</p> <p>Analytical Attacks 48</p> <p>Frequency Analysis 48</p> <p>Attack Models 49</p> <p>Shannon’s Theorem 50</p> <p>One-Time Pad 51</p> <p>XOR, AND, and OR 51</p> <p>One-Time Pad Function 56</p> <p>One-Way Hashes 58</p> <p>Cryptographic One-Way Hashes 59</p> <p>Message Authentication Codes 60</p> <p>Perfect Forward Secrecy 60</p> <p>Published and Proprietary Encryption Algorithms 61</p> <p>Summary 62</p> <p>References 62</p> <p><b>Chapter 3 Classical Cryptography 65</b></p> <p>Password Best Practices 66</p> <p>Password Storage 66</p> <p>Hashing Passwords 67</p> <p>Salting Passwords 67</p> <p>Stretching Passwords 68</p> <p>Password Tools 68</p> <p>Obfuscating Data 69</p> <p>ASCII Encoding 70</p> <p>Base64 Encoding Text 70</p> <p>Binary Data 72</p> <p>Decoding 72</p> <p>Historical Ciphers 72</p> <p>Scytale of Sparta 73</p> <p>Substitution Ciphers 73</p> <p>Caesar Cipher 74</p> <p>ROT-13 76</p> <p>Atbash Cipher 77</p> <p>Vigenère Cipher 77</p> <p>Playfair 79</p> <p>Hill 2x2 83</p> <p>Column Transposition 87</p> <p>Affine Cipher 90</p> <p>Summary 93</p> <p><b>Chapter 4 Cryptographic Math and Frequency Analysis 95</b></p> <p>Modular Arithmetic and the Greatest Common Devisor 96</p> <p>Prime Numbers 97</p> <p>Prime Number Theorem 98</p> <p>School Primality Test 98</p> <p>Fermat’s Little Theorem 100</p> <p>Miller-Rabin Primality Test 100</p> <p>Generate Large Prime Numbers 104</p> <p>Basic Group Theory 106</p> <p>Orders of Elements 107</p> <p>Modular Inverses 109</p> <p>Fermat’s Little Theorem to Find the Inverse 110</p> <p>Extending the GCD 111</p> <p>Euler’s Theorem 111</p> <p>Pseudorandomness 115</p> <p>Breaking C’s rand() Function 116</p> <p>Solving Systems of Linear Equations 117</p> <p>Frequency Analysis 120</p> <p>Cryptanalysis with Python 123</p> <p>Using an Online Word List 125</p> <p>Determining the Frequency 126</p> <p>Breaking the Vigenère Cipher 129</p> <p>Summary 138</p> <p><b>Chapter 5 Stream Ciphers and Block Ciphers 139</b></p> <p>Convert between Hexdigest and Plaintext 140</p> <p>Use Stream Ciphers 141</p> <p>ARC4 147</p> <p>Vernam Cipher 148</p> <p>Salsa20 Cipher 149</p> <p>ChaCha Cipher 151</p> <p>Use Block Ciphers 156</p> <p>Block Modes of Operations 158</p> <p>ECB Mode 158</p> <p>CBC Mode 159</p> <p>CFB Mode 160</p> <p>OFB Mode 162</p> <p>CTR Mode 163</p> <p>Tricks with Stream Modes 164</p> <p>DIY Block Cipher Using Feistel Networks 165</p> <p>Advanced Encryption Standard (AES) 167</p> <p>Using AES with Python 167</p> <p>File Encryption Using AES 169</p> <p>File Decryption Using AES 169</p> <p>Summary 169</p> <p><b>Chapter 6 Using Cryptography with Images 171</b></p> <p>Simple Image Cryptography 171</p> <p>Images and Cryptography Libraries 174</p> <p>Understanding the Cryptography Library 174</p> <p>Understanding the Cryptosteganography Library 175</p> <p>Image Cryptography 175</p> <p>File Cryptography Using Fernet 176</p> <p>Image Cryptography Using Fernet 179</p> <p>AES and Block Modes of Operations 180</p> <p>Exploring a Simple ECB Mode Example 181</p> <p>Exploring a Simple CBC Mode Example 185</p> <p>Applying the Examples 186</p> <p>Steganography 187</p> <p>Storing a Message Inside an Image 188</p> <p>Storing a Binary File Inside an Image 192</p> <p>Working with large images 195</p> <p>Summary 197</p> <p><b>Chapter 7 Message Integrity 199</b></p> <p>Message Authentication Codes 200</p> <p>Hash-based Message Authentication Code 201</p> <p>Using HMAC to Sign Message 202</p> <p>Message Digest with SHA 203</p> <p>Binary Digests 204</p> <p>NIST Compliance 205</p> <p>CBC-MAC 206</p> <p>Birthday Attacks 207</p> <p>Crafting Forgeries 209</p> <p>The Length Extension Attack 209</p> <p>Setting Up a Secure Channel 210</p> <p>Communication Channels 211</p> <p>Sending Secure Messages over IP Networks 212</p> <p>Create a Server Socket 212</p> <p>Create a Client Socket 213</p> <p>Create a Threaded Server with TCP 214</p> <p>Adding Symmetric Encryption 215</p> <p>Concatenate Message and MAC 218</p> <p>Summary 221</p> <p>References 222</p> <p><b>Chapter 8 Cryptographic Applications and PKI 223</b></p> <p>The Public-Key Transformation 224</p> <p>Exploring the Basics of RSA 226</p> <p>Generating RSA Certificates 229</p> <p>Constructing Simple Text Encryption and Decryption with RSA Certificates 231</p> <p>Constructing BLOB Encryption and</p> <p>Decryption with RSA Certificates 232</p> <p>The El-Gamal Cryptosystem 235</p> <p>Elliptic Curve Cryptography 238</p> <p>Generating ECC Keys 240</p> <p>Key Lengths and Curves 241</p> <p>Diffie-Hellman Key Exchange 242</p> <p>Summary 245</p> <p><b>Chapter 9 Mastering Cryptography Using Python 247</b></p> <p>Constructing a Plaintext Communications Application 248</p> <p>Creating a Server 248</p> <p>Creating the Client 250</p> <p>Creating the Helper File 251</p> <p>Execution 252</p> <p>Installing and Testing Wireshark 253</p> <p>Implementing PKI in the Application Using RSA Certificates 255</p> <p>Modifying the Server 256</p> <p>Modifying the Client 257</p> <p>Modifying the Helper File 258</p> <p>Execution 259</p> <p>Implementing Diffie-Hellman Key Exchange 261</p> <p>Modifying the Server File 262</p> <p>Modifying the Client File 264</p> <p>Modifying the Helper File 266</p> <p>Creating the Diffie-Hellman Class File 270</p> <p>Execution 275</p> <p>Wrapping Up 276</p> <p>Index 277</p>
<p><b>SHANNON W. BRAY</b> CASP, Security +, CISM is the Virtual CISO at Secured Systems providing clients guidance on establishing and maintaining information security plans, policies, procedures, standards, and guidelines using accepted frameworks. He has worked in this roles and others in corporations and federal agencies. Shannon has an MS in Cybersecurity from the University of Delaware. Prior to transitioning to cybersecurity, he was a well known IT expert with several successful books about Microsoft SharePoint.
<p><b>An accessible introduction to deploying standard cryptographic functions using Python</b> <p>Cryptography is one of the most vital tools used by IT security professionals, safeguarding sensitive information with mathematical algorithms to encrypt and decrypt data. The Python programming language—a free, open source language that is object oriented, functional, and procedural—is a popular choice when working with cryptography. Python is easier to learn than languages such as Java, C, or C++,<i></i> its<i></i> built-in libraries less complicated than OpenSSL, and is available for Windows, Linux/Unix, Mac and Chromebook operating systems, amongst others. As the use of Python continues to expand rapidly, developers need to understand its cryptographic functions to deploy sites, applications, and services securely. <p><i>Implementing Cryptography Using Python</i> is an easy-to-understand introduction to cryptography using the available libraries in Python. Emphasizing real-world usability, this practical guide explains the basics of cryptography and the Python language, teaches you how to set up a Python environment on various machines, write your first cipher, and script, analyze, and deploy a range of cryptographic solutions in Python. Clear, user-friendly chapters explore the history of cryptography while providing step-by-step instructions for creating secure communications using public key cryptography, authenticating messages, verifying digital signatures, and much more. <p><i>Implementing Cryptography Using Python</i> is a must-have guide for any programmer, web developer, IT professional, or security analyst looking to gain a better understanding of how cryptography works and apply proven cryptographic tools in their applications and systems.

Diese Produkte könnten Sie auch interessieren:

MDX Solutions
MDX Solutions
von: George Spofford, Sivakumar Harinath, Christopher Webb, Dylan Hai Huang, Francesco Civardi
PDF ebook
53,99 €
Concept Data Analysis
Concept Data Analysis
von: Claudio Carpineto, Giovanni Romano
PDF ebook
107,99 €
Handbook of Virtual Humans
Handbook of Virtual Humans
von: Nadia Magnenat-Thalmann, Daniel Thalmann
PDF ebook
150,99 €