ScholarQuill logoScholarQuillUniversity Notes
  • Notes
  • Past Papers
  • Blogs
  • Todo
Login
ScholarQuill logoScholarQuillUniversity Notes
Login
NotesPast PapersBlogsTodo
More
SubjectsDiscussionCGPA CalculatorGPA CalculatorStudent PortalCourse Outline
About
About usPrivacy PolicyReportContact
Notes
Past Papers
Blogs
Todo
Analytics
    Current Subject
    🧩
    Information Security
    COMP2120
    Progress0 / 15 topics
    Topics
    1. Information security foundations2. Security design principles3. Security mechanisms4. Symmetric and asymmetric cryptography5. Encryption techniques6. Hash functions and digital signatures7. Key management, authentication and access control8. Software security: Vulnerabilities and protections9. Malware and database security10. Network security: Firewalls and intrusion detection11. Security policies: Formation and enforcement12. Risk assessment in information security13. Cybercrime, law and ethics in information security14. Privacy and anonymity of data15. Practicals of Information security
    COMP2120›Hash functions and digital signatures
    Information SecurityTopic 6 of 15Regular Notes

    Hash functions and digital signatures

    2 minread
    370words
    Beginnerlevel

    Hash Functions and Digital Signatures—two core topics in Information Security that work closely together to ensure data integrity, authenticity, and non-repudiation.


    🔑 Hash Functions

    🧠 What is a Hash Function?

    A hash function is a mathematical algorithm that takes input data of any size and produces a fixed-size output (called a hash or digest).


    🔍 Key Properties of Good Hash Functions:

    Property Explanation
    Deterministic Same input always gives the same output
    Fast Quickly computes the hash
    Irreversible (One-way) You can't get the original input from the hash
    Collision-resistant Two different inputs should not produce the same hash
    Avalanche effect Small change in input → drastically different hash

    🔧 Common Hash Algorithms:

    • MD5 – obsolete (not secure)
    • SHA-1 – weak, not recommended
    • SHA-256 / SHA-3 – widely used, strong security

    ✅ Uses of Hash Functions:

    • Password storage (hashed, not plain text)
    • Data integrity (detect tampering)
    • Digital signatures (paired with encryption)
    • File integrity checks (e.g., software downloads)

    ✍️ Digital Signatures

    🧠 What is a Digital Signature?

    A digital signature is a cryptographic technique that verifies:

    1. Authenticity – who sent the message
    2. Integrity – the message wasn’t altered
    3. Non-repudiation – the sender can't deny sending it

    🔄 How Digital Signatures Work (Simplified):

    1. Sender creates a hash of the message.
    2. Sender encrypts the hash using their private key → this is the digital signature.
    3. Sender sends the message + signature.

    🛡️ On the receiver’s side:

    1. Receiver decrypts the signature using the sender’s public key → gets the original hash.
    2. Receiver hashes the message themselves.
    3. If both hashes match → ✅ message is authentic and untampered.

    🔧 Algorithms Used:

    • RSA
    • DSA (Digital Signature Algorithm)
    • ECDSA (Elliptic Curve DSA)

    📦 Real-World Use Cases:

    • Email signing (PGP, S/MIME)
    • Software distribution (signed executables)
    • Digital certificates (SSL/TLS)
    • Blockchain transactions

    🔁 Relationship Between Hash Functions & Digital Signatures:

    Hash Function Digital Signature
    One-way, fixed-size output Uses hash of data + encryption
    Ensures integrity Ensures authenticity, integrity, and non-repudiation
    Fast and irreversible Based on asymmetric encryption
    Example: SHA-256 Example: RSA with SHA-256

    🧠 Analogy:

    Think of a hash like a fingerprint of a file.
    A digital signature is like a fingerprint that's been stamped with your unique seal (private key), proving it’s yours and hasn’t been altered.

    Previous topic 5
    Encryption techniques
    Next topic 7
    Key management, authentication and access control

    Past Papers

    Open this section to load past papers

    Click on Show Past Papers to see past papers.
    On This Page
      Reading Stats
      Est. reading time2 min
      Word count370
      Code examples0
      DifficultyBeginner