SecurityMidMCQ

Which four primitives does Themis provide, and what is each one for?

Test your knowledge:

Explanation & Code

Answer: Themis exposes Secure Cell for encrypting data at rest, Secure Message for encrypting or signing individual payloads between two parties, Secure Session for an encrypted stateful channel over an untrusted transport, and Secure Comparator for proving two sides share a secret without revealing it.

PrimitiveObjective-C/Swift classProblem it solves
Secure CellTSCellSeal, TSCellToken, TSCellContextImprintData at rest — local database, cached files, Keychain blobs
Secure MessageTSMessageOne-shot encrypt or sign of a discrete payload
Secure SessionTSSessionLong-lived encrypted channel with forward secrecy
Secure ComparatorTSComparatorZero-knowledge proof of a shared secret

Picking the wrong one is the most common integration mistake: Secure Session for a stateless REST API adds a handshake you cannot maintain, and Secure Cell for client-server traffic gives you a symmetric key that both ends must already share.

Key Points:

  • Secure Cell is symmetric; Secure Message and Secure Session are asymmetric.
  • Secure Message is stateless — ideal for request/response APIs.
  • Secure Session is stateful and needs a persistent connection.

Rate your understanding:

Ready to practice more Security?

Test yourself with our interactive quiz mode or browse all curated questions for this topic.