Skip to content

feat: add EC key wrapping support for TDF3 Archive format#36

Merged
arkavo-com merged 1 commit intomainfrom
feature/ec-support-tdf3
Jan 18, 2026
Merged

feat: add EC key wrapping support for TDF3 Archive format#36
arkavo-com merged 1 commit intomainfrom
feature/ec-support-tdf3

Conversation

@arkavo-com
Copy link
Contributor

Summary

  • Add ecWrapped case to AccessType enum in TDFManifest.swift
  • Implement wrapSymmetricKeyWithEC() using ECIES (ECDH + HKDF + AES-GCM)
  • Add unwrapSymmetricKeyWithEC() for decryption
  • Support P-256, P-384, and P-521 curves
  • Add TDFECCurve enum and ECWrappedKeyResult struct
  • Update KASRewrapClient with RewrapAlgorithm enum for automatic algorithm detection

This enables full EC support for TDF3 Archive format, complementing the existing NanoTDF EC support.

Test plan

  • All existing tests pass (180 tests executed)
  • Build succeeds with no errors
  • Manual testing with EC-wrapped TDF files
  • Cross-SDK compatibility testing with opentdf-rs

🤖 Generated with Claude Code

@arkavo-com arkavo-com force-pushed the feature/ec-support-tdf3 branch 2 times, most recently from 0005878 to 88add42 Compare January 17, 2026 23:51
- Add ecWrapped case to AccessType enum in TDFManifest.swift
- Implement wrapSymmetricKeyWithEC() using ECIES (ECDH + HKDF + AES-GCM)
- Add unwrapSymmetricKeyWithEC() for decryption
- Support P-256, P-384, and P-521 curves
- Add TDFECCurve enum and ECWrappedKeyResult struct
- Add EC public key loading functions for all curves
- Update KASRewrapClient with RewrapAlgorithm enum for automatic
  algorithm detection based on key access type
- Add new error cases for EC operations

This enables full EC support for TDF3 Archive format, complementing
the existing NanoTDF EC support.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@arkavo-com arkavo-com force-pushed the feature/ec-support-tdf3 branch from 88add42 to d7d8387 Compare January 17, 2026 23:56
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
24.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@arkavo-com arkavo-com merged commit bff3265 into main Jan 18, 2026
6 of 7 checks passed
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.

1 participant