Technology - Non SAP

How HTTPS Works

Every time you open a banking app, log into a website, or submit a form, HTTPS is working in the background to keep that data private and secure.

Most people know it is something to do with the padlock in the browser. This post explains what is actually happening — without the cryptography deep-dive.

HTTP vs HTTPS — the difference in one sentence

HTTP sends data in plain text. HTTPS sends the same data but encrypted — so only the intended recipient can read it.

HTTPHTTPS
Data in transitPlain text — anyone who intercepts it can read itEncrypted — intercepted data is unreadable
AuthenticationNo way to verify you are talking to the right serverCertificate proves the server’s identity
PortPort 80Port 443
Browser indicatorNo padlock — some browsers show a warningPadlock in the address bar
Use todayShould not be used for anything with user dataThe standard for all websites

⚠️ Why HTTP alone is never enough

On HTTP, every device between you and the server — your router, your ISP, any network middleman — can read your data in full. Usernames, passwords, form submissions, everything. This is called a man-in-the-middle attack. HTTPS prevents it.

What TLS is

TLS (Transport Layer Security) is the protocol that makes HTTPS secure. It is what does the actual encrypting.

You will also hear SSL mentioned. SSL was the original protocol, now retired. TLS replaced it. In practice, people still say SSL when they mean TLS — they are the same thing in everyday conversation, but TLS is what is actually in use today.

TermWhat it isStatus
SSL 2.0 / 3.0Original secure protocolRetired — insecure, not used
TLS 1.0 / 1.1Early versions of TLSDeprecated — disabled in modern browsers
TLS 1.2Widely used, still supportedActive — secure
TLS 1.3Current version — faster and more secureActive — recommended

What a certificate is

A TLS certificate is a digital document issued to a website. It contains two things that matter:

  • The website’s public key — used to set up the encrypted connection
  • Proof of identity — confirmation that the certificate was issued by a trusted authority

Certificates are issued by organisations called Certificate Authorities (CAs). A CA is a trusted third party — both your browser and the website’s server trust it. Examples include DigiCert, Let’s Encrypt, and Sectigo.

Your browser comes pre-installed with a list of trusted CAs. When you visit a site, the browser checks whether the site’s certificate was signed by one of them. If yes — the padlock appears. If no — you get a warning.

Diagram showing Certificate Authority issuing trust to both browser and server, enabling a verified secure connection

Types of certificates

TypeWhat is verifiedCommon use
DV — Domain ValidationProves control of the domain onlyBlogs, personal sites, small projects
OV — Organisation ValidationProves domain + organisation identityBusiness websites, login portals
EV — Extended ValidationThorough legal and identity verificationBanks, e-commerce, high-trust platforms
WildcardCovers a domain and all its subdomains*.rakeshnarayan.com covers all subdomains

The TLS handshake — step by step

Before any data is exchanged between your browser and a server, they go through a handshake. This happens in milliseconds and is invisible to you. Here is what is happening:

TLS handshake sequence diagram showing five steps between browser and server: client hello, server hello, certificate verification, key exchange and encrypted data

#StepWhat happens
1Client HelloYour browser contacts the server and says: here are the TLS versions and encryption methods I support.
2Server HelloThe server picks a TLS version and encryption method, then sends its certificate (containing its public key).
3Certificate CheckYour browser verifies the certificate — checks it was signed by a trusted CA, has not expired, and matches the domain.
4Key ExchangeBrowser and server exchange information to generate a shared session key — a temporary secret key used only for this connection.
5Encrypted ConnectionBoth sides confirm the handshake is complete. All data from this point is encrypted using the shared session key.

Public key and private key — the short version

HTTPS uses two types of keys during the handshake:

KeyWho holds itWhat it does
Public keyShared openly — included in the certificateAnyone can use it to encrypt a message
Private keyHeld only by the server — never sharedOnly the server can decrypt messages encrypted with its public key

Think of the public key as an open padlock that anyone can click shut. Only the server has the key to open it. This is how the browser can safely send a secret to the server without it being readable in transit.

Once the handshake is complete, both sides switch to symmetric encryption using the shared session key — it is faster and used for all actual data transfer.

What the padlock actually means

When you see the padlock in your browser address bar, it means three things:

What the padlock confirmsWhat it does not confirm
The connection is encrypted — data in transit is privateThat the website is legitimate or trustworthy
The certificate was issued by a trusted CAThat the website will not misuse your data
The domain in the certificate matches the site you are visitingThat the organisation behind the site is who they claim to be (for DV certificates)

💡 Padlock does not mean safe

Phishing sites use HTTPS too. The padlock means the connection is encrypted — not that the site is trustworthy. Always check the domain in the address bar carefully, especially before entering credentials.

Why this matters beyond the browser

HTTPS is not just for websites. Any API communication — including SAP BTP integrations, REST API calls, and mobile app data — travels over HTTPS. The same TLS mechanism protects all of it.

Where HTTPS is usedWhy it matters
Web browsersProtects login credentials, form data, session tokens
REST APIsEnsures requests and responses cannot be read or tampered with in transit
Mobile appsAll app-to-server communication should use HTTPS
SAP BTP / integrationsOAuth tokens and data payloads travel over HTTPS — required by all SAP cloud services
Webhooks and callbacksPayloads sent between systems must be encrypted in transit

The short version

ConceptOne-line summary
HTTPPlain text — everything is readable in transit
HTTPSHTTP with TLS encryption — data is private and server identity is verified
TLSThe protocol that does the actual encrypting (TLS 1.2 and 1.3 are current)
CertificateA digital document that proves a server’s identity and carries its public key
Certificate AuthorityA trusted organisation that issues and vouches for certificates
TLS HandshakeA quick negotiation between browser and server to agree on encryption before data flows
Public / Private keyPublic key encrypts, private key decrypts — used during handshake only
Session keyA temporary shared key used to encrypt all actual data in the connection
The padlockConfirms encryption and identity — does not confirm the site is trustworthy

What to take away

HTTPS is not a feature you turn on at the end. It is the baseline for any system that handles user data, API traffic, or sensitive information. Understanding how it works — even at this level — helps you make better decisions about security, integrations, and system design.

🔗 Related reading on this site

REST APIs always travel over HTTPS. If you want to understand the API design principles that sit on top of this secure transport layer, see: REST API Design Principles

Published on rakeshnarayan.com — Articles

URL: https://rakeshnarayan.com/articles/how-https-works/