Skip to content

Conversation

@simonjbeaumont
Copy link
Contributor

Motivation

The ARC IETF draft has been updated to now support P256 and drop support for P384.

Modifications

  • Update the internal ARC implementation to accommodate multiple curves
  • Add API surface for P256
  • Deprecate API for P384
  • Add tests for P256 with test vectors from the draft
  • Move over the end-to-end API tests to P256
  • Add benchmarks for P256

Result

  • New API P256._ARCV1, which provides an implementation of ARC(P-256).
  • Deprecate P384._ARCV1, which provides an implementation of ARC(P-256).

@simonjbeaumont simonjbeaumont added the 🆕 semver/minor Adds new public API. label Jul 1, 2025
@simonjbeaumont simonjbeaumont marked this pull request as ready for review July 1, 2025 16:00
@simonjbeaumont simonjbeaumont requested a review from Lukasa July 1, 2025 16:00
@simonjbeaumont
Copy link
Contributor Author

@Lukasa OK, CI is happy with this one now.


// MARK: - P384 + ARC(P-384)
@available(iOS 16.0, macOS 13.0, watchOS 9.0, tvOS 16.0, macCatalyst 16.0, visionOS 2.0, *)
@available(*, deprecated, message: "ARC(P-384) has been removed from the IETF draft; use ARC(P-256) instead.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Does placing the deprecation here work, or does it need to go on the inner enum?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems to be. If I add this to a test file:

func f() {
    let _ = P384._ARCV1 // warning: '_ARCV1' is deprecated: ARC(P-384) has been removed from the IETF draft; use ARC(P-256) instead.
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Great.

@Lukasa Lukasa enabled auto-merge (squash) July 2, 2025 20:23
@Lukasa Lukasa merged commit 93a2ebf into apple:main Jul 2, 2025
30 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🆕 semver/minor Adds new public API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants