Posts

Showing posts with the label Cryptography

How Does AI Use Cryptography: Securing the Future

How Does AI Use Cryptography? Securing the Future In today’s digital world, artificial intelligence (AI) powers everything from Siri answering your questions to Netflix picking your next binge. But how does AI keep your data safe from hackers? Whether it’s voice commands or driving patterns in self-driving cars, AI handles sensitive information that needs protection. That’s where cryptography comes in—the science of secure communication I’ve covered before. Welcome to Decoding Complexities , where we unravel tech’s toughest puzzles. If you caught my video “What is AI?” or read my post “Artificial Intelligence,” you know AI thrives on data, algorithms, and machine learning. This post dives deeper: how does AI use cryptography to ensure security and privacy? We’ll explore AI encryption methods, from securing data to protecting models, and peek at what’s next for these technologies. Let’s decode this power duo. Cryptography Recap: The Security Backbone I’ve ...

SHA-256 Hash Function: What is it and How to Implement?

SHA-256 (Secure Hash Algorithm - 256) SHA-256  (Secure Hash Algorithm - 256)   Hash function is one of the secure hash functions and widely used across various applications. SHA-256 is part of SHA-2 family of hash functions and developed by National Security Agency (NSA) in 2001. 256 stands for the length of the hash value generated in bits (i.e., 64 character hexadecimal value).  SHA-256 hash function is considered to be one of the secure hash function and shows significant improvement over the previous hash functions (MD5 and SHA-1). Below are couple of the significant improvements in SHA-256.  Increased Security - Properties of SHA-256 are considerably stronger and is resistant to collision attacks, pre-image attacks and other vulnerabilities observed in the previous versions.  Robust Hash Function - It's hash value is unpredictable and provides a high degree of resistance to collision attacks, making it suitable for use in various applications.  Let's d...

SHA-1 Hash Function: What is it and How to Implement?

SHA-1 (Secure Hash Algorithm - 1) Hash functions are crucial for various security applications. SHA-1 (Secure Hash Algorithm - 1) is one of the widely used hash function. SHA-1 was developed by National Security Agency (NSA) in 1995. This function accepts an input of any size and generates hash value of 40 characters (160 bits).  Let's get started with the Step-by-Step process of generating 40 character hash value using SHA-1 hash function. Step - by - Step Process On a high level steps involved in the process of generating hash value can be summarized as below.  Message Preprocessing Initializing State Variables  Process Message Blocks Compression Function Iterate Through Blocks Final Hash Value Let's dive deeper to understand each of these steps in detail.  Message Preprocessing SHA-1 algorithm works on blocks, each one of size 512 bits. So, first thing to be done is to convert the input message to binary format and ensure that the input message (in binary format) ...

MD5 Hash Function: What is it and How to Implement?

MD5 (Message Digest Algorithm 5) MD5 hash function is one of the oldest and widely used hash function. MD5 stands for Message Digest Algorithm was developed in 1991 by Ronald Rivest. MD5 accepts input of any size and generates hash value of 32 characters (128 bits).  Let's get straight into Step-by-Step process of MD5 algorithm and then look into some of the vulnerabilities of MD5 Algorithm.   Step-by-Step Process On a high level below are the steps involved in generating hash value.  Padding the Input Breaking the Input into Blocks Initializing the State variables Processing the Blocks Finalizing the Hash Value Let's have a look into what does each step involve. Padding the Input MD5 Algorithm works on blocks of size 512 bits. So, first thing is to ensure the input message is of 512 bits (or multiples of 512 bits). Before processing the input message, input would be padded with the below.  '1' bit would be padded immediately after the input message. '1' bit wor...

What is a Hash Function? A quick look into different Hash Functions

Hash Functions Hash functions have become essential to maintain data integrity, security and authenticity. The functionality of a hash function is to accept the input data (could be a simple message, file or data in any other format) and to generate a string with fixed length of characters (which is called as Hash). Technically, Hash functions are more similar to mathematical algorithms.  This hash value is unique for the specific input, Any simple change in the input would result in generating completely a different hash. This makes the hash functions essential for different applications such as password storage, digital signatures, message authentication and data integrity verification.  Below are some of the key properties that every hash function should contain.  Deterministic - Hash function should always return the same hash for the same input.  Fixed Output Size - Hash function should return a hash which is of fixed length, irrespective of the input size...