Imagine recording personal observations on your phone and seeing an application recognize a pattern in them. Perhaps it estimates when a recurring event might happen next. The result should be available without uploading your private history to a service that can read it, and ideally without requiring an internet connection at all.
This is the idea behind client-side data analysis: the application performs meaningful computations where its user’s data is already available, on an authorized device.
In end-to-end encrypted, local-first applications, this is more than a performance optimization. It follows from an architectural decision: the synchronization service does not possess the keys required to interpret private records. If an application needs to analyze those records, that work must take place somewhere authorized to read them.
But once multiple devices perform analyses independently, a new distributed-systems question appears: what happens when those devices calculate results from different versions of the same data?
What does client-side data analysis mean?
A personal application may use algorithms to identify repeated patterns, calculate statistics, interpret observations, generate summaries, or estimate future events. These operations transform data into information that is useful to the person using the application.
In a conventional cloud architecture, the application might upload its records to a backend. A server processes them, stores the resulting analysis, and sends the result back to the device. This model can be convenient when the backend already has access to the data.
Client-side analysis takes a different approach. The device performs the relevant calculations against information it can access locally. The user can obtain useful results without a separate analysis service reading their personal records.
This choice offers several benefits when it fits the application:
- Privacy: The analysis does not require transmitting private records as plaintext to a remote processing service.
- Responsiveness: Results can be calculated from locally available data without waiting for an additional network round trip.
- Offline availability: Existing records can remain analyzable even when the device cannot reach a server.
- Personal control: The analysis can operate within the same trust boundary as the data it interprets.
Running an algorithm on a device does not, by itself, guarantee privacy. The application must still protect its local database, its decryption keys, its outputs, and any information it transmits. Client-side analysis is most meaningful as part of a broader privacy architecture.
Client-Side Algorithms
Definition
Client-side algorithms are computational procedures executed within a user's application or device, allowing locally available information to be processed without requiring a remote server to perform the computation.
Also known as: On-device algorithms, Local algorithms
A client-side algorithm can be as simple as counting entries or as sophisticated as finding patterns across a long personal history. The defining feature is its execution location, not its mathematical complexity.
For example, an application might calculate the length of a recurring interval, detect a trend in locally recorded observations, or update a prediction when another entry is added. In each case, the device must be able to read the relevant inputs and execute the computation.
In a local-first application, those inputs usually come from a local data replica. The algorithm can work on that replica immediately. Later, when synchronization brings in additional information, it may need to process the updated data again.
The computational model therefore has two separate concerns: running the algorithm correctly on one device, and keeping its conclusions meaningful across changing replicas.
Why does end-to-end encryption change where computation happens?
Ordinary server-side analytics depends on the server being able to interpret the information being analyzed. It may need to inspect fields, compare dates, count records, or recognize relationships between entries.
A zero-access architecture deliberately removes that capability from the synchronization service. The server may store and relay encrypted information, but it cannot reconstruct the private plaintext from the data and keys available to it.
In a zero-access service, protected records are encrypted before transmission. Because the provider does not have the necessary decryption keys, ordinary server-side analytics cannot operate on the private plaintext.
A server in this position cannot perform ordinary field-by-field analysis over private records it cannot decrypt. The underlying plaintext is unavailable to it.
End-to-end encryption does not universally require offline-first software or a fully distributed user interface. However, combining zero-access encryption with independently usable local replicas naturally places content-aware computation on those replicas, rather than on a centralized server.
Can algorithms operate on encrypted data?
Yes, in some circumstances. Privacy-enhancing cryptography includes methods designed for computation without giving the computing party ordinary plaintext access.
Homomorphic encryption is one prominent example. Depending on the scheme, it can enable selected mathematical operations or even general computation on specially encrypted data. Other approaches, such as secure multi-party computation, distribute parts of a computation across multiple parties under different assumptions.
These techniques are important, but they should not be confused with the encryption ordinarily used to protect application data at rest or in transit.
For example, encryption using a conventional authenticated symmetric cipher such as XChaCha20-Poly1305 protects a message’s confidentiality and integrity. A server cannot simply run an arbitrary application algorithm over the resulting ciphertext and obtain a meaningful encrypted version of the correct answer. That is not a feature of this encryption scheme.
Encrypted-computation techniques require different constructions, often with significant computational, storage, or operational trade-offs. They do not necessarily weaken cryptographic security; rather, they provide different capabilities under different security assumptions. Whether they are suitable depends on the function, the data model, and the system’s requirements.
For a technical overview of the first approach, see our Client-Side Encryption reference. For encrypted computation, NIST maintains an overview of Fully Homomorphic Encryption, including its capabilities and ongoing development.
A practical example: personal cycle analysis
Consider a personal application in which a user records observations over time. Those records might include cycle start dates, symptoms, and other personal entries. An analysis algorithm can use the recorded history to recognize recurring patterns and estimate when a future cycle event may occur.
Such an analysis is useful precisely because it considers relationships across many observations. That also makes it privacy-sensitive. A calculated prediction can reveal information that was not explicitly present in any one entry.
In a client-side model, the process can remain within an authorized device:
- Record observations locally. New entries are saved in the app’s protected local data store.
- Evaluate the available history. The algorithm processes the entries that this replica currently contains.
- Produce an estimate. The application derives a pattern or prediction from those inputs.
- Reevaluate when inputs change. New, corrected, or synchronized entries can change the calculated result.
Cycle analysis is an example of an algorithm that can be valuable without being delegated to a server with access to a user’s private records. A prediction is an estimate based on available observations, not a medical certainty or a diagnosis.
Derived Data
Definition
Derived data is information calculated or inferred from other data, such as a summary, classification, detected pattern, or prediction based on recorded observations.
Also known as: Derived information, Computed results
The result of an analysis is itself data. It might be an average, a detected pattern, a classification, or a prediction. Although it was calculated rather than directly entered by the user, it may be just as personal as the original records.
For example, a set of individual dates may not directly state a predicted future event. An analysis of those dates can produce such an estimate. The prediction is derived data, and protecting the input records while exposing that prediction would undermine part of their privacy.
This is why a complete privacy model must account for both raw observations and the information inferred from them. Derived results may need the same protections when stored, displayed, shared, or synchronized.
The actual cycle-analysis algorithm, its statistical methods, and its internal decision rules are separate implementation details. They are not required to understand the architectural principle: sensitive insights can be computed where sensitive records are already securely accessible.
What changes when multiple replicas analyze the same data?
An application running on several devices is no longer performing a single centralized computation over one universally current database. Each authorized device may have an independently updated replica of the user’s information.
Suppose a user records several observations on a phone while offline. The phone can analyze this newer history immediately. A tablet that has not synchronized yet can still analyze its own older history, but its prediction may differ.
Neither device necessarily contains an error. They are asking the same algorithm to evaluate different available inputs. Once the missing entries arrive, the tablet’s analysis may change.
The same challenge appears after a user corrects a historical entry, removes an observation, or receives a newly shared update. In each case, a previously valid result may be outdated even if it was calculated correctly at the time.
This is closely related to eventual consistency and concurrent updates, but there is an additional layer: the application must account not only for changes in the underlying records, but also for the results calculated from them.
Analysis Result Convergence
Definition
Analysis result convergence is the process or property by which independently computed results become consistent as replicas obtain equivalent relevant inputs and apply compatible computation rules, including the necessary updating or replacement of stale results.
Also known as: Convergence of derived results, Derived-result convergence
Two devices can eventually agree on their replicated user data while still displaying different analysis results if one device has not refreshed its calculation, uses different algorithm rules, or evaluates a time-dependent input differently.
To obtain consistent results, a design must consider what constitutes equivalent inputs, which calculation rules apply, and how previously computed outputs are updated or replaced. Deterministic computation on equivalent inputs can make this easier, but it cannot compensate for missing observations or incompatible algorithm versions.
Why distributed analysis introduces consistency questions
A private application may compute information from records that are locally available on a device. If two devices have not received the same updates, their inputs can differ, and so can any conclusions based on those inputs. Even after the source data catches up, previously calculated results may need attention.
There is no single universal solution to this problem. Freshness, reproducibility, device capabilities, and the distinction between source records and derived outputs all matter. Which information should be recalculated, retained, or exchanged is an application-specific design decision.
The general principle is that synchronizing underlying data and maintaining correct derived information are related but different challenges.
Client-side data analysis and Nyskra
Nyskra develops personal applications with client-side encryption and a zero-access architecture. This means our infrastructure does not need to decrypt private personal records in order to support encrypted synchronization.
On-device processing can enable useful, personalized features while reducing the need to disclose sensitive information to a service provider. Different applications may make different choices about computation and derived information depending on their use cases.
Privacy can be part of how a feature works, rather than merely a promise about what happens to its inputs later. For general background, see Distributed Systems and End-to-End Encryption. For the regulatory perspective, see the EDPB Guidelines 4/2019 on data protection by design and by default.
Further reading
Our Local-First Software reference explains why an independently usable local data replica changes how an application behaves. Data Synchronization covers offline changes and the challenges of reconciling multiple devices, while Conflict-Free Replicated Data Types (CRDTs) explains how certain replicated structures converge.
For the broader system model, see Distributed Systems, Convergence, and Zero-Access Architecture. Our engineering article Beyond Offline: Building Local-First Apps places these ideas in the context of practical application design.
For research background, see Kleppmann et al., Local-first software: You own your data, in spite of the cloud (2019), and NIST’s Privacy-Enhancing Cryptography overview.