Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrapper: Move EC types and random bytes into CryptoBoringWrapper #277

Conversation

simonjbeaumont
Copy link
Contributor

@simonjbeaumont simonjbeaumont commented Oct 15, 2024

Motivation

The Crypto module contains some EC types used to implement the CryptoKit API on non-Darwin platforms, which we'd like to make available to functionality in _CryptoExtras on all platforms.

Modifications

In a similar manner to how we handled ArbitraryPrecisionInteger, this PR moves the EC types, which were internal to the Crypto module, to the CryptoBoringWrapper module, and makes them package visible.

This patch only exposes the functionality that's actually used by the Crypto module as package-visible, and leaves everything else internal (now internal to the CryptoBoringWrapper module).

As part of the move, the _boring suffix has been removed, since that is implied by their presence in this module. This PR also retroactively removes that suffix from the other files that migrated over recently but erroneously retained their suffix.

Finally, we remove some redundant compilation guards on the tests for files that were previously moved into CryptoBoringWrapper since they are intended to run on all platforms now.

Result

This should have no external impact and is purely a refactor.

@simonjbeaumont
Copy link
Contributor Author

@Lukasa PTAL 🙏

@simonjbeaumont simonjbeaumont force-pushed the sb/move-ec-types-and-random-bytes-to-boring-wrapper branch from cb63b60 to 21de58f Compare October 16, 2024 18:54
@simonjbeaumont simonjbeaumont force-pushed the sb/move-ec-types-and-random-bytes-to-boring-wrapper branch from 1556601 to 033aa04 Compare October 16, 2024 19:05
@Lukasa Lukasa added the 🔨 semver/patch No public API change. label Oct 17, 2024
Copy link
Contributor

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

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

Thanks Si.

@Lukasa Lukasa merged commit f98e46e into apple:main Oct 17, 2024
25 of 35 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