Skip to content

xwing hpke poc - #82

Closed
rohans2278 wants to merge 12 commits into
kolide:mainfrom
rohans2278:xwing-hpke-poc
Closed

rohans2278 wants to merge 12 commits into
kolide:mainfrom
rohans2278:xwing-hpke-poc

Conversation

@rohans2278

@rohans2278 rohans2278 commented Oct 29, 2026 •

Copy link
Copy Markdown

Description
Adds Hybrid Public Key Encryption (HPKE) using X-Wing for Kolide Agent/Service messaging (currently using crypto_box/libsodium) to provide post-quantum security. Existing crypto_box code is unchanged.

How it works

  1. K2 generates an X-Wing key pair and sends the public key with the signed challenge.
  2. The Agent uses that public key to encrypt its response using HPKE.
  3. K2 decrypts the response with its X-Wing private key, then checks the ECDSA signatures as before.

Libraries

  • Agent: Go's standard library (crypto/hpke)
  • K2: op-crypto-internal-hpke (exposed to Ruby as a gem)

Testing

  • Go and Ruby unit tests: cover each side on its own, mirroring the existing crypto_box tests.
  • Cross-language tests: run full round trips between Ruby and Go in both directions, including tampered messages and wrong keys.

Requires Ruby 3.2+, Rust, libsodium, and git access to agilebits-inc/crypto.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@rohans2278 rohans2278 closed this Nov 3, 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.

2 participants