Skip to content

feat(jose): add deriveKey and createDeriveKey functions for HKDF key derivation#15

Merged
halvaradop merged 3 commits intomasterfrom
feat/implement-hkdf
Nov 26, 2025
Merged

feat(jose): add deriveKey and createDeriveKey functions for HKDF key derivation#15
halvaradop merged 3 commits intomasterfrom
feat/implement-hkdf

Conversation

@halvaradop
Copy link
Copy Markdown
Member

Description

This pull request introduces the deriveKey and createDeriveKey functions, enabling HKDF-based key derivation for secret keys used in signing and encryption operations within the @aura-stack/jose package.

With this change, all cryptographic utilities exported by the package now accept derived keys, allowing users to provide any base secret from which a secure cryptographic key can be generated using HKDF.

Why HKDF?

HKDF (HMAC-based Key Derivation Function) enhances security by deriving strong, uniform, and application-specific keys from an initial secret. This approach provides an additional security layer by ensuring that:

  • The original secret is never used directly for signing or encryption.
  • Even if an attacker intercepts or obtains the base secret, the derived keys remain protected through HKDF’s one-way derivation.
  • Applications can safely generate multiple independent keys from a single secret.

Related RFCs

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Nov 26, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
auth Ready Ready Preview Comment Nov 26, 2025 2:26am

@halvaradop halvaradop merged commit cc42c83 into master Nov 26, 2025
2 checks passed
@halvaradop halvaradop deleted the feat/implement-hkdf branch November 26, 2025 02:27
@halvaradop halvaradop added enhancement New feature or request feature New functionality labels Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant