Skip to content

Conversation

yigityazicilar
Copy link
Contributor

Extract crypto helpers into shared ObliviousXHelpers library

Motivation:

This change extracts shared cryptographic helper functions from ObliviousX into a separate ObliviousXHelpers library to prepare for implementing Oblivious DNS over HTTPS (ODoH) support, which will require the same cryptographic primitives.

Modifications:

  • Created new ObliviousXHelpers target with HPKE extensions and utility functions
  • Moved Data/Collection extensions for byte manipulation to shared library
  • Moved cryptographic utilities (I2OSP, random byte generation) to shared library
  • Updated ObliviousX to import and use ObliviousXHelpers
  • Made all helper functions package-accessible for reuse

Result:

After this change, cryptographic helpers are available as a shared library for both existing ObliviousX and upcoming ODoH implementations, eliminating code duplication.

Copy link
Contributor

@glbrntt glbrntt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo CI failures

@glbrntt glbrntt added the 🔨 semver/patch No public API change. label Aug 21, 2025
@yigityazicilar yigityazicilar requested a review from glbrntt August 21, 2025 14:22
@glbrntt glbrntt enabled auto-merge (squash) August 21, 2025 16:15
@glbrntt glbrntt merged commit 28b0474 into apple:main Aug 22, 2025
62 of 67 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants