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
- 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.
How it works
Security goals and the tools that meet them
| Goal | Question it answers | Tool | Examples |
|---|---|---|---|
| Confidentiality | Can others read it? | Symmetric encryption | AES, SM4, 3DES |
| Integrity | Was it changed? | Hash, HMAC | SHA-256, SM3, HMAC-SHA2-256 |
| Authentication | Who sent it? | Digital signature, certificate, pre-shared key | RSA, ECDSA, SM2 |
| Non-repudiation | Can the sender deny it? | Digital signature | RSA or SM2 signature |
| Key exchange | How do both sides get the key? | Asymmetric encryption or DH | RSA, 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.
| Layer | Protocol | Job |
|---|---|---|
| Upper | Handshake protocol | Negotiates version and algorithms, authenticates the server (and optionally the client), and agrees the keys |
| Upper | Change cipher spec protocol | Tells the peer to start using the negotiated keys |
| Upper | Alert protocol | Reports warnings and errors |
| Lower | Record protocol | Fragments application data, adds a MAC and encrypts it, using the keys from the handshake |
The handshake
The classic TLS 1.2 handshake with RSA key exchange runs like this:
- ClientHello: the client sends its highest version, a random number and the cipher suites it supports.
- ServerHello and Certificate: the server picks the version and cipher suite, sends its own random number and its certificate, then ServerHelloDone.
- Client checks the certificate: CA signature, validity period, revocation status and that the name matches the server.
- ClientKeyExchange: the client creates a pre-master secret and encrypts it with the server's public key from the certificate.
- Keys derived: both sides compute the master secret from the pre-master secret and the two random numbers, then derive the session keys.
- ChangeCipherSpec and Finished: each side switches to the new keys and sends an encrypted Finished message that proves the handshake was not altered.
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:
| Part | Job |
|---|---|
| ECDHE | Key exchange |
| RSA | Server authentication (certificate signature) |
| AES_128_GCM | Bulk encryption and integrity |
| SHA256 | Hash 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.
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.