Crypto In Single Library

--

At the core of cybersecurity is CIA (Confidentiality, Integrity and Availability). For confidentiality and integrity we normally turn to cryptography methods in making sure that our data is protected, and where we can test its integrity (and where our protected data has not been changed). There are many existing ways of covering cryptography but these often a range of software libraries. Along with this, there’s a comborsum OpenSSL library, and which can be difficult to integrate and install. But there’s one library that aims to bring together all of the main methods into a single library: the Python cryptography library. It contains a wide range of interfaces to common cryptographic algorithms, including symmetric key methods, hashing, public key, and key derivation functions. Many of these are contained with the Hazmat (Harzardous Material) primative setup.

Hashing, HMAC and KDF

Within hashing methods, we take data in the form of a byte array, and then create a fixed length hash value. For MD5, the length of the hash is 128 bits, for SHA-1 it is 160 bits, and for SHA-256, it is 256 bits.

These hashes include MD5, SHA-1 and SHA-256. With MD5 we get a 128-bit output, and which is 32 hex characters. SHA-1 has an output of 160 bits, and SHA-256 has an output of 256 bits. MD5 should not be used in production environments as the method has weaknesses, along with the output hash begin too short. SHA-1, too, has been shown to have weaknesses, and thus we should use SHA-2 methods. These include SHA224…

--

--

Prof Bill Buchanan OBE FRSE
ASecuritySite: When Bob Met Alice

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. Based in Edinburgh. Old World Breaker. New World Creator. Building trust.