Hi Akil,

A few comments,

1. Technically, this is not an extension of PME (parquet modular
encryption), because the proposal is focused on encryption of individual
values, not modules.
Sounds like an idea for a different/orthogonal layer - maybe similar to a
masking (tokenization) layer that was discussed in the past. Still, the
reasons for using per-value encryption/tokenization within Parquet (and not
on top of Parquet) need to be explicitly stated.  This is also related
to Adam's
questions on access control.

2. I'm not sure if this level of pluggability (a* user can supply their own
encryption provider *, via an algorithm *EXTERNAL_PROTECT_V1*) is
compatible with a file format spec. Maybe this can be built as a layer
above Parquet.

3. Adding a non-modular algorithm to the list/union of modular algorithms
is confusing. The intention behind this list is a potential extensibility
to ciphers other than AEG GCM/CTR for encryption of full pages and
serialized thrift structures.

4. There are significant performance implications in encrypting individual
values instead of pages. The throughput drops by ~ two orders of magnitude
(no h/w acceleration and batching effect). The size swells too, because
encrypted values are difficult to compress.


Cheers, Gidon


On Thu, Nov 12, 2026 at 11:21 PM Adam Reeve <[email protected]> wrote:

> Hi Akil
>
> Thanks for sharing this proposal.
>
> > an authorization policy that decides what each reader
> > can see, not only whether it can get the key
>
> Could you explain more what you mean by this? This sounds like it could be
> solved by using more keys for more fine-grained access control. Or do you
> mean that the policy would also control visibility on a per-row basis?
>
> > The main
> > change is to decouple data processing from encryption: a user can
> > supply their own encryption provider, either in the application's own
> > process or as a call to a separate service
>
> Using envelope encryption (eg. implementing a KmsClient in C++ Arrow)
> already allows organizations to integrate their own encryption service. It
> sounds like the main motivation for this is really the per-value encryption
> and wanting control of the algorithm used for data, rather than integrating
> with an existing encryption provider?
>
> > The application gives Parquet the clear values. Parquet passes them to
> > the provider,
>
> How does this interact with encodings and compression? Parquet currently
> encodes and then compresses values before applying encryption. Would your
> individual-value encryption only work with plain encoding and uncompressed
> pages?
>
> Thanks,
> Adam
>
>
> On Fri, 13 Nov 2026 at 06:13, Akil Raza via dev <[email protected]>
> wrote:
>
> > Hi all,
> >
> > We would like to start a discussion on extending Parquet Modular
> > Encryption (PME) beyond the two AES algorithms it defines today, to
> > support encryption or tokenization of individual values and externally
> > supplied cryptography.
> >
> > Problem
> >
> > PME currently protects Parquet data and metadata using AES-GCM or
> > AES-GCM-CTR at the boundaries of Parquet encryption modules, including
> > data pages, page headers, column metadata and the footer. Decryption
> > depends on key availability: a reader with access to the required key
> > can decrypt the module, and a reader without the key cannot.
> >
> > We have additional requirements that the algorithms currently defined
> > by PME do not address:
> >
> > - Encryption or tokenization at individual-value granularity within a
> >   column.
> > - Support for a data-owner-provided or third-party encryption or
> >   tokenization implementation, including its own cryptographic
> >   algorithm and an authorization policy that decides what each reader
> >   can see, not only whether it can get the key.
> > - Support for algorithms that PME does not define today and that may
> >   be introduced independently in the future.
> >
> > Proposal
> >
> > We propose adding a new algorithm, EXTERNAL_PROTECT_V1. The main
> > change is to decouple data processing from encryption: a user can
> > supply their own encryption provider, either in the application's own
> > process or as a call to a separate service. The provider performs the
> > encryption or tokenization. The Parquet implementation does not load
> > the provider itself; the application creates it and passes it in.
> >
> > This is intended to support capabilities that the existing built-in
> > algorithms do not provide:
> >
> > - Individual-value encryption or tokenization, such as
> >   format-preserving encryption, rather than encryption only at the
> >   existing Parquet module boundaries.
> > - Externally controlled cryptography and authorization, where the work
> >   is done by an external system such as an HSM or another service. The
> >   provider can be invoked during reads and writes with the column
> >   identity and an application-defined context. The application-defined
> >   context allows additional policy checks to be added.
> > - Per-column algorithm selection, allowing AES-encrypted columns and
> >   externally encrypted or tokenized columns to coexist in the same
> >   file.
> >
> > Key custody, wrapping and rotation through a KMS are separate
> > capabilities that PME already supports for AES columns.
> >
> > Data flow
> >
> > The application gives Parquet the clear values. Parquet passes them to
> > the provider, which encrypts or tokenizes them, and Parquet writes the
> > resulting values to the file. Statistics are computed from the clear
> > values before the transformation and are stored in the column
> > metadata, which is encrypted with the column's key.
> >
> > Proposed format changes
> >
> > We propose adding one new struct and one new member to the
> > EncryptionAlgorithm union in parquet.thrift, together with an optional
> > per-column algorithm field in EncryptionWithColumnKey:
> >
> >     struct ExternalProtectV1 {
> >       1: optional binary aad_prefix
> >       2: optional binary aad_file_unique
> >       3: optional bool supply_aad_prefix
> >     }
> >
> >     union EncryptionAlgorithm {
> >       1: AesGcmV1 AES_GCM_V1
> >       2: AesGcmCtrV1 AES_GCM_CTR_V1
> >       3: ExternalProtectV1 EXTERNAL_PROTECT_V1
> >     }
> >
> >     struct EncryptionWithColumnKey {
> >       1: required list<string> path_in_schema
> >       2: optional binary key_metadata
> >       3: optional EncryptionAlgorithm encryption_algorithm
> >     }
> >
> > We would also document the semantics and interoperability
> > requirements in Encryption.md. Files that do not use the new algorithm
> > or the new per-column field are written exactly as they are today.
> >
> > Compatibility
> >
> > This is forward incompatible. An older reader does not understand
> > EXTERNAL_PROTECT_V1 and therefore cannot read a column encrypted or
> > tokenized with it. Columns that use the existing AES algorithms keep
> > the existing PME representation and are not affected by the format
> > change itself.
> >
> > Implementation status
> >
> > We have a working implementation in Arrow C++ covering:
> >
> > - Block encryption
> > - Individual-value encryption or tokenization
> > - Footer signing
> > - Per-column algorithm selection
> >
> > For parquet-java, we currently have a design but not yet an
> > implementation. We understand that a Parquet format change requires
> > interoperable implementations, including parquet-java, and we intend
> > to implement the parquet-java side as part of this work.
> >
> > Thanks,
> >
> > --
> > Akil Raza, Protegrity
> >
> >
>

Reply via email to