Nyskra Knowledge / Encryption

Encryption

Encryption protects information with powerful cryptographic methods. Discover how it works, its main types, and what makes that protection effective in practice.

Definition

Encryption transforms readable data (plaintext) into ciphertext using a cryptographic algorithm and key, making recovery of the original data without an appropriate decryption key computationally impractical.

Also known as: Data encryption

On this page

Encryption helps protect everything from personal notes to messages, backups, and online accounts. If someone copies encrypted data without the necessary key, they should not be able to recover its contents in practice.

But the word encrypted does not answer every privacy question. How information is encrypted, who holds the keys, and where it is decrypted can make very different levels of protection possible.

How does encryption work?

Encryption involves three essential elements:

  1. Plaintext: The original information, such as a message, photograph, or database record.
  2. An algorithm and a key: A cryptographic algorithm transforms that information using key material. The key determines who can reverse the transformation.
  3. Ciphertext: The encrypted result, which should reveal no useful plaintext information to someone without the appropriate key.

An authorized recipient uses the corresponding decryption key to recover the plaintext. Depending on the encryption method, the encryption and decryption keys may be the same secret or different, mathematically related keys.

A strong encryption algorithm does not rely on keeping the algorithm itself secret. Its protection relies on the security of the cryptographic design, correct implementation, and the secrecy of the keys that must remain private. A weak password, stolen key, or compromised device can undermine an otherwise strong encryption system.

The crucial role of encryption keys

Key vs Password

A cryptographic key is not necessarily a password. Cryptographic keys are often generated from secure randomness, while passwords, on the other hand, can be sometimes be used to unlock or derive encryption keys.

How these processes work is important: a guessable password does not become strong simply because it is used with a modern encryption algorithm.

Who holds the keys?

The most important practical question is who can obtain the key needed to decrypt the data. A provider might encrypt its database while retaining keys that let its own servers decrypt every record. Another system might ensure that those keys are controlled only by the intended users.

Both use encryption, but they do not offer the same protection against a compromised server or a service provider accessing stored information.

Symmetric and asymmetric encryption

These are two major approaches to managing the keys involved in encryption. Many real systems combine them rather than choosing just one.

Symmetric Encryption

Definition

Symmetric encryption uses a shared secret key to encrypt and decrypt information. Anyone who obtains that key can potentially decrypt data protected by it.

Also known as: Secret-key encryption

Symmetric encryption is widely used to protect the actual contents of files, messages, and stored records. It is efficient and well suited to large amounts of data.

The challenge is key distribution. If two devices need to decrypt the same information, both need access to the appropriate secret. If several people share encrypted information, the system needs a secure way to distribute and manage access to that secret, without exposing it to unintended recipients.

Protecting the key is therefore as important as protecting the ciphertext.

Asymmetric Encryption

Definition

Asymmetric encryption uses a public key to encrypt information and a corresponding private key to decrypt it, so senders do not first need to share a secret encryption key with the recipient.

Also known as: Public-key encryption

Public-key encryption addresses a different problem. A recipient can publish an encryption key without revealing the private key needed to decrypt data prepared for it.

This helps systems establish secure communication even when participants have not exchanged a shared secret beforehand. It does not eliminate the need to verify that a public key really belongs to the intended recipient. An attacker who can substitute their own public key may trick someone into encrypting new information for the wrong person.

Public-key cryptography also supports other operations, including digital signatures and key establishment. In many applications, public-key techniques are used to establish or protect a symmetric key, while symmetric encryption handles the actual data.

Encryption in transit and at rest

The same information can be encrypted at multiple stages of its journey. Two common descriptions focus on where the protection is applied.

Encryption in Transit

Definition

Encryption in transit protects information while it moves between systems over a network, but does not by itself prevent the communicating endpoints from reading it.

Also known as: Transport encryption, Data-in-transit encryption

When you connect to a website using HTTPS, Transport Layer Security (TLS) normally encrypts the connection between your browser and the server. This protects information against eavesdropping on that connection and, with proper authentication, helps detect interference with the communication.

However, the website’s server is one endpoint of that TLS connection. It can ordinarily access the plaintext sent through the connection. Transport encryption alone therefore says nothing about whether the service can read your stored personal data.

Encryption at Rest

Definition

Encryption at rest protects data while it is stored, for example on a disk, in a database, or in a backup. Whether a service can read that data depends on who controls the decryption keys.

Also known as: Stored-data encryption

Encryption at rest is commonly applied to devices, disks, databases, and backups. For example, an encrypted disk can protect stored files if the disk is removed or a powered-off device is stolen, provided the decryption keys are not also available to the attacker.

The protection can be much more limited against an attacker who compromises a running server that already has access to its decryption keys. In that situation, encrypted storage may be transparently decrypted as the server reads it.

At-rest encryption describes the state of stored information. It does not, on its own, tell you whether the application provider has access to the underlying content.

Protecting data against tampering

Keeping information secret is only part of the problem. Attackers may also attempt to alter encrypted data, replace records, or change information about what a ciphertext belongs to.

Authenticated Encryption

Definition

Authenticated encryption protects encrypted data against both unauthorized disclosure and undetected modification, allowing a recipient with the correct key to detect tampering.

Modern systems frequently use authenticated encryption to detect unauthorized changes to ciphertext. If the ciphertext or its protected context has been modified, decryption fails its authentication check instead of silently accepting altered content.

A common approach is authenticated encryption with associated data (AEAD). It can authenticate additional information, such as an identifier or record header, without requiring that information to be encrypted. Associated data is protected against undetected modification, but it remains visible unless separately encrypted.

Authentication by a shared symmetric key demonstrates that the protected content was produced by someone holding that key. It does not necessarily identify which person in a group created it. That requires additional mechanisms when individual attribution matters.

What makes encryption effective in practice

Modern encryption can provide exceptionally strong protection. Preserving that protection in a real application also means securing the keys, the devices that use them, and the wider system:

  • Compromised endpoints: Malware or someone with access to an unlocked device may read data after it has been decrypted.
  • Compromised keys: Anyone who obtains a usable decryption key may be able to read the ciphertext protected by it.
  • Visible metadata: Encryption does not automatically hide who communicated, when, how often, or the sizes of encrypted messages.
  • Availability: Encryption does not prevent information from being deleted, corrupted, or made unavailable. Reliable recovery and backups address different risks.
  • Access permissions: A service must still decide who is authorized to receive keys or access data. Encryption alone is not a complete access-control system.

This is why phrases such as encrypted storage, end-to-end encryption, and client-side encryption should not be treated as interchangeable. They describe different properties of a system.

What should you ask about an encrypted service?

When evaluating the privacy of a personal app or online service, a few questions are more useful than the word encrypted on its own:

  1. Where is my data encrypted and decrypted? On my device, on the provider’s servers, or both?
  2. Who controls the decryption keys? Can the provider obtain them, including during account recovery or sharing?
  3. What happens if a server is compromised? Can the attacker obtain plaintext, keys, or only encrypted records?
  4. What remains visible? Which metadata can the provider or other parties still observe?
  5. How are keys protected over time? What happens when a device is lost, a member leaves a shared group, or a key needs to be replaced?

The answers depend on the entire system architecture, not just the encryption algorithm.

Encryption and Nyskra

Nyskra’s Nyskra Zero architecture is built around client-side encryption and user-controlled access to decryption keys. This applies to personal information that is kept locally, synchronized between authorized devices, or selectively shared. Our infrastructure can transmit and retain ciphertext without holding the secrets required to read the private content.

Nyskra protects all synchronized and selectively shared personal-data payloads with XChaCha20-Poly1305, an authenticated encryption with associated data (AEAD) algorithm using a 256-bit key. It encrypts the content and allows authorized clients to detect tampering. Its extended nonce is designed to make nonce reuse less likely. Separately, locally stored application databases are protected using 256-bit ChaCha20-Poly1305 authenticated encryption.

Encryption is only part of the story. Nyskra uses cryptographically authenticated identities, protected key handling, and X-Wing hybrid key establishment (X25519 and ML-KEM-768) to address different security requirements. See Key Establishment and Post-Quantum Cryptography for the differences between data encryption, recipient authentication, and protection against future passive quantum attacks.

Encryption protects the private meaning of the data, not every trace of its use. Authorized endpoints can still see decrypted content; malware on an unlocked device is a different threat; and ciphertext length, traffic timing, or delivery information may remain observable. Metadata and Privacy covers those limits.

Technical references