Skip to content

Use encodingEntrySize for IndexPir#267

Merged
fboemer merged 3 commits intomainfrom
fboemer/encoding-entry-size
Jan 21, 2026
Merged

Use encodingEntrySize for IndexPir#267
fboemer merged 3 commits intomainfrom
fboemer/encoding-entry-size

Conversation

@fboemer
Copy link
Contributor

@fboemer fboemer commented Jan 16, 2026

Use encodingEntrySize for IndexPir.

We add encodingEntrySize to PirParameters which, when enabled, will prepend each IndexPir entry with a VarInt encoding.
This is useful to support IndexPir with varying entry sizes (unlike in KeywordPIR, where we just 0-pad to make all the entry sizes match).

2 breaking changes detected in PrivateInformationRetrieval:
  💔 API breakage: constructor IndexPirConfig.init(entryCount:entrySizeInBytes:dimensionCount:batchSize:unevenDimensions:keyCompression:) has been removed
  💔 API breakage: constructor IndexPirParameter.init(entryCount:entrySizeInBytes:dimensions:batchSize:evaluationKeyConfig:) has been removed

2 breaking changes detected in ApplicationProtobuf:
  💔 API breakage: func Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRShardConfig.native(batchSize:evaluationKeyConfig:) has parameter 1 type change from HomomorphicEncryption.EvaluationKeyConfig to Swift.Bool
  💔 API breakage: func Apple_SwiftHomomorphicEncryption_Api_Pir_V1_PIRShardConfig.native(batchSize:evaluationKeyConfig:) has been renamed to func native(batchSize:encodingEntrySize:evaluationKeyConfig:)

1 breaking change detected in _TestUtilities:
  💔 API breakage: func PirTestUtils.getTestParameter(pir:with:entryCount:entrySizeInBytes:keyCompression:batchSize:) has been renamed to func getTestParameter(pir:with:entryCount:entrySizeInBytes:keyCompression:batchSize:encodingEntrySize:)

@fboemer fboemer force-pushed the fboemer/encoding-entry-size branch from 31b8519 to 83a9acc Compare January 16, 2026 23:40
@fboemer fboemer marked this pull request as ready for review January 17, 2026 00:21
@fboemer fboemer force-pushed the fboemer/encoding-entry-size branch from 7801982 to 5820132 Compare January 21, 2026 22:20
@fboemer fboemer merged commit 0366a89 into main Jan 21, 2026
17 of 18 checks passed
@fboemer fboemer deleted the fboemer/encoding-entry-size branch January 21, 2026 23:10
feimaomiao pushed a commit to feimaomiao/swift-homomorphic-encryption that referenced this pull request Jan 22, 2026
* Use encodingEntrySize for IndexPir
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.

2 participants