ENGLISH

Demystifying Cryptography with OpenSSL 3.0: Discover the best techniques to enhance your network security with OpenSSL 3.0

Book information

Publisher
Packt Publishing
Year
2022
ISBN
1800560346, 9781800560345
Language
english
Format
PDF
Filesize
19 MB (20187919 bytes)
Edition
1
Pages
342\342
Topic
Computers Security
Time added
2022-10-29 09:30:16

Description

Use OpenSSL to add security features to your application, including cryptographically strong symmetric and asymmetric encryption, digital signatures, SSL/TLS connectivity, and PKI handling Key Features • Secure your applications against common network security threats using OpenSSL • Get to grips with the latest version of OpenSSL, its new features, and advantages • Learn about PKI, cryptography, certificate authorities, and more using real-world examples Book Description Security and networking are essential features of software today. The modern internet is full of worms, Trojan horses, men-in-the-middle, and other threats. This is why maintaining security is more important than ever. OpenSSL is one of the most widely used and essential open source projects on the internet for this purpose. If you are a software developer, system administrator, network security engineer, or DevOps specialist, you've probably stumbled upon this toolset in the past – but how do you make the most out of it? With the help of this book, you will learn the most important features of OpenSSL, and gain insight into its full potential. This book contains step-by-step explanations of essential cryptography and network security concepts, as well as practical examples illustrating the usage of those concepts. You'll start by learning the basics, such as how to perform symmetric encryption and calculate message digests. Next, you will discover more about cryptography: MAC and HMAC, public and private keys, and digital signatures. As you progress, you will explore best practices for using X.509 certificates, public key infrastructure, and TLS connections. By the end of this book, you'll be able to use the most popular features of OpenSSL, allowing you to implement cryptography and TLS in your applications and network infrastructure. What you will learn • Understand how to use symmetric cryptography • Get to grips with message digests, MAC, and HMAC • Discover asymmetric cryptography and digital signatures • Focus on how to apply and use X.509 certificates • Dive into TLS and its proper usage • Manage advanced and special usages of TLS • Find out how to run a mini certificate authority for your organization Who this book is for This book is for software developers, system administrators, DevOps specialists, network security engineers, and analysts, or anyone who wants to keep their applications and infrastructure secure. Software developers will learn how to use the OpenSSL library to empower their software with cryptography and TLS. DevOps professionals and sysadmins will learn how to work with cryptographic keys and certificates on the command line, and how to set up a mini-CA for their organization. A basic understanding of security and networking is required. Cover Title page Copyright and Credits Dedication Foreword Contributors Table of Contents Preface Part 1: Introduction Chapter 1: OpenSSL and Other SSL/TLS Libraries What is OpenSSL? The history of OpenSSL What’s new in OpenSSL 3.0? Comparing OpenSSL with GnuTLS Comparing OpenSSL with NSS Comparing OpenSSL with Botan Comparing OpenSSL with lightweight TLS libraries Comparing OpenSSL with LibreSSL Comparing OpenSSL with BoringSSL Summary Part 2: Symmetric Cryptography Chapter 2: Symmetric Encryption and Decryption Technical requirements Understanding symmetric encryption An overview of the symmetric ciphers supported by OpenSSL Comparing block ciphers and stream ciphers Understanding symmetric cipher security How many bits of security is enough? Reviewing the AES cipher Reviewing DES and 3DES ciphers Reviewing the RC4 cipher Reviewing the ChaCha20 cipher Reviewing other symmetric ciphers supported by OpenSSL Block cipher modes of operation Reviewing the Electronic Code Book mode Reviewing CBC mode Reviewing CTR mode Reviewing GCM Reviewing AES-GCM-SIV Other block cipher operation modes Choosing the block cipher operation mode Padding for block ciphers How to generate a symmetric encryption key Downloading and installing OpenSSL How to encrypt and decrypt with AES on the command line Initializing and uninitializing OpenSSL library How to compile and link with OpenSSL How to encrypt with AES programmatically Implementing the encryption program Running the encrypt program How to decrypt with AES programmatically Implementing the decrypt program Running the decrypt program Summary Chapter 3: Message Digests Technical requirements What are message digests and cryptographic hash functions? Why are message digests needed? Data integrity verification Basis for HMAC Digital signatures Network protocols Password verification Content identifier Blockchain and cryptocurrencies Proof-of-work Assessing the security of cryptographic hash functions Overview of the cryptographic hash functions supported by OpenSSL Reviewing the SHA-2 family of hash functions Reviewing the SHA-3 family of hash functions Reviewing the SHA-1 and SHA-0 hash functions Reviewing the MD family of hash functions Reviewing the BLAKE2 family of hash functions Reviewing less popular hash functions supported by OpenSSL Which cryptographic hash function should you choose? How to calculate a message digest on the command line How to calculate the message digest programmatically Implementing the digest program Running the digest program Summary Chapter 4: MAC and HMAC Technical requirements What is a MAC? Understanding MAC function security HMAC – a hash-based MAC MAC, encryption, and the Cryptographic Doom Principle How to calculate HMAC on the command line How to calculate HMAC programmatically Implementing the hmac program Running the hmac program Summary Chapter 5: Derivation of an Encryption Key from a Password Technical requirements Understanding the differences between a password and an encryption key What is a key derivation function? Overview of key derivation functions supported by OpenSSL Deriving a key from a password on the command line Deriving a key from a password programmatically Implementing the kdf program Running the kdf program Summary Part 3: Asymmetric Cryptography and Certificates Chapter 6: Asymmetric Encryption and Decryption Technical requirements Understanding asymmetric encryption Understanding a Man in the Middle attack Meeting in person Verifying a key fingerprint over the phone Key splitting Signing the key by a trusted third party What kind of asymmetric encryption is available in OpenSSL? Understanding a session key Understanding RSA security How to generate an RSA keypair How to encrypt and decrypt with RSA on the command line How to encrypt with RSA programmatically Implementing the rsa-encrypt program Running the rsa-encrypt program Understanding the OpenSSL error queue How to decrypt with RSA programmatically Implementing the rsa-decrypt program Running the rsa-decrypt program Summary Chapter 7: Digital Signatures and Their Verification Technical requirements Understanding digital signatures Difference between digital signatures and MACs Overview of digital signature algorithms supported by OpenSSL Reviewing RSA Reviewing DSA Reviewing ECDSA Reviewing EdDSA Reviewing SM2 Which digital signature algorithm should you choose? How to generate an elliptic curve keypair How to sign and verify a signature on the command line How to sign programmatically Implementing the ec-sign program Running the ec-sign program How to verify a signature programmatically Implementing the ec-verify program Running the ec-verify program Summary Chapter 8: X.509 Certificates and PKI Technical requirements What is an X.509 certificate? Understanding certificate signing chains How are X.509 certificates issued? What are X509v3 extensions? Understanding X.509 Public Key Infrastructure How to generate a self-signed certificate How to generate a non-self-signed certificate How to verify a certificate on the command line How to verify a certificate programmatically Implementing the x509-verify program Running the x509-verify program Summary Part 4:TLS Connections and Secure Communication Chapter 9: Establishing TLS Connections and Sending Data over Them Technical requirements Understanding the TLS protocol Understanding a TLS handshake What happens after the TLS handshake? The history of the TLS protocol Establishing a TLS client connection on the command line Preparing certificates for a TLS server connection Accepting a TLS server connection on the command line Understanding OpenSSL BIOs Establishing a TLS client connection programmatically Implementing the tls-client program Running the tls-client program Accepting a TLS server connection programmatically Implementing the tls-server program Running the tls-server program Summary Chapter 10: Using X.509 Certificates in TLS Technical requirements Custom verification of peer certificates in C programs Registering the verification callback Implementing the verification callback Running the program Using Certificate Revocation Lists in C programs Registering the CRL lookup callback Implementing the CRL lookup callback Implementing the function for downloading a CRL from a distribution point Implementing the function for downloading a CRL from an HTTP URL Running the program Using the Online Certificate Status Protocol Understanding the Online Certificate Status Protocol Using OCSP on the command line Using OCSP in C programs Using TLS client certificates Generating TLS client certificates Packaging client certificates into PKCS #12 container files Requesting and verifying a TLS client certificate on the server side programmatically Establishing a TLS client connection with a client certificate programmatically Summary Chapter 11: Special Usages of TLS Technical requirements Understanding TLS certificate pinning Using TLS certificate pinning Changing the run_tls_client() function Implementing the cert_verify_callback() function Running the tls-cert-pinning program Understanding blocking and non-blocking sockets Using TLS on non-blocking sockets Changing the run_tls_client() function Running the tls-client-non-blocking program Understanding TLS on non-standard sockets Using TLS on non-standard sockets Implementing the service_bios() function Reimplementing the run_tls_client() function Running the tls-client-memory-bio program Summary Part 5:Running a Mini-CA Chapter 12: Running a Mini-CA Technical requirements Understanding the openssl ca subcommand Generating a root CA certificate Generating an intermediate CA certificate Generating a certificate for a web server Generating a certificate for a web and email client Revoking certificates and generating CRLs Providing certificate revocation status via OCSP Summary Index About Packt Other Books You May Enjoy

Similar books

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

2010 · PDF

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

1858 · PDF

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

2022 · PDF