Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ jobs:
{ "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": "CryptoExtras", "type": "source", "exceptions": [] },
{ "name": "CCryptoBoringSSL", "type": "assembly", "exceptions": [ "*/AES/*.swift" ] }
]
}
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.DS_Store
/.build
.build
/out
/Packages
/*.xcodeproj
Expand All @@ -12,6 +12,7 @@ Package.resolved
DerivedData
.swiftpm
**/gyb.pyc
scripts/__pycache__/

.*.sw[nop]

Expand Down
1 change: 1 addition & 0 deletions .licenseignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ dev/update-benchmark-thresholds
**/*.der
.swiftformat
Sources/CCryptoBoringSSL/*
Sources/CXKCP/*
**/*.swift.gyb
scripts/*.patch
scripts/gyb
Expand Down
2 changes: 1 addition & 1 deletion .spi.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: 1
builder:
configs:
- documentation_targets: [Crypto, _CryptoExtras]
- documentation_targets: [Crypto, CryptoExtras]
platform: linux
147 changes: 79 additions & 68 deletions .swiftformatignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Sources/Crypto/Digests/Digest.swift
Sources/Crypto/Digests/Digests.swift
Sources/Crypto/Digests/HashFunctions.swift
Sources/Crypto/Digests/HashFunctions_SHA2.swift
Sources/Crypto/Digests/HashFunctions_SHA3.swift
Sources/Crypto/HPKE/Ciphersuite/HPKE-AEAD.swift
Sources/Crypto/HPKE/Ciphersuite/HPKE-Ciphersuite.swift
Sources/Crypto/HPKE/Ciphersuite/HPKE-KDF.swift
Expand All @@ -43,8 +44,12 @@ Sources/Crypto/HPKE/Modes/HPKE-Modes.swift
Sources/Crypto/Insecure/Insecure.swift
Sources/Crypto/Insecure/Insecure_HashFunctions.swift
Sources/Crypto/KEM/KEM.swift
Sources/Crypto/KEM/KEM-Errors.swift
Sources/Crypto/KEM/MLKEM.swift
Sources/Crypto/KEM/XWing.swift
Sources/Crypto/Key Agreement/DH.swift
Sources/Crypto/Key Agreement/ECDH.swift
Sources/Crypto/Key Derivation/ANSIx963.swift
Sources/Crypto/Key Derivation/HKDF.swift
Sources/Crypto/Key Wrapping/AESWrap.swift
Sources/Crypto/Keys/EC/Curve25519.swift
Expand All @@ -58,51 +63,52 @@ Sources/Crypto/Message Authentication Codes/MessageAuthenticationCode.swift
Sources/Crypto/PRF/AES.swift
Sources/Crypto/Signatures/ECDSA.swift
Sources/Crypto/Signatures/Ed25519.swift
Sources/Crypto/Signatures/MLDSA.swift
Sources/Crypto/Signatures/Signature.swift
Sources/Crypto/Util/PrettyBytes.swift
Sources/Crypto/Util/SafeCompare.swift
Sources/Crypto/Util/SecureBytes.swift
Sources/Crypto/Util/Zeroization.swift
Sources/_CryptoExtras/AES/AES_CBC.swift
Sources/_CryptoExtras/AES/AES_CFB.swift
Sources/_CryptoExtras/AES/AES_CTR.swift
Sources/_CryptoExtras/AES/AES_GCM_SIV.swift
Sources/_CryptoExtras/AES/Block Function.swift
Sources/_CryptoExtras/ARC/ARC+API.swift
Sources/_CryptoExtras/ARC/ARC.swift
Sources/_CryptoExtras/ARC/ARCCredential.swift
Sources/_CryptoExtras/ARC/ARCEncoding.swift
Sources/_CryptoExtras/ARC/ARCPrecredential.swift
Sources/_CryptoExtras/ARC/ARCPresentation.swift
Sources/_CryptoExtras/ARC/ARCRequest.swift
Sources/_CryptoExtras/ARC/ARCResponse.swift
Sources/_CryptoExtras/ARC/ARCServer.swift
Sources/_CryptoExtras/ZKPs/Prover.swift
Sources/_CryptoExtras/ZKPs/Verifier.swift
Sources/_CryptoExtras/ZKPs/ZKPToolbox.swift
Sources/_CryptoExtras/ChaCha20CTR/ChaCha20CTR.swift
Sources/_CryptoExtras/ECToolbox/ECToolbox.swift
Sources/_CryptoExtras/H2G/HashToField.swift
Sources/_CryptoExtras/Key Derivation/KDF.swift
Sources/_CryptoExtras/Key Derivation/PBKDF2/PBKDF2.swift
Sources/_CryptoExtras/Key Derivation/Scrypt/Scrypt.swift
Sources/_CryptoExtras/OPRFs/OPRF.swift
Sources/_CryptoExtras/OPRFs/OPRFClient.swift
Sources/_CryptoExtras/OPRFs/OPRFServer.swift
Sources/_CryptoExtras/OPRFs/VOPRF+API.swift
Sources/_CryptoExtras/OPRFs/VOPRFClient.swift
Sources/_CryptoExtras/OPRFs/VOPRFServer.swift
Sources/_CryptoExtras/RSA/RSA+BlindSigning.swift
Sources/_CryptoExtras/RSA/RSA.swift
Sources/_CryptoExtras/Util/BoringSSLHelpers.swift
Sources/_CryptoExtras/Util/DigestType.swift
Sources/_CryptoExtras/Util/Error.swift
Sources/_CryptoExtras/Util/I2OSP.swift
Sources/_CryptoExtras/Util/IntegerEncoding.swift
Sources/_CryptoExtras/Util/PEMDocument.swift
Sources/_CryptoExtras/Util/PrettyBytes.swift
Sources/_CryptoExtras/Util/SubjectPublicKeyInfo.swift
Sources/_CryptoExtras/ZKPs/DLEQ.swift
Sources/CryptoExtras/AES/AES_CBC.swift
Sources/CryptoExtras/AES/AES_CFB.swift
Sources/CryptoExtras/AES/AES_CTR.swift
Sources/CryptoExtras/AES/AES_GCM_SIV.swift
Sources/CryptoExtras/AES/Block Function.swift
Sources/CryptoExtras/ARC/ARC+API.swift
Sources/CryptoExtras/ARC/ARC.swift
Sources/CryptoExtras/ARC/ARCCredential.swift
Sources/CryptoExtras/ARC/ARCEncoding.swift
Sources/CryptoExtras/ARC/ARCPrecredential.swift
Sources/CryptoExtras/ARC/ARCPresentation.swift
Sources/CryptoExtras/ARC/ARCRequest.swift
Sources/CryptoExtras/ARC/ARCResponse.swift
Sources/CryptoExtras/ARC/ARCServer.swift
Sources/CryptoExtras/ZKPs/Prover.swift
Sources/CryptoExtras/ZKPs/Verifier.swift
Sources/CryptoExtras/ZKPs/ZKPToolbox.swift
Sources/CryptoExtras/ChaCha20CTR/ChaCha20CTR.swift
Sources/CryptoExtras/ECToolbox/ECToolbox.swift
Sources/CryptoExtras/H2G/HashToField.swift
Sources/CryptoExtras/Key Derivation/KDF.swift
Sources/CryptoExtras/Key Derivation/PBKDF2/PBKDF2.swift
Sources/CryptoExtras/Key Derivation/Scrypt/Scrypt.swift
Sources/CryptoExtras/OPRFs/OPRF.swift
Sources/CryptoExtras/OPRFs/OPRFClient.swift
Sources/CryptoExtras/OPRFs/OPRFServer.swift
Sources/CryptoExtras/OPRFs/VOPRF+API.swift
Sources/CryptoExtras/OPRFs/VOPRFClient.swift
Sources/CryptoExtras/OPRFs/VOPRFServer.swift
Sources/CryptoExtras/RSA/RSA+BlindSigning.swift
Sources/CryptoExtras/RSA/RSA.swift
Sources/CryptoExtras/Util/BoringSSLHelpers.swift
Sources/CryptoExtras/Util/DigestType.swift
Sources/CryptoExtras/Util/Error.swift
Sources/CryptoExtras/Util/I2OSP.swift
Sources/CryptoExtras/Util/IntegerEncoding.swift
Sources/CryptoExtras/Util/PEMDocument.swift
Sources/CryptoExtras/Util/PrettyBytes.swift
Sources/CryptoExtras/Util/SubjectPublicKeyInfo.swift
Sources/CryptoExtras/ZKPs/DLEQ.swift
Sources/crypto-shasum/main.swift
Tests/CryptoTests/ASN1/ASN1Tests.swift
Tests/CryptoTests/ASN1/GeneralizedTimeTests.swift
Expand All @@ -115,6 +121,9 @@ Tests/CryptoTests/Encodings/DERTests.swift
Tests/CryptoTests/Encodings/ECKeyEncodingsTests.swift
Tests/CryptoTests/HPKE/HPKETests-TestVectors.swift
Tests/CryptoTests/HPKE/HPKETests.swift
Tests/CryptoTests/KEM/MLKEMKeyGenTests.swift
Tests/CryptoTests/KEM/MLKEMTests.swift
Tests/CryptoTests/KEM/XWingTests.swift
Tests/CryptoTests/Key Derivation/ECprivateKeysFromSeeds.swift
Tests/CryptoTests/Key Derivation/HKDFTests.swift
Tests/CryptoTests/Key Derivation/SharedSecretTests.swift
Expand All @@ -125,36 +134,38 @@ Tests/CryptoTests/SecureBytes/SecureBytesTests.swift
Tests/CryptoTests/Signatures/ECDSA/ECDSASignatureTests.swift
Tests/CryptoTests/Signatures/ECDSA/RawECDSASignaturesTests.swift
Tests/CryptoTests/Signatures/EdDSA/Ed25519-Runner.swift
Tests/CryptoTests/Signatures/MLDSA/MLDSAKeyGenTests.swift
Tests/CryptoTests/Signatures/MLDSA/MLDSATests.swift
Tests/CryptoTests/Utils/PrettyBytes.swift
Tests/CryptoTests/Utils/RFCVector.swift
Tests/CryptoTests/Utils/SplitData.swift
Tests/CryptoTests/Utils/Wycheproof.swift
Tests/CryptoTests/Utils/XCTestUtils.swift
Tests/_CryptoExtrasTests/AES Block Function Tests.swift
Tests/_CryptoExtrasTests/AES-GCM-SIV-Runner.swift
Tests/_CryptoExtrasTests/AES_CBCTests.swift
Tests/_CryptoExtrasTests/AES_CFBTests.swift
Tests/_CryptoExtrasTests/AES_CTRTests.swift
Tests/_CryptoExtrasTests/ARC/ARCAPITests.swift
Tests/_CryptoExtrasTests/ARC/ARCEncodingTests.swift
Tests/_CryptoExtrasTests/ARC/ARCPublicAPITests.swift
Tests/_CryptoExtrasTests/ARC/ARCTestVectors.swift
Tests/_CryptoExtrasTests/ARC/ARCTests.swift
Tests/_CryptoExtrasTests/ChaCha20CTRTests.swift
Tests/_CryptoExtrasTests/ECToolbox/HashToCurveTests.swift
Tests/_CryptoExtrasTests/OPRFs/ECVOPRFTests.swift
Tests/_CryptoExtrasTests/OPRFs/VOPRFAPITests.swift
Tests/_CryptoExtrasTests/OPRFs/VOPRFPublicAPITests.swift
Tests/_CryptoExtrasTests/PBKDF2Tests.swift
Tests/_CryptoExtrasTests/ScryptTests.swift
Tests/_CryptoExtrasTests/TestRSABlindSigning.swift
Tests/_CryptoExtrasTests/TestRSABlindSigningAPI.swift
Tests/_CryptoExtrasTests/TestRSAEncryption.swift
Tests/_CryptoExtrasTests/TestRSASigning.swift
Tests/_CryptoExtrasTests/Util/IntegerEncodingTests.swift
Tests/_CryptoExtrasTests/Utils/BytesUtil.swift
Tests/_CryptoExtrasTests/Utils/RFCVector.swift
Tests/_CryptoExtrasTests/Utils/SplitData.swift
Tests/_CryptoExtrasTests/Utils/Wycheproof.swift
Tests/_CryptoExtrasTests/Utils/XCTestUtils.swift
Tests/_CryptoExtrasTests/ZKPs/ZKPToolbox.swift
Tests/CryptoExtrasTests/AES Block Function Tests.swift
Tests/CryptoExtrasTests/AES-GCM-SIV-Runner.swift
Tests/CryptoExtrasTests/AES_CBCTests.swift
Tests/CryptoExtrasTests/AES_CFBTests.swift
Tests/CryptoExtrasTests/AES_CTRTests.swift
Tests/CryptoExtrasTests/ARC/ARCAPITests.swift
Tests/CryptoExtrasTests/ARC/ARCEncodingTests.swift
Tests/CryptoExtrasTests/ARC/ARCPublicAPITests.swift
Tests/CryptoExtrasTests/ARC/ARCTestVectors.swift
Tests/CryptoExtrasTests/ARC/ARCTests.swift
Tests/CryptoExtrasTests/ChaCha20CTRTests.swift
Tests/CryptoExtrasTests/ECToolbox/HashToCurveTests.swift
Tests/CryptoExtrasTests/OPRFs/ECVOPRFTests.swift
Tests/CryptoExtrasTests/OPRFs/VOPRFAPITests.swift
Tests/CryptoExtrasTests/OPRFs/VOPRFPublicAPITests.swift
Tests/CryptoExtrasTests/PBKDF2Tests.swift
Tests/CryptoExtrasTests/ScryptTests.swift
Tests/CryptoExtrasTests/TestRSABlindSigning.swift
Tests/CryptoExtrasTests/TestRSABlindSigningAPI.swift
Tests/CryptoExtrasTests/TestRSAEncryption.swift
Tests/CryptoExtrasTests/TestRSASigning.swift
Tests/CryptoExtrasTests/Util/IntegerEncodingTests.swift
Tests/CryptoExtrasTests/Utils/BytesUtil.swift
Tests/CryptoExtrasTests/Utils/RFCVector.swift
Tests/CryptoExtrasTests/Utils/SplitData.swift
Tests/CryptoExtrasTests/Utils/Wycheproof.swift
Tests/CryptoExtrasTests/Utils/XCTestUtils.swift
Tests/CryptoExtrasTests/ZKPs/ZKPToolbox.swift
3 changes: 2 additions & 1 deletion .unacceptablelanguageignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Sources/CCryptoBoringSSL/*
Sources/CCryptoBoringSSL/*
Sources/CXKCP/*
7 changes: 6 additions & 1 deletion Benchmarks/Benchmarks/Benchmarks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@
//===----------------------------------------------------------------------===//
import Benchmark
import Crypto
import CryptoExtras

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
import _CryptoExtras
#endif

let benchmarks = {
let defaultMetrics: [BenchmarkMetric] = [.mallocCountTotal, .cpuTotal]
Expand Down
2 changes: 1 addition & 1 deletion Benchmarks/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let package = Package(
dependencies: [
.product(name: "Benchmark", package: "package-benchmark"),
.product(name: "Crypto", package: "swift-crypto"),
.product(name: "_CryptoExtras", package: "swift-crypto"),
.product(name: "CryptoExtras", package: "swift-crypto"),
],
path: "Benchmarks/",
plugins: [
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ act --container-architecture linux/amd64 pull_request -j cmake-lists -W ./.githu

You can find the underlying script at https://github.com/apple/swift-nio/blob/main/scripts/update-cmake-lists.sh . Using the script directly is less straightforwards because it requires you to pass the JSON config from the `pull_request.yml` file into the script, such as:
```
curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/update-cmake-lists.sh | CONFIG_JSON='{"targets":[{"name":"CCryptoBoringSSL","type":"source","exceptions":[]},{"name":"CCryptoBoringSSLShims","type":"source","exceptions":[]},{"name":"CryptoBoringWrapper","type":"source","exceptions":[]},{"name":"Crypto","type":"source","exceptions":[]},{"name":"_CryptoExtras","type":"source","exceptions":[]},{"name":"CCryptoBoringSSL","type":"assembly","exceptions":["*/AES/*.swift"]}]}' bash
curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/update-cmake-lists.sh | CONFIG_JSON='{"targets":[{"name":"CCryptoBoringSSL","type":"source","exceptions":[]},{"name":"CCryptoBoringSSLShims","type":"source","exceptions":[]},{"name":"CryptoBoringWrapper","type":"source","exceptions":[]},{"name":"Crypto","type":"source","exceptions":[]},{"name":"CryptoExtras","type":"source","exceptions":[]},{"name":"CCryptoBoringSSL","type":"assembly","exceptions":["*/AES/*.swift"]}]}' bash
```

## API Evolution
Expand Down
Loading
Loading