Skip to content

MONGOCRYPT-917 fix padding calculation for prefix/suffix#1177

Merged
kevinAlbs merged 7 commits into
mongodb:masterfrom
kevinAlbs:padding.2
May 26, 2026
Merged

MONGOCRYPT-917 fix padding calculation for prefix/suffix#1177
kevinAlbs merged 7 commits into
mongodb:masterfrom
kevinAlbs:padding.2

Conversation

@kevinAlbs

@kevinAlbs kevinAlbs commented May 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fix padding calculation when generating affixes for FLE2InsertUpdatePayloadV2.

Background & Motivation

Intended to ensure the count of prefix or suffix tokens ("b.p" / "b.u") increase along with the length of encrypted value ("v"). See report in MONGOCRYPT-913 for details.

Testing

Assertions are added to test_ciphertext_len_steps_fle2_text_search to count of suffix tokens. This serves as a regression test, and seemed simpler than the test in the report's Appendix B.

To additionally verify changes, the QE Text driver spec and prose tests were run locally with the C driver.

@kevinAlbs kevinAlbs changed the title MONGOCRYPT-XXX fix padding calculation for prefix/suffix MONGOCRYPT-917 fix padding calculation for prefix/suffix May 21, 2026
@kevinAlbs
kevinAlbs requested a review from erwee May 21, 2026 17:46
@kevinAlbs
kevinAlbs marked this pull request as ready for review May 21, 2026 17:46
@kevinAlbs
kevinAlbs requested a review from a team as a code owner May 21, 2026 17:46
@kevinAlbs
kevinAlbs requested review from connorsmacd and mdb-ad and removed request for connorsmacd May 21, 2026 17:46
Comment thread src/mc-text-search-str-encode.c
Comment thread test/test-mc-text-search-str-encode.c
Comment thread test/test-mc-text-search-str-encode.c
Comment thread test/test-mc-text-search-str-encode.c Outdated
@kevinAlbs
kevinAlbs requested a review from erwee May 22, 2026 20:15
@kevinAlbs
kevinAlbs requested review from rcsanchez97 and removed request for mdb-ad May 22, 2026 20:31
@kevinAlbs
kevinAlbs merged commit a58eb6f into mongodb:master May 26, 2026
54 checks passed
mdb-ad pushed a commit to mdb-ad/libmongocrypt that referenced this pull request Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants