1 of 54

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

1

2 of 54

Web Security Considerations

Web Security Threats

Web Traffic Security Approaches

Transport Layer Security

TLS Architecture

TLS Record Protocol

Change Cipher Spec Protocol

Alert Protocol

Handshake Protocol

Cryptographic Computations

Heartbeat Protocol

SSL/TLS Attacks

TLSv1.3

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

2

3 of 54

  • Almost everyone — businesses, governments, and people — has a website
  • Companies want to use the web for online business (e-commerce).
  • The Internet is vulnerable to attacks and hacking.
  • Businesses need secure web services for safe online transactions.
  • Main web security methods: SSL/TLS, HTTPS, and SSH.

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

3

4 of 54

It also explains three main security methods:

    • SSL/TLS – keeps data safe during transfer
    • HTTPS – a secure version of websites
    • SSH – secures remote connections

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

4

5 of 54

WEB SECURITY CONSIDERATIONS

  • Web software is complex, which can hide many security flaws.
  • Even properly installed systems can still be vulnerable to attacks.
  • A hacked web server can give attackers access to the entire organization’s network.
  • Many users lack security awareness and protection skills.

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

5

6 of 54

Web Security Threats

  • Web threats can be passive (e.g., eavesdropping, accessing restricted info) or active (e.g., impersonation, message tampering, changing website data).
  • Threats can also be classified by location:
    • Web server
    • Web browser
    • Network traffic between browser and server
  • Server and browser security relates to computer system security.
  • Traffic security relates to network security.

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

6

7 of 54

Web Traffic Security Approaches

Web security can be implemented at different layers of the TCP/IP stack, with similar services but different scopes.

  • IPsec: network-layer, general-purpose, transparent, can filter traffic.
  • SSL/TLS: above TCP, widely supported by browsers and servers.
  • Application-specific security: built into apps, tailored to their needs.

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

7

8 of 54

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

8

9 of 54

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

9

10 of 54

TRANSPORT LAYER SECURITY

  • TLS is a widely used security protocol for the Internet, currently at Version 1.2 (RFC 5246).
  • It evolved from SSL, which is now deprecated.
  • TLS provides a general-purpose security service over TCP.
  • Implementation options:
    1. As part of the protocol suite (transparent to applications)
    2. Embedded in specific applications/packages (e.g., browsers, web servers)

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

10

11 of 54

TLS Architecture

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

11

12 of 54

  • TLS uses TCP to provide a reliable end-to-end secure service.
  • TLS is not a single protocol; it consists of two layers of protocols.
    • TLS Record Protocol
    • Higher-layer TLS protocols

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

12

13 of 54

  • TLS Record Protocol:
    • Provides basic security services to higher-layer protocols.
    • Enables protocols like HTTP to operate securely on top of TLS.
  • Higher-layer TLS protocols:
    • Handshake Protocol – manages session establishment and cryptographic parameters.
    • Change Cipher Spec Protocol – signals changes in encryption parameters(switch from unencrypted to encrypted mode)
    • Alert Protocol – handles warnings and error messages.
    • Heartbeat Protocol -- Maintains connection liveness(connection is alive)

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

13

14 of 54

TLS Connection:

  • A transient, peer-to-peer transport providing secure communication.
  • Each connection is linked to a single TLS session.

TLS Session:

  • An association between a client and a server.
  • Created via the TLS Handshake Protocol.
  • Defines cryptographic security parameters.
  • Can be reused across multiple connections to reduce negotiation overhead

Two important TLS concepts are the TLS session and the TLS connection,

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

14

15 of 54

TLS Session State Parameters:

  • Session ID: Identifies an active or resumable session.
  • Peer certificate: X.509 v3 certificate of the peer (can be null).
  • Compression method: Algorithm for compressing data before encryption.
  • Cipher spec: Defines encryption algorithm, MAC hash, and cryptographic attributes.
  • Master secret: 48-byte shared secret between client and server.
  • Is resumable: Flag indicating if the session can initiate new connections.

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

15

16 of 54

TLS Connection State Parameters:

  • Server & client random: Random byte sequences for each connection.
  • Server/Client write MAC secret: Keys for MAC operations on sent data.
  • Server/Client write key: Symmetric keys for encrypting/decrypting data.
  • Initialization vectors (IVs): Used in block cipher CBC mode; updated per record.
  • Sequence numbers: Separate counters for sent and received messages

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

16

17 of 54

  • TLS Record Protocol

Services Provided:

  • Confidentiality: Uses shared secret key from Handshake Protocol for encryption.
  • Message Integrity: Uses shared secret key to compute a Message Authentication Code (MAC).

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

17

18 of 54

Operation Steps:

  1. Fragmentation: Break application data into blocks ≤ 16,384 bytes (2¹⁴).
  2. Compression (optional): Lossless; max increase ≤ 1024 bytes. TLSv2 default is null.
  3. MAC Calculation:
    1. Uses HMAC (MD5 or SHA-1).
    2. Covers: sequence number, type, version, length, and compressed fragment.
  4. Encryption: Symmetric encryption of compressed data + MAC.
    • Total length ≤ 16,384 + 1024 bytes.
  5. Transmission: Add header and send via TCP.
  6. Reception: Decrypt, verify MAC, decompress, and reassemble before passing to higher layers.

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

18

19 of 54

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

19

20 of 54

TLS Record Header Fields:

  • Content Type (8 bits): Indicates the higher-layer protocol (e.g., handshake, alert, application_data).
  • Major Version (8 bits): TLS major version (TLSv2 = 3).
  • Minor Version (8 bits): TLS minor version (TLSv2 = 1).
  • Compressed Length (16 bits): Length of plaintext or compressed fragment; max = 16,384 + 2048 bytes.

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

20

21 of 54

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

21

22 of 54

  • Change Cipher Spec Protocol:

  • The Change Cipher Spec Protocol is one of the simplest components of TLS (Transport Layer Security).
  • It uses the TLS Record Protocol to send its message.
  • The protocol consists of only one message, containing a single byte with the value 1.
  • Its main purpose is to inform the peer (client or server) that all future messages will be protected using the newly negotiated encryption and MAC algorithms.

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

22

23 of 54

  • When this message is sent, the pending security parameters (cipher suite, keys, etc.) are copied to the current state.

  • After this step, the connection becomes secure, and all further communication is encrypted and authenticated.

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

23

24 of 54

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

24

25 of 54

  • Alert Protocol

Main Purpose:

  • Conveys TLS-related alerts to the peer.
  • Alerts are compressed and encrypted according to the current TLS state.

  • Alert Message Format:2 bytes per message:
  • Level: warning (1) or fatal (2) – fatal alerts terminate the connection.
  • Alert code: Specifies the description of alert.

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

25

26 of 54

  • unexpected_message – inappropriate message received.
  • bad_record_mac – incorrect MAC received.
  • decompression_failure – invalid decompression input.
  • handshake_failure – unable to negotiate acceptable security parameters.
  • illegal_parameter – handshake field out of range or inconsistent.
  • decryption_failed – ciphertext invalid (e.g., wrong padding or block size).
  • record_overflow – record exceeds max allowed length.

The following alerts are always fatal:

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

26

27 of 54

  • unknown_ca – certificate not trusted/CA not found.
  • access_denied – certificate valid but access denied.
  • decode_error – message decoding failed.
  • protocol_version – client’s TLS version not supported.
  • insufficient_security – server requires stronger ciphers.
  • internal_error – internal error unrelated to peer/protocol
  • export_restriction – key length not compliant with export rules.

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

27

28 of 54

Other Alerts (Warnings or Non-Fatal):

  • close_notify – sender will send no more messages; must be sent before closing.
  • bad_certificate – certificate corrupt.
  • unsupported_certificate – certificate type not supported.
  • certificate_revoked – certificate revoked.
  • certificate_expired – certificate expired.
  • certificate_unknown – certificate unacceptable due to other issues.
  • decrypt_error – handshake cryptographic failure.
  • user_canceled – handshake canceled for non-protocol reasons.
  • no_renegotiation – renegotiation not allowed; always a warning.

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

28

29 of 54

Handshake Protocol

  • The Handshake Protocol is the most complex part of TLS.
  • It is used before any application data is transmitted.
  • It allows a client and server to authenticate each other, agree on cryptographic keys, and establish a secure connection before any data is exchanged.
  • Its main purposes are to:
    • Authenticate the client and server.
    • Negotiate encryption and MAC algorithms.
    • Establish cryptographic keys for secure communication.

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

29

30 of 54

  • The protocol involves a series of messages exchanged between client and server.
  • Each message includes:
    1. Type (1 byte): Identifies the message type (one of 10 types).
    2. Length (3 bytes): Indicates message size.
    3. Content: Contains the message parameters.
  • The handshake process occurs in four phases to establish a secure logical connection between client and server.

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

30

31 of 54

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

31

32 of 54

Four phases

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

32

33 of 54

  • The handshake process occurs in four phases to establish a secure logical connection between client and server.

Phase 1: Establish Security Capabilities

Phase 2: Server Authentication and Key Exchange

Phase 3: Client Authentication and Key Exchange

Phase 4: Finish the Handshake

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

33

34 of 54

Phase 1: Establish Security Capabilities (TLS Handshake)

    • Initiates a logical connection and establishes the security capabilities for the session.
  • Client action: Sends a client_hello message with:
    • Version: Highest TLS version the client supports.
    • Random: 32-bit timestamp + 28 random bytes (nonces to prevent replay attacks).
    • Session ID:
      • Nonzero → update existing session or create new connection on it.
      • Zero → create new session.
    • CipherSuite: List of supported cryptographic algorithm combinations (key exchange + CipherSpec), ordered by preference.
    • Compression Method: List of supported compression methods.

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

34

35 of 54

Server action: Responds with server_hello, including:

  • Version: Lowest of client-suggested version and server-supported version.
  • Random: Independently generated server random value.
  • Session ID:
    • Matches client’s nonzero SessionID or assigns a new session ID.
  • CipherSuite: Single suite selected from client’s list.
  • Compression Method: Selected from client’s supported methods.

After sending the client_hello message, the client waits for the server_

hello message, which contains the same parameters as the client_hello

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

35

36 of 54

The CipherSuite field contains the single cipher suite selected by the server from those proposed by the client .The first element of the Ciphersuite parameter is the key exchange method. Following key exchange methods are supported.

  • .
  • RSA: Secret key encrypted with receiver’s RSA public key; requires a public-key certificate.
  • Fixed Diffie–Hellman (DH): Server certificate contains DH parameters; client provides its DH parameters; results in a fixed secret key.
  • Ephemeral Diffie–Hellman (DHE): Temporary secret keys created; DH keys signed with sender’s private RSA/DSS key; certificates authenticate keys; more secure due to temporary keys.
  • Anonymous Diffie–Hellman (ADH): DH keys exchanged without authentication; vulnerable to man-in-the-middle attacks

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

36

37 of 54

CipherSpec Fields (define encryption and integrity):

  • CipherAlgorithm: e.g., DES, 3DES, DES40, IDEA
  • MACAlgorithm: MD5 or SHA-1
  • CipherType: Stream or Block
  • IsExportable: True or False
  • HashSize: 0, 16 (MD5), or 20 (SHA-1) bytes
  • Key Material: Bytes used to generate write keys
  • IV Size: Size of Initialization Vector for CBC encryption

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

37

38 of 54

Phase 2: Server Authentication and Key Exchange (TLS Handshake)

The server proves its identity and , if needed , shares key exchange information

1.Server Certificate:

    • The server sends its digital certificate (usually X.509 format) to prove its identity.
    • The certificate contains the server’s public key and is signed by a trusted Certificate Authority (CA)

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

38

39 of 54

2. Server Key Exchange (optional):

  • Not needed if:
    • Fixed Diffie–Hellman certificate sent.
    • RSA key exchange is used with standard RSA key.
  • Required for:
    • Anonymous Diffie–Hellman: Sends prime, primitive root, and server’s public key.
    • Ephemeral Diffie–Hellman: Same as above + signature of parameters.
    • RSA with signature-only key: Sends temporary RSA public key (modulus & exponent) + signature.

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

39

40 of 54

3. Certificate Request (optional):

    • Server can request client certificate (if not using anonymous DH).
    • Includes:
      • certificate_type (RSA/DSS for signature or DH authentication).
      • certificate_authorities (list of trusted CAs).

4. Server Done (mandatory):

    • Indicates end of server hello and associated messages.
    • Indicates the server has completed its initial handshake messages.
    • Server waits for client response

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

40

41 of 54

Phase 3: Client Authentication and Key Exchange

The client responds, possibly authenticates itself, and provides key exchange information.

Messages:Certificate (optional)

Sent if the server requested client authentication.

ClientKeyExchange

Sent by the client; contains key material (like the pre-master secret) used to generate session keys.

CertificateVerify (optional)

Sent by the client to prove ownership of the private key corresponding to its certificate.

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

41

42 of 54

Phase 4: Finish the Handshake

Both sides confirm that the handshake was successful and switch to encrypted communication.

Messages:

ChangeCipherSpec (protocol separate from handshake)

    • Tells the other side to start using the negotiated encryption parameters.
  • Finished
    • Sent by both sides.
    • Encrypted and includes a hash of all previous handshake messages to ensure integrity.

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

42

43 of 54

After Phase 4:

  • Both client and server have:
    • Session keys derived from the same master secret.
    • Encryption and MAC algorithms ready.
    • A secure communication channel established.

All subsequent data (like HTTP requests or emails) are encrypted and protected for:

  • Confidentiality
  • Integrity
  • Authentication

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

43

44 of 54

  • A heartbeat is a periodic signal used to indicate normal operation or synchronize system components.
  • The TLS Heartbeat Protocol (defined in RFC 6250, 2012) operates on top of the TLS Record Protocol.
  • It has two message types:
    • heartbeat_request
    • heartbeat_response
  • Support for heartbeats is negotiated during Phase 1 of the TLS Handshake Protocol.
  • A peer can choose to send requests, respond to requests, or both.
  • Heartbeat Protocol:

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

44

45 of 54

  • Heartbeat Request/Response:
    • A heartbeat_request can be sent anytime.
    • The receiver must promptly reply with a heartbeat_response containing an exact copy of the request’s payload.

  • Message Structure:
    • Includes payload length, payload (16 bytes–64 KB, random), and padding (random content).

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

45

46 of 54

Main Purposes:

    • Confirms the recipient is still active even during inactivity.
    • Keeps the connection alive during idle periods to prevent firewall timeout.

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

46

47 of 54

SSL/TLS Attacks

  1. Handshake attacks:
    1. Target the handshake process (especially RSA).
    2. Try to steal keys or trick systems during setup.
  2. Record/Application data attacks:
    • Exploit how data is encrypted or compressed.
    • Examples:
      1. BEAST (2011): Breaks data encryption by guessing plaintext.
      2. CRIME (2012): Steals cookie data using compression leaks.

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

47

48 of 54

3.PKI (Certificate) attacks:

    • Attack weak or faulty certificate validation.
    • Many SSL/TLS libraries (like OpenSSL, GnuTLS, Python, PHP, etc.) had such bugs.

4. Other attacks (like DoS):

    • Overload the server by sending too many handshake requests.
    • Makes the server busy generating keys, leading to service failure.

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

48

49 of 54

TLS v1.3

  1. Main goal:
    1. Improve security and speed of TLS.
  2. Old, risky features removed:
    • No compression (prevents CRIME attack).
    • No weak ciphers (like RC4).
    • No static RSA/DH key exchange (forwards secrecy).
    • No renegotiation or Change Cipher Spec protocol.
    • No MD5 or SHA-224 hashes.
    • Removed 32-bit timestamp from ClientHello.

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

49

50 of 54

  • Stronger key exchange:
    • Uses only Diffie–Hellman (DH) or Elliptic Curve DH (ECDH).
    • RSA is not used for key exchange anymore — improves forward secrecy.

  • Faster handshake:
    • Supports 1-RTT (one round-trip time) handshake.
    • Client sends key info early → faster and more secure connection setup.

  • Overall benefits:
    • More secure, faster, and less prone to attacks than TLS 1.2.

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

50

51 of 54

IP Security Overview

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

51

52 of 54

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

52

53 of 54

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

53

54 of 54

THANK YOU

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

/skit.org.in

/skit.org.in

/skit.org.in

Sri Krishna Institute of Technology

(Approved by AICTE, Accredited by NAAC, Affiliated to VTU, Karnataka)

11/12/2025

54