mirror of
https://github.com/apple/swift-crypto
synced 2026-11-27 04:54:21 +00:00
## Motivation CryptoKit is adding API for SHA-3, which BoringSSL does not support. To maintain API parity, we need to provide a backing implementation. For this, we can use XKCP[^1], which provides the reference implementation, as well as several optimized solutions, suitable for vendoring into other projects. ## Modifications The following changes have been made in separate commits to help with the review: - Add vendor-xkcp.sh script - Revendor xkcp#master (heads/master-0-g11297f5) - Add CXCKP target with modulemap and umbrella header - Add CXKCPTests test target with simple test vectors - Add CXKCPShims with function wrappers for macros to call from Swift - Remove #if false guard from HashFunctions_SHA3.swift - Add SHA-3 implementation backed by libXKCP - Add new DigestImplSHA3 platform-specific type alias - Remove #if false from DigestsTests.swift to get SHA-3 tests ## Result Swift Crypto provides functioning SHA-3 API. ## Notes This PR is for the `wwdc-25` side branch. [^1]: https://github.com/XKCP/XKCP
61 lines
2.4 KiB
YAML
61 lines
2.4 KiB
YAML
name: PR
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, reopened, synchronize]
|
|
|
|
jobs:
|
|
soundness:
|
|
name: Soundness
|
|
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
|
|
with:
|
|
license_header_check_project_name: "SwiftCrypto"
|
|
docs_check_enabled: false
|
|
|
|
unit-tests:
|
|
name: Unit tests
|
|
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
|
|
with:
|
|
linux_5_10_arguments_override: "--explicit-target-dependency-import-check error"
|
|
linux_6_0_arguments_override: "--explicit-target-dependency-import-check error"
|
|
linux_6_1_arguments_override: "--explicit-target-dependency-import-check error"
|
|
linux_nightly_next_arguments_override: "--explicit-target-dependency-import-check error"
|
|
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error"
|
|
windows_6_0_enabled: true
|
|
windows_6_1_enabled: true
|
|
windows_nightly_next_enabled: true
|
|
windows_nightly_main_enabled: true
|
|
windows_6_0_arguments_override: "--explicit-target-dependency-import-check error"
|
|
windows_6_1_arguments_override: "--explicit-target-dependency-import-check error"
|
|
windows_nightly_next_arguments_override: "--explicit-target-dependency-import-check error"
|
|
windows_nightly_main_arguments_override: "--explicit-target-dependency-import-check error"
|
|
|
|
cxx-interop:
|
|
name: Cxx interop
|
|
uses: apple/swift-nio/.github/workflows/cxx_interop.yml@main
|
|
|
|
cmake-checks:
|
|
name: CMake checks
|
|
uses: apple/swift-nio/.github/workflows/cmake_tests.yml@main
|
|
with:
|
|
update_cmake_lists_config: >-
|
|
{
|
|
"targets": [
|
|
{ "name": "CCryptoBoringSSL", "type": "source", "exceptions": [] },
|
|
{ "name": "CCryptoBoringSSLShims", "type": "source", "exceptions": [] },
|
|
{ "name": "CryptoBoringWrapper", "type": "source", "exceptions": [] },
|
|
{ "name": "CXKCP", "type": "source", "exceptions": [] },
|
|
{ "name": "CXKCPShims", "type": "source", "exceptions": [] },
|
|
{ "name": "Crypto", "type": "source", "exceptions": [] },
|
|
{ "name": "_CryptoExtras", "type": "source", "exceptions": [] },
|
|
{ "name": "CCryptoBoringSSL", "type": "assembly", "exceptions": [ "*/AES/*.swift" ] }
|
|
]
|
|
}
|
|
|
|
macos-tests:
|
|
name: macOS tests
|
|
uses: apple/swift-nio/.github/workflows/macos_tests.yml@main
|
|
with:
|
|
runner_pool: general
|
|
build_scheme: swift-crypto-Package
|