Skip to content
GK24
GK NotesComputer AwarenessEncryption, Digital Signatures and SSL/HTTPS

Encryption, Digital Signatures and SSL/HTTPS for Exams

Exam notes on encryption: symmetric and public key methods, DES, AES, RSA, hashing, digital signatures, SSL, TLS, HTTPS and the IT Act, 2000.

By · Published · 5 min read

Encryption, Digital Signatures and SSL/HTTPS for Exams — GK24 title card
Encryption, Digital Signatures and SSL/HTTPS for Exams — GK24 title card

Every password you type, every payment you make and every page that shows a padlock in the address bar depends on encryption. For competitive exams this chapter is pure definition work: which algorithm is symmetric and which is asymmetric, what a hash is, what a digital signature guarantees, and what the letters SSL, TLS and HTTPS stand for. The facts are settled, so marks here are the easiest in the computer awareness section.

What encryption does

Encryption converts readable data, called plaintext, into unreadable data, called ciphertext, using an algorithm known as a cipher and a secret value known as a key. Decryption is the reverse process. The strength of a modern system lies in the key, not in the secrecy of the algorithm, which is why key length is quoted in bits: a longer key means more combinations for an attacker to try in a brute force attack. The study of breaking ciphers is called cryptanalysis, and the whole field is cryptography. Older methods are still asked: the Caesar cipher simply shifted each letter three places, a substitution cipher replaces letters, a transposition cipher rearranges them, and steganography hides a message inside another file such as an image rather than scrambling it.

Symmetric key encryption

In symmetric key encryption the same single key both locks and unlocks the data, so it is also called secret key, private key or conventional encryption. It is fast and suits large volumes of data, but it has one weakness: the key has to reach the other party safely, and in a network of many users the number of keys needed grows very quickly. The Data Encryption Standard, adopted in the 1970s from IBM's work, used a 56-bit key on 64-bit blocks and is now considered breakable; Triple DES applied it three times as a stopgap. The Advanced Encryption Standard, chosen in 2001 from the Rijndael design, works on 128-bit blocks with keys of 128, 192 or 256 bits and is the standard in use today, including in Wi-Fi security under WPA2 and WPA3. Blowfish, IDEA and RC4 are other names from this family.

Asymmetric or public key encryption

Asymmetric encryption uses a mathematically linked pair of keys. The public key may be published to anyone; the private key never leaves its owner. Whatever one key locks, only the other can unlock. To send a confidential message you encrypt it with the recipient's public key, because only the recipient's private key can open it. The best known algorithm is RSA, named after Rivest, Shamir and Adleman and published in 1977, whose security rests on the difficulty of factorising the product of two large prime numbers. Diffie-Hellman, from 1976, is used to agree a shared key over an open channel, and elliptic curve cryptography does the same work with shorter keys. Asymmetric methods are far slower than symmetric ones, so real systems are hybrid: the public key pair is used only to agree a short-lived symmetric session key, which then carries the traffic.

Hash functions and digital signatures

A hash function takes input of any size and produces a fixed-length value called a digest or message digest. It uses no key, and it cannot be reversed, so hashing is not encryption. MD5 produces 128 bits, SHA-1 produces 160 bits and SHA-256 produces 256 bits; the last is the family used in blockchains. Any change in the input, even of one character, changes the digest completely, which is what makes hashing a test of integrity. A digital signature combines hashing with asymmetric keys: the sender hashes the document and encrypts the digest with the sender's own private key. The receiver decrypts that digest with the sender's public key and hashes the document again; if the two digests match, the document is unaltered and it truly came from the holder of that private key. A signature therefore gives authentication, integrity and non-repudiation, but it does not hide the contents, so it provides no confidentiality by itself.

Algorithms at a glance

NameTypePoint to remember
DESSymmetric56-bit key, 64-bit blocks, now obsolete
AESSymmetricFrom Rijndael, 2001; keys of 128, 192 or 256 bits
RSAAsymmetric1977; based on factorising large primes
Diffie-HellmanAsymmetric1976; key exchange, not bulk encryption
MD5Hash128-bit digest, no key, irreversible
SHA-256Hash256-bit digest, used in blockchain

SSL, TLS and HTTPS

Secure Sockets Layer was developed by Netscape in the mid-1990s to protect data travelling between a browser and a server. Its successor is Transport Layer Security, standardised from 1999, and although the industry has moved to TLS the old name SSL is still used loosely. HTTPS is simply HTTP carried over SSL or TLS; it uses port 443, where plain HTTP uses port 80, and the browser shows a padlock when it is in force. During the handshake the server presents a digital certificate in the X.509 format, issued by a certifying authority, that binds its public key to its domain name; the browser checks the certificate, the two sides agree a symmetric session key, and the rest of the conversation is encrypted with it. This arrangement of certifying authorities, certificates and key pairs is called a public key infrastructure. Related tools are IPSec and virtual private networks for whole connections, and Pretty Good Privacy and S/MIME for electronic mail.

Digital signatures in Indian law

The Information Technology Act of 2000 gave digital signatures legal recognition in India, and its 2008 amendment widened this to electronic signatures. A Digital Signature Certificate is issued by a licensed certifying authority, and those authorities are licensed and supervised by the Controller of Certifying Authorities under the ministry that handles electronics and information technology. Such certificates are needed for filing income tax and company returns, for e-tendering and for customs filings. The Aadhaar-based e-Sign service lets a user sign a document online after authentication, without holding a cryptographic token.

Exam Point of View

Questions from this chapter are of four kinds: full forms such as SSL, TLS, AES and DSC; sorting algorithms into symmetric, asymmetric and hash families; the number of keys each method uses; and the port numbers 80 and 443. The traps to watch are calling a hash an encryption algorithm, believing that a digital signature keeps the contents secret, and mixing up whose key is used for signing and whose for confidentiality. Banking papers add the Indian legal side, the IT Act, 2000 and the Controller of Certifying Authorities.

Important Facts

Plaintext and ciphertextReadable data and its encrypted form; the key is the secret, not the algorithm
Symmetric encryptionOne shared key; also called secret key, private key or conventional encryption
DES56-bit key, 64-bit blocks; Triple DES applies DES three times
AESAdopted 2001 from Rijndael; 128-bit blocks; keys of 128, 192 or 256 bits
RSA1977, by Rivest, Shamir and Adleman; based on factorising large primes
Diffie-Hellman1976; used to agree a shared key over an open channel
MD5Hash function with a 128-bit digest, no key, irreversible
SHA-256Hash function with a 256-bit digest; used in blockchain
Digital signatureDigest encrypted with the sender's private key; gives authentication, integrity, non-repudiation
ConfidentialityEncrypt with the receiver's public key
SSLSecure Sockets Layer, made by Netscape in the mid-1990s
TLSTransport Layer Security, the successor of SSL, standardised from 1999
HTTPS port443, against port 80 for plain HTTP
Certificate formatX.509, issued by a certifying authority under a public key infrastructure
Indian lawInformation Technology Act, 2000; electronic signatures added by the 2008 amendment
RegulatorController of Certifying Authorities licenses the certifying authorities
Email securityPretty Good Privacy and S/MIME; IPSec and VPN protect whole connections
Wi-Fi securityWPA2 and WPA3 use AES

Practice MCQs on this topic

Q1.Computer AwarenessAsked in: SSC CHSL · 01 Jul, 2024, Shift 4Easy

Symmetric encryption is also known as:

  1. A.public-key encryption
  2. B.asymmetric encryption
  3. C.conventional encryption
  4. D.hybrid encryption
Show answer
Correct answer: C. conventional encryption

Explanation

The correct answer is C, conventional encryption. Symmetric encryption uses one shared secret key for both locking and unlocking data, and because it is the older and simpler of the two families it is variously called conventional, secret key or private key encryption. Option A, public-key encryption, is the opposite arrangement: it uses a pair of keys, a public one that may be shared freely and a private one that is never shared. Option B, asymmetric encryption, is just another name for that same public-key family, so it too is the opposite of what the question asks. Option D, hybrid encryption, describes the practical combination used on the internet, where an asymmetric exchange settles a symmetric session key that then carries the data; it is not a synonym for symmetric encryption. DES, Triple DES and AES are the standard symmetric examples, while RSA and Diffie-Hellman are asymmetric.

Q2.Computer AwarenessAsked in: SSC CHSL · 18 Nov, 2024Easy

In symmetric encryption, how many keys are used to encrypt and decrypt data?

  1. A.Two keys
  2. B.One key
  3. C.No key
  4. D.Three keys
Show answer
Correct answer: B. One key

Explanation

The correct answer is B, one key. The defining feature of symmetric encryption is that a single shared secret key performs both operations: the sender encrypts the plaintext with it and the receiver decrypts the ciphertext with the very same key. That is also its practical problem, because the key must be delivered to the other party over some safe channel before any message can be exchanged. Option A, two keys, describes asymmetric or public key encryption, where a public key and a private key form a linked pair. Option C, no key, describes a hash function such as MD5 or SHA-256, which produces a fixed-length digest without any key and cannot be reversed; hashing is therefore not encryption at all. Option D, three keys, is a distractor built on the name Triple DES, which in fact applies the DES algorithm three times and is still symmetric.

Q3.Computer AwarenessEasy

What is the full form of SSL, the protocol whose successor secures websites today?

  1. A.Secure Socket Line
  2. B.Secure Sockets Layer
  3. C.System Security Layer
  4. D.Secure Server Link
Show answer
Correct answer: B. Secure Sockets Layer

Explanation

The correct answer is B, Secure Sockets Layer. SSL was developed by Netscape in the mid-1990s to encrypt the traffic between a web browser and a web server, and its successor, Transport Layer Security or TLS, standardised from 1999, is what actually protects websites now; the older name survives in common speech and in the phrase SSL certificate. Options A, C and D are invented expansions of the kind objective papers use to test whether a candidate has memorised the exact words. A socket in networking is the combination of an IP address and a port number, which is why the protocol that sits above the transport layer and below the application layer was named for sockets. Remember the chain: SSL became TLS, and HTTP protected by either of them is called HTTPS, which runs on port 443.

Q4.Computer AwarenessMedium

HTTPS, the secure form of web browsing, uses which default port number?

  1. A.21
  2. B.25
  3. C.80
  4. D.443
Show answer
Correct answer: D. 443

Explanation

The correct answer is D, 443. HTTPS is HTTP carried inside an SSL or TLS tunnel, and the port reserved for it is 443, which is why a padlock appears in the address bar when a site is reached on that port with a valid certificate. Option C, port 80, is the default for ordinary unencrypted HTTP, and it is the pair 80 and 443 that examiners test most often. Option A, port 21, belongs to the File Transfer Protocol, which uses 21 for control and 20 for data. Option B, port 25, is the Simple Mail Transfer Protocol used to send electronic mail, with 110 for POP3 and 143 for IMAP on the receiving side. Other numbers worth memorising are 22 for SSH, 23 for Telnet and 53 for DNS. These port numbers are fixed by convention and appear in SSC, Railway and banking papers almost every year.

Q5.Computer AwarenessMedium

The RSA algorithm, published in 1977, is an example of which kind of cryptography?

  1. A.Symmetric key cryptography
  2. B.Public key cryptography
  3. C.Hashing
  4. D.Steganography
Show answer
Correct answer: B. Public key cryptography

Explanation

The correct answer is B, public key cryptography. RSA, named after Rivest, Shamir and Adleman, works with a linked pair of keys and takes its security from the difficulty of factorising the product of two large prime numbers; it is used both to exchange keys and to create digital signatures. Option A is wrong because symmetric cryptography uses one shared key, and its standard examples are DES, Triple DES and AES. Option C, hashing, is not encryption at all: a hash function such as MD5 or SHA-256 uses no key, produces a fixed-length digest and cannot be reversed, so nothing encrypted by it can be recovered. Option D, steganography, hides the very existence of a message by concealing it inside an image, audio file or document, instead of scrambling its content. A reliable memory aid is that RSA and Diffie-Hellman are asymmetric, while DES and AES are symmetric.

Q6.Computer AwarenessMedium

Which of the following is a hash function and not an encryption algorithm?

  1. A.AES
  2. B.DES
  3. C.MD5
  4. D.Blowfish
Show answer
Correct answer: C. MD5

Explanation

The correct answer is C, MD5. The Message Digest 5 algorithm takes an input of any length and returns a 128-bit digest. It uses no key, and the process cannot be reversed to recover the input, which is exactly why it is a hash and not a cipher; hashes are used to check that a file or password has not been altered. Options A, B and D are all symmetric block ciphers that encrypt and decrypt with a shared key. AES, chosen in 2001 from the Rijndael design, works on 128-bit blocks with keys of 128, 192 or 256 bits. DES, from the 1970s, used a 56-bit key on 64-bit blocks and is now considered breakable. Blowfish is another block cipher of the same family. The other names in the hash family worth remembering are SHA-1, which gives 160 bits, and SHA-256, which gives 256 bits and is used in blockchains.

Q7.Computer AwarenessHard

A digital signature on an electronic document, by itself, does NOT provide which of the following?

  1. A.Authentication of the sender
  2. B.Integrity of the document
  3. C.Non-repudiation by the sender
  4. D.Confidentiality of the contents
Show answer
Correct answer: D. Confidentiality of the contents

Explanation

The correct answer is D, confidentiality of the contents. A digital signature is made by hashing the document and encrypting that digest with the signer's private key. Anyone holding the signer's public key can open the digest, so the document itself travels in the clear and remains readable; confidentiality has to be added separately by encrypting the document with the recipient's public key. Option A is provided, because only the holder of that private key could have produced a digest that the matching public key opens. Option B is provided, because the receiver hashes the document again and compares: any change, even of a single character, gives a different digest. Option C is provided, because the signer cannot later deny having signed, the private key being theirs alone. This distinction between signing and encrypting is the most frequently tested idea in the whole chapter.

Q8.Computer AwarenessHard

In public key cryptography, to send a confidential message the sender encrypts it with:

  1. A.the sender's own private key
  2. B.the sender's own public key
  3. C.the receiver's public key
  4. D.the receiver's private key
Show answer
Correct answer: C. the receiver's public key

Explanation

The correct answer is C, the receiver's public key. In a key pair, whatever one key locks only the other can unlock. So a message encrypted with the receiver's public key can be opened only by the receiver's private key, which nobody else holds; that is exactly what confidentiality requires. Option A, the sender's private key, is what is used to create a digital signature, which proves who sent the document but hides nothing, since the matching public key is available to all. Option B, the sender's own public key, would produce a message only the sender could read, which defeats the purpose. Option D is impossible in practice, because a private key never leaves its owner and the sender can never have it. The rule to carry into the exam is simple: encrypt with the receiver's public key for secrecy, sign with your own private key for proof.

Q9.Computer AwarenessHard

Which algorithm was adopted in 2001 as the Advanced Encryption Standard, replacing DES?

  1. A.RSA
  2. B.Rijndael
  3. C.SHA-1
  4. D.RC4
Show answer
Correct answer: B. Rijndael

Explanation

The correct answer is B, Rijndael. The Advanced Encryption Standard is the Rijndael cipher, designed by the Belgian cryptographers Joan Daemen and Vincent Rijmen, which won an open competition and was adopted in 2001 in place of the ageing Data Encryption Standard. AES is a symmetric block cipher working on 128-bit blocks with key lengths of 128, 192 or 256 bits, and it is used in Wi-Fi security, disk encryption and government communication. Option A, RSA, is asymmetric and was never a candidate to replace DES for bulk encryption. Option C, SHA-1, is a hash function giving a 160-bit digest; it computes no ciphertext and cannot encrypt anything. Option D, RC4, is a stream cipher once common in the older wireless standard WEP and in early SSL, but it was never adopted as the standard and is now discouraged for its weaknesses.

Q10.Computer AwarenessMedium

Digital signatures were given legal recognition in India by which of the following Acts?

  1. A.The Indian Telegraph Act, 1885
  2. B.The Information Technology Act, 2000
  3. C.The Companies Act, 2013
  4. D.The Indian Evidence Act, 1872
Show answer
Correct answer: B. The Information Technology Act, 2000

Explanation

The correct answer is B, the Information Technology Act, 2000. This Act gave electronic records and digital signatures the same legal standing as paper records and handwritten signatures, and its amendment of 2008 broadened the provision to electronic signatures generally. Under the Act a Digital Signature Certificate is issued by a licensed certifying authority, and those authorities are licensed and supervised by the Controller of Certifying Authorities. Option A, the Indian Telegraph Act of 1885, governs telegraph and telecommunication licensing and interception, not electronic signatures. Option C, the Companies Act of 2013, requires directors to use digital signatures for filings but did not create their legal validity. Option D, the Indian Evidence Act of 1872, was itself amended by the 2000 Act so that electronic records could be admitted as evidence, which is the reason it is offered here as a distractor.

Frequently Asked Questions

What is the difference between hashing and encryption?

Encryption is two-way: with the right key the ciphertext can be turned back into the original data. Hashing is one-way: it uses no key, always produces a digest of fixed length, and the original input cannot be recovered from it. Encryption protects secrecy, while hashing proves that data has not been altered, which is why passwords are stored as hashes.

Does a digital signature keep a document secret?

No. The signature is the document's digest encrypted with the signer's private key, and the matching public key is available to everyone, so the digest and the document can both be read. A signature proves who signed and that nothing was changed. To keep the contents secret the document must also be encrypted, with the recipient's public key.

What is the difference between SSL and TLS?

SSL, Secure Sockets Layer, was created by Netscape in the mid-1990s. TLS, Transport Layer Security, is its standardised successor, first published in 1999, and all current secure websites use TLS. The name SSL survives in everyday use and in the phrase SSL certificate, which is really a TLS certificate.

Why do secure websites use both symmetric and asymmetric encryption?

Asymmetric encryption solves the problem of agreeing on a secret with a stranger, but it is slow. Symmetric encryption is fast but needs a shared key. So the handshake uses the server's key pair to settle a one-time symmetric session key, and the page data is then carried under that fast symmetric key. This mixture is called hybrid encryption.

Who issues Digital Signature Certificates in India?

Licensed certifying authorities issue them, and those authorities are licensed and supervised by the Controller of Certifying Authorities under the Information Technology Act, 2000. Such certificates are needed for income tax and company filings, for e-tendering and for customs work, and the Aadhaar-based e-Sign service offers an online alternative.

Sources

  • The Information Technology Act, 2000, and the Amendment Act, 2008 — Ministry of Law and Justice, Government of India
  • Digital Signature Certificates and licensed Certifying Authorities — Controller of Certifying Authorities, Ministry of Electronics and Information Technology
  • Computer Science (Class XII), unit on computer networks and network security — NCERT
View all