Anti-virus Software & Encryption Algorithm
Index
Introduction
Antivirus software checks a file for viruses, worms, or malware, it uses what's called a signature.
What is a Signature & how it work ?
How Antivirus Uses It:
Types of Signature Techniques:
Example: If a known malware always has the byte pattern 4D 5A 90 00, the antivirus searches for that.
Example: If malware.exe has SHA-256 hash abc123..., then any file matching that exact hash is instantly flagged.
More advanced—instead of exact matches, it detects similar behaviors or suspicious structures based on the signature.
Limitations:
Q. How hash databases are updated ?
Q. what is Polymorphic and Metamorphic?
💡Prevention: use Heuristic & Generic signature (broad pattern look for entire family of the malware) to understand the behavior.
Q. How malware analysis performed ?
Hashing Algorithm
Message digest(MD5) (older)
SHA-1 (Secure Hash Algorithm 1)
SHA-256 (Part of SHA2 family) (New)
Working Of SHA-1
The SHA-1 (Secure Hash Algorithm 1) is a cryptographic hash function that processes input data to produce a fixed-size 160-bit (20-byte) hash value, known as the message digest.
Here's how the algorithm works:
1. Pre-processing
Recommended by LinkedIn
2. Initializing Hash Values
Set initial hash values (in hexadecimal):
3. Processing Each 512-bit Block
For each block:
For i from 0 to 79:Determine the function f and constant k based on the round: 0 ≤ i ≤ 19: f = (b AND c) OR ((NOT b) AND d) k = 0x5A827999 similarly till .....79
Compute:
Update variables:
Add This Block's Hash to Result:
4. Produce the Final Hash Value
Concatenate h0, h1, h2, h3, and h4 to form the final 160-bit hash value.
What are DES, AES, and SHA?
DES (Data Encryption Standard)
AES (Advanced Encryption Standard)
SHA (Secure Hash Algorithm)
Q. Which Type of Encryption is Used for Confidentiality?
Symmetric Encryption is used for confidentiality — this means:
AES is the most secure and recommended symmetric algorithm for confidentiality today.
Q. Where Is Asymmetric Encryption Used?
Asymmetric encryption (also called public-key cryptography) uses:
The keys are different, and knowing the public key does not reveal the private key.
Examples of Asymmetric Algorithms:
Real-World Workflow Hybrid Key encryption(symmetric + Asymmetric algorithm)
Example (e.g. HTTPS):
So, asymmetric is used to establish trust and exchange keys, but the actual data encryption is usually done with faster symmetric algorithms (like AES) for performance.
Thoughtful post, thanks ADITYA