Encrypted Maximum

L4 · Application Components
max-element · 2 specifications · 1 implementation · 1 benchmark
WHAT IT ISCompute the maximum of a collection of encrypted values without revealing the individual inputs. The plaintext type, size, scheme and exactness are fixed by individual specifications.
FHECOMPARISONBGVCHALLENGE
SIGNATURE
kernel max_element<type T: Numeric, N: u32>(
%xs: secret<tensor<N x T>>,
) -> %m: secret<T>
Sizes and element types are left open here. A specification fixes them; an implementation says over which of them it works.
SPECIFICATIONS2all publishedIMPLEMENTATIONS11 measured
BENCHMARKS1across 1 machine
FASTEST3.02 minN512 on fherma-general-purpose
CHALLENGES1open
DESCRIPTION

Definition

Encrypted maximum computes the maximum value in a collection of encrypted elements without revealing the individual inputs.

Given encrypted values

x=(x0,x1,,xN1),x = (x_0, x_1, \ldots, x_{N-1}),

the result is an encrypted value

m=max0i<Nxi.m = \max_{0 \le i < N} x_i.

The maximum is an order-based selection: it depends only on the total ordering of the plaintext values, not on any arithmetic identity, so an implementation must realise comparison and selection homomorphically over the encrypted data.

Semantics

The operation is defined over encrypted data and preserves the confidentiality of the input values during computation.

After decryption, the output represents the maximum of the plaintext values encoded by the encrypted inputs. When the maximum value occurs more than once the returned value is unchanged; the kernel returns the value, not an index.

The kernel does not fix the plaintext type, collection size, cryptographic scheme, ciphertext representation, or exactness requirements. These are defined by individual specifications.

Parameters Defined by Specifications

A specification narrows the general encrypted-maximum operation into a concrete computational problem by defining, for example:

  • the plaintext element domain and its ordering;
  • the number of elements N;
  • the input and output types;
  • the encryption or execution context (scheme and parameters);
  • the ciphertext representation;
  • exact or approximate output semantics;
  • any additional constraints required by the computation.

Applications

Encrypted maximum is a basic comparison and selection primitive in privacy-preserving analytics and machine learning. It underlies encrypted argmax, ranking, thresholding, sorting, top-k selection, pooling layers in private inference, and confidential reporting of extreme values.

MAINTAINER
FM
fairmathreviews specifications · resolves disputes
USED BY · 0 KERNELS
Kernels above this one. If this kernel is wrong, or slow, they are wrong or slow with it.Nothing depends on this kernel yet.
BUILDS ON · 0 KERNELS
Kernels this one is stated in terms of. Not a call graph — a statement of dependence between problems.Nothing. This kernel sits at the bottom of the graph.
RECENT ACTIVITYNothing yet.