Encryption Technology Applications · Topic 1 of 3

Application of Cryptography

Learn how cryptography protects real traffic: security goals mapped to tools, SSL and TLS layers, the handshake, cipher suites and HTTPS for HCIA-Security.

  • 5 min
In a nutshell
  • Confidentiality uses symmetric encryption; integrity uses hash or HMAC; authentication and non-repudiation use signatures and certificates.
  • SSL and TLS run between TCP and the application; HTTPS uses TCP port 443.
  • Upper layer protocols: handshake, change cipher spec and alert. Lower layer: record protocol.

What it is

No single algorithm protects a connection on its own. Real protocols combine several tools: symmetric encryption for confidentiality, asymmetric cryptography or DH for key exchange, hashes and HMAC for integrity, and certificates and signatures for authentication.

SSL (Secure Sockets Layer) and its successor TLS (Transport Layer Security) are the best known example. They protect web traffic as HTTPS on TCP port 443, and the same design is used by SSL VPN. IPsec VPN, covered on the next page, uses the same building blocks at the network layer.

Key exchangeRSA or DHSession keySymmetric encryptionAESHMACintegrityProtected session

How it works

Security goals and the tools that meet them

GoalQuestion it answersToolExamples
ConfidentialityCan others read it?Symmetric encryptionAES, SM4, 3DES
IntegrityWas it changed?Hash, HMACSHA-256, SM3, HMAC-SHA2-256
AuthenticationWho sent it?Digital signature, certificate, pre-shared keyRSA, ECDSA, SM2
Non-repudiationCan the sender deny it?Digital signatureRSA or SM2 signature
Key exchangeHow do both sides get the key?Asymmetric encryption or DHRSA, DH, ECDH

When the exam describes a requirement, map it to the row first. "Prevent tampering" means integrity, so the answer is a hash or HMAC, not an encryption algorithm.

SSL and TLS versions

SSL was created by Netscape. SSL 3.0 was followed by TLS 1.0, and the IETF has since published TLS 1.1, 1.2 and 1.3. SSL 2.0, SSL 3.0, TLS 1.0 and TLS 1.1 are now deprecated, and TLS 1.2 and TLS 1.3 are the versions to use.

People still say "SSL" for the whole family, which is why the remote access VPN built on it is called SSL VPN.

SSL and TLS layers

SSL and TLS sit between TCP and the application, so any TCP application can run over them.

LayerProtocolJob
UpperHandshake protocolNegotiates version and algorithms, authenticates the server (and optionally the client), and agrees the keys
UpperChange cipher spec protocolTells the peer to start using the negotiated keys
UpperAlert protocolReports warnings and errors
LowerRecord protocolFragments application data, adds a MAC and encrypts it, using the keys from the handshake
Application dataHTTPSSL recordMAC and encryptTCPport 443IP

The handshake

The classic TLS 1.2 handshake with RSA key exchange runs like this:

  1. ClientHello: the client sends its highest version, a random number and the cipher suites it supports.
  2. ServerHello and Certificate: the server picks the version and cipher suite, sends its own random number and its certificate, then ServerHelloDone.
  3. Client checks the certificate: CA signature, validity period, revocation status and that the name matches the server.
  4. ClientKeyExchange: the client creates a pre-master secret and encrypts it with the server's public key from the certificate.
  5. Keys derived: both sides compute the master secret from the pre-master secret and the two random numbers, then derive the session keys.
  6. ChangeCipherSpec and Finished: each side switches to the new keys and sends an encrypted Finished message that proves the handshake was not altered.
ClientHelloServerHellocertificateClient verifies certificateClientKeyExchangeencrypted secretSession keysFinishedencrypted data

With DHE or ECDHE key exchange, the server signs DH values instead and the pre-master secret is computed by DH. That gives forward secrecy: a stolen server private key cannot decrypt traffic recorded earlier. TLS 1.3 uses only forward secret key exchange.

Cipher suites

A cipher suite names one algorithm for each job. In TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256:

PartJob
ECDHEKey exchange
RSAServer authentication (certificate signature)
AES_128_GCMBulk encryption and integrity
SHA256Hash used in key derivation

The client offers a list and the server chooses one suite both support. A suite containing RC4, DES or MD5 should be disabled.

A worked example

A user opens the HTTPS web management page of a USG firewall, and the browser warns that the certificate is not trusted. The firewall is presenting a certificate that was not issued by a CA the browser trusts.

The data is still encrypted, but the browser cannot confirm the server's identity. The fix is to load a certificate from a CA the browser trusts, or to import the issuing CA certificate into the browser.

How the exam asks about this

  • "Which SSL protocol fragments, protects and encrypts application data?" → The record protocol.
  • "During the handshake, how is the pre-master secret protected with RSA key exchange?" → It is encrypted with the server's public key from its certificate.
  • "Which security goal does a digital signature provide that encryption does not?" → Non-repudiation, together with sender authentication.

What to remember for the exam

  • Confidentiality uses symmetric encryption; integrity uses hash or HMAC; authentication and non-repudiation use signatures and certificates.
  • SSL and TLS run between TCP and the application; HTTPS uses TCP port 443.
  • Upper layer protocols: handshake, change cipher spec and alert. Lower layer: record protocol.
  • The handshake negotiates the cipher suite, authenticates the server by certificate and agrees session keys; bulk data then uses symmetric encryption.
  • TLS 1.2 and 1.3 are current; SSL 2.0, 3.0, TLS 1.0 and 1.1 are deprecated.
Watch out

Asymmetric keys are not used to encrypt the web page itself. They only protect or agree the session key, and the page is encrypted with a symmetric algorithm such as AES.

Common mistakes

Calling SSL a network layer protocol. SSL and TLS sit above TCP. IPsec is the network layer option, which is why it can protect any IP traffic, not just TCP sessions.

Assuming client certificates are always required. In a normal HTTPS session, only the server presents a certificate. Client certificate authentication is optional and must be requested by the server.

Reading a cipher suite as one algorithm. A suite lists separate algorithms for key exchange, authentication, encryption and hashing, and each can be weak on its own.

Check yourself

  • Which TLS message tells the peer to start using the negotiated keys?

    ChangeCipherSpec, sent by each side just before its encrypted Finished message.

  • What does forward secrecy protect against?

    Decryption of previously recorded sessions after the server's private key is later stolen; DHE and ECDHE key exchange provide it.

  • Which tool meets a requirement to detect any change to a message?

    A hash, or HMAC when the check must also prove the message came from a key holder.

Topic 1 of 3 in Encryption Technology Applications

Test yourself on Encryption Technology Applications

The full Huawei HCIA-Security H12-711 question bank has 600 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Huawei. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.