Security & Identity

Information Security Fundamentals for Developers

Beginner9 min readUpdated

Security has a vocabulary that developers meet in requirements, audits and incident reviews, and misreading it leads to controls that do not fit the risk. This guide builds the foundation: the security properties worth naming, how risk is expressed, the cryptographic primitives and what each one actually guarantees, how TLS and certificates work, the governance frameworks you will be measured against, and what happens during an incident.

What you will learn

  • Use the CIA triad plus authenticity and non-repudiation to state a security requirement precisely
  • Express a risk in terms of asset, threat, vulnerability, likelihood and impact
  • Distinguish encoding, hashing, symmetric and asymmetric encryption and digital signatures
  • Explain the TLS 1.3 handshake and how certificates and PKI establish trust
  • Recognise what ISO 27001 and the NIST Cybersecurity Framework require of a team
  • Follow the phases of incident response and the data protection concepts that shape design

Most of software security is applied common sense, but the field has a precise vocabulary, and using it loosely leads to controls that miss. "Make it secure" is not a requirement; "the audit trail must be tamper-evident and retained for seven years" is. This guide covers the concepts a developer meets in security requirements, risk registers, penetration test reports and incident reviews — enough to read those documents accurately and to argue for the right control.

It is deliberately foundational. Where a topic has a guide of its own, this one gives the shape and points onward: the specific web weaknesses are in the OWASP Top 10, the design practice in application security architecture, and everything about accounts and permissions in identity and access management.

The properties worth naming

The CIA triad names the three classic security properties.

Confidentiality — information is available only to those authorised to see it. Broken by an exposed storage bucket, a log containing card numbers, an API returning another customer's record.

Integrity — information and systems cannot be altered without detection. Broken by an unsigned update mechanism, a total that can be recomputed by a client, an audit log an administrator can edit.

Availability — the service is usable when needed. Broken by a resource-exhaustion attack, but far more often by an expired certificate or a failed deployment, which is why availability is as much an engineering property as a security one.

Two further properties matter enough to name separately. Authenticity is knowing that a message or actor is genuinely who it claims to be — the property authentication and digital signatures provide. Non-repudiation is being able to demonstrate later that a specific party performed an action, so they cannot credibly deny it; it needs both strong authentication and an immutable record, and it is why financial and legal systems care about signing rather than merely authorising.

State requirements in these terms. "Approval records must be tamper-evident" is a testable integrity requirement; "the system should be secure" is not.

Risk in security terms

Risk work uses five words consistently, and mixing them up produces unusable registers.

  • An asset is something of value: a dataset, a service, a reputation, a key.
  • A threat is a potential cause of harm — an actor with a motive, or an event such as a flood.
  • A vulnerability is a weakness a threat can use: an unpatched library, a missing check, an untrained user.
  • Likelihood is how probable the combination is, informed by exposure and by attacker capability.
  • Impact is what it costs if it happens — financial, regulatory, operational, reputational.

Risk is the combination of likelihood and impact for a given threat exploiting a given vulnerability against a given asset. A vulnerability with no plausible threat is a low risk; a modest vulnerability on an internet-facing system holding regulated data is not.

Four responses exist, and choosing consciously is the point of the exercise: mitigate by adding a control, transfer by insuring or contracting, avoid by not doing the risky thing, or accept with a named owner and a review date. Accepting a risk deliberately is legitimate; discovering an accepted risk in a post-incident review that nobody remembers accepting is not.

Cryptography a developer actually needs

Cryptography goes wrong in application code mostly through category errors — using a primitive that does not provide the property required. Four categories, four guarantees.

Encoding converts data between representations. Base64, URL-encoding and hex have no key and no secrecy; they exist so binary survives a text channel. A base64 encoder and decoder reverses any of it instantly, which is exactly the point.

Hashing maps input to a fixed-size digest, deterministically and irreversibly. It provides integrity and identity of content, not confidentiality. Use SHA-256 or SHA-3 for checksums and fingerprints; MD5 and SHA-1 are broken for anything security-relevant because collisions can be constructed. Verifying a downloaded artefact against a published digest is a legitimate use of a hash generator; storing passwords is not — that needs a slow, memory-hard function.

Symmetric encryption uses one shared key to encrypt and decrypt. AES in an authenticated mode such as GCM is the standard choice; it is fast, suits bulk data, and the whole problem becomes how both sides got the key. Never reuse a nonce with the same key, and never use raw ECB mode, which leaks structure.

Asymmetric encryption uses a key pair: the public key encrypts and only the private key decrypts. RSA and elliptic-curve algorithms are slow relative to symmetric ciphers, so real systems use them to establish or wrap a symmetric key and then switch — the hybrid arrangement TLS uses.

Digital signatures invert the asymmetric pair: the private key signs a hash, and anyone with the public key verifies. That gives integrity, authenticity and non-repudiation at once, and it is the mechanism behind certificates, signed tokens and signed release artefacts. A message authentication code such as HMAC gives integrity and authenticity too, but with a shared secret, so it cannot prove which party produced it.

NeedUse
Transport through a text channelEncoding — no security value
Detect accidental or deliberate changeHash or HMAC
Keep bulk data secretAES-GCM with a key from a key manager
Agree a key with a strangerAsymmetric key exchange, then symmetric
Prove who produced somethingDigital signature
Store a passwordArgon2id, scrypt or bcrypt

One rule underlies all of it: use a vetted library and a standard construction. Hand-built protocols and "we XOR it with a secret" fail in ways that are obvious to specialists and invisible to their authors.

TLS and the certificate chain

TLS gives a connection confidentiality, integrity and server authenticity, and it is the control the rest of the stack quietly assumes. TLS 1.3 (RFC 8446) simplified the handshake to a single round trip and removed the older ciphers and options that caused most historical failures.

Client                                          Server
  |-- ClientHello -------------------------------->|   supported groups, key share, cipher suites
  |<------------------------------- ServerHello ---|   chosen suite, key share
  |<------------- {EncryptedExtensions, Certificate,|
  |                CertificateVerify, Finished} ----|   everything after ServerHello is encrypted
  |-- {Finished} --------------------------------->|
  |<========== application data (AEAD) ===========>|

Both sides contribute an ephemeral Diffie-Hellman key share and derive the same session secret without it ever crossing the wire. Because the key is ephemeral, recording today's traffic and stealing the server's private key tomorrow does not decrypt it — the property called forward secrecy, now mandatory. The server proves it holds the private key for its certificate by signing the handshake transcript in CertificateVerify, which is what stops an attacker replaying a certificate they merely copied.

Trust comes from public key infrastructure. A certificate authority verifies control of a domain and issues a certificate binding that name to a public key, signed by an intermediate whose own certificate is signed by a root your operating system or browser already trusts. Validation walks that chain, checks the signature at each step, checks validity dates, checks that the name matches, and checks revocation. What it proves is narrow and worth stating plainly: you are talking to the holder of the private key for that name, and nobody in between can read or modify the traffic. It does not vouch for the operator.

Practical consequences for a developer: serve TLS 1.3 or 1.2 with modern suites and nothing older; enable HSTS so browsers refuse to downgrade; automate renewal, because expiry is the leading cause of TLS incidents; use TLS inside the network too, since network position is not a trust boundary; and never disable certificate validation to make a test pass — that habit reliably escapes into production. Where both parties must authenticate, mutual TLS has the client present a certificate as well, which is the usual choice for service-to-service calls.

Governance, standards and policy

Organisations manage security through frameworks, and the requirements that reach a development team almost always originate in one.

ISO/IEC 27001 specifies an information security management system: define the scope, assess risks, select controls, document them, measure and improve, and be audited against it. Certification is a business asset because customers ask for it, and its controls become the team-level expectations — change management, access review, logging, supplier assessment, secure development.

The NIST Cybersecurity Framework 2.0 organises activity into six functions: Govern, Identify, Protect, Detect, Respond and Recover. It is a structuring vocabulary rather than a certification, and it is unusually useful for spotting imbalance — many teams invest heavily in Protect and almost nothing in Detect and Recover.

Others appear in particular contexts: PCI DSS for card data, SOC 2 for service organisations, and sector regulation in finance and health.

A security policy is the written statement of what the organisation requires, with standards and procedures beneath it giving the specifics. Policies that developers can follow are short, specific and testable; policies written to satisfy an auditor tend to be neither read nor followed, which is worse than having none because it creates documented non-compliance.

Incident response

Incidents happen to competent organisations. The difference between a bad week and a catastrophe is preparation, and the phases in NIST SP 800-61 are worth knowing before you need them.

Preparation. Contacts, roles, an escalation path, access to logs, tested backups, and a rehearsed plan. Everything expensive to arrange under pressure is arranged now.

Detection and analysis. Recognise that something is happening, from an alert, a customer report or a third-party notification, and establish scope: what was reached, when it started, whether it is ongoing. This depends entirely on logging and monitoring put in place earlier.

Containment, eradication and recovery. Stop the spread — isolate a host, revoke credentials, disable an endpoint — while preserving evidence, because a wiped machine cannot be analysed. Then remove the cause, restore from known-good state, and monitor closely for recurrence.

Post-incident activity. A blameless review of what happened, what the timeline was, what worked, and which changes prevent a repeat, with owners and dates. An incident that produces no durable change was wasted.

Two things developers should know in advance: who to call at three in the morning, and that rotating credentials, revoking tokens and forcing re-authentication must be operations you can perform quickly. Practise them; a runbook nobody has executed is a hypothesis.

Protecting personal data

Data protection regulation such as the GDPR imposes principles that translate directly into design decisions, whatever your jurisdiction.

  • Lawful basis and purpose limitation — collect for a stated purpose and do not quietly reuse the data for another.
  • Data minimisation — collect only what the purpose requires. The cheapest way to protect a field is not to store it.
  • Storage limitation — define retention per data category and delete on schedule, which means deletion must be implemented, not aspirational.
  • Integrity and confidentiality — appropriate technical measures: encryption, access control, logging.
  • Accountability — be able to demonstrate compliance, through records of processing and design decisions.

Two techniques are named often and confused often. Pseudonymisation replaces identifiers with tokens while keeping a separate mapping, so the data is still personal data and still regulated, though safer if leaked. Anonymisation removes the ability to re-identify at all, which puts the data outside the regulation — and is genuinely difficult, since combinations of ordinary attributes are frequently unique. Design in the rights the regulation grants — access, correction, erasure, portability — from the start, because retrofitting a delete that reaches every replica, backup, cache and analytics export is one of the harder engineering tasks in a mature system.

Key takeaways

  • Confidentiality, integrity and availability, plus authenticity and non-repudiation, give you the words to write a requirement that can be tested.
  • Risk is asset, threat, vulnerability, likelihood and impact; every risk ends in a conscious decision to mitigate, transfer, avoid or accept.
  • Encoding is not encryption, hashing is not reversible, symmetric is fast and asymmetric solves key distribution, and signatures prove origin.
  • TLS 1.3 gives forward secrecy in one round trip; certificates prove control of a name and nothing about the operator, so automate renewal and never disable validation.
  • ISO 27001 and the NIST framework are where team-level requirements come from; policies only work if they are short, specific and followed.
  • Prepare for incidents before they happen and make the review produce change; for personal data, minimise, define retention and design erasure in from the start.

Sources and further reading

Frequently asked questions

Is base64 a form of encryption?
No. Base64 is an encoding that represents binary data using printable characters so it can travel through text-only channels, and anyone can reverse it with no key at all. Encoding solves a transport problem; encryption solves a confidentiality problem. Treating base64 as protection is a recurring finding in security reviews, usually where a token or a password was stored that way.
Why can't I use SHA-256 to store passwords?
Because it is fast by design. A modern graphics processor computes billions of SHA-256 hashes per second, so a stolen table of such hashes is cracked at scale for common passwords. Password storage needs a deliberately slow, memory-hard, salted function such as Argon2id, whose cost parameters you tune so that one verification takes a noticeable fraction of a second.
What does a TLS certificate actually prove?
That a certificate authority checked control of the named domain and signed a statement binding that name to a public key. It proves you are talking to the holder of the private key for that name, and that nobody can read or alter the traffic in between. It says nothing about whether the operator is honest, competent or the company you think it is.
Do developers really need to care about ISO 27001?
Indirectly, but concretely. The standard requires an organisation to manage information security systematically, and its controls become the requirements that reach a team as change management, access review, logging, supplier assessment and secure development practice. Knowing where a requirement comes from makes it easier to satisfy sensibly rather than by producing paperwork.