07.07.2023 Views

Implementing-cryptography-using-python

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Contents xv

Storing a Binary File Inside an Image 192

Working with large images 195

Summary197

Chapter 7 Message Integrity 199

Message Authentication Codes 200

Hash-based Message Authentication Code 201

Using HMAC to Sign Message 202

Message Digest with SHA 203

Binary Digests 204

NIST Compliance 205

CBC-MAC206

Birthday Attacks 207

Crafting Forgeries 209

The Length Extension Attack 209

Setting Up a Secure Channel 210

Communication Channels 211

Sending Secure Messages over IP Networks 212

Create a Server Socket 212

Create a Client Socket 213

Create a Threaded Server with TCP 214

Adding Symmetric Encryption 215

Concatenate Message and MAC 218

Summary221

References222

Chapter 8 Cryptographic Applications and PKI 223

The Public-Key Transformation 224

Exploring the Basics of RSA 226

Generating RSA Certificates 229

Constructing Simple Text Encryption and

Decryption with RSA Certificates 231

Constructing BLOB Encryption and

Decryption with RSA Certificates 232

The El-Gamal Cryptosystem 235

Elliptic Curve Cryptography 238

Generating ECC Keys 240

Key Lengths and Curves 241

Diffie-Hellman Key Exchange 242

Summary245

Chapter 9 Mastering Cryptography Using Python 247

Constructing a Plaintext Communications Application 248

Creating a Server 248

Creating the Client 250

Creating the Helper File 251

Execution252

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!