diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index 45cdf5c..a55dc30 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -1,7 +1,13 @@ on: push: + paths: + - "android/**" + - ".github/workflows/android.yaml" branches: [ "main" ] pull_request: + paths: + - "android/**" + - ".github/workflows/android.yaml" branches: [ "main" ] name: Android diff --git a/.github/workflows/ios.yaml b/.github/workflows/ios.yaml new file mode 100644 index 0000000..83eb985 --- /dev/null +++ b/.github/workflows/ios.yaml @@ -0,0 +1,43 @@ +on: + push: + paths: + - "ios/**" + - ".github/workflows/ios.yaml" + branches: [ "main" ] + +name: iOS + +jobs: + build: + name: Synchronize libraries + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v3 + + - name: Add secret key to runner + env: + SLOTH_IOS_KEY: ${{ secrets.SLOTH_IOS_KEY }} + run: | + mkdir -p ~/.ssh + echo "$SLOTH_IOS_KEY" > ~/.ssh/id_ed25519 + chmod 400 ~/.ssh/id_ed25519 + wc ~/.ssh/id_ed25519 + + - name: Checkout remote + run: | + git config --global user.email "placeholder@example.com" + git config --global user.name "GitHub Action Sync Bot" + git clone git@github.com:lambdapioneer/sloth-ios.git target + + - name: Replace contents + run: | + cd target + cp -rv ../ios/RainbowSloth/* . + + - name: Pushy to remote + run: | + cd target + git add . + git diff-index --quiet HEAD || git commit -m "Automatic publish from github.com/lambdapioneer/sloth" + git push origin main diff --git a/ios/.gitignore b/ios/.gitignore deleted file mode 100644 index bc5de01..0000000 --- a/ios/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -xcuserdata/ -*.ipa -*.dSYM.zip -*.dSYM -.build/ diff --git a/ios/Artifacts/.gitignore b/ios/Artifacts/.gitignore deleted file mode 100644 index d6b7ef3..0000000 --- a/ios/Artifacts/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/ios/README.md b/ios/README.md index 85bd6ad..6463d42 100644 --- a/ios/README.md +++ b/ios/README.md @@ -1,27 +1,20 @@ # Sloth: iOS -We have implemented **RainbowSloth** for iOS as a demo project included in this folder -This code is developed as an academic prototype and not intended for production use yet. +We have implemented **RainbowSloth** for iOS in this folder +It consists of the `RainbowSloth` package and the `Sloth` demo app. -## Getting started -For install the Argon2 dependency using CocoaPods. -If you do not have CocoaPods installed, follow the instructions on their website: https://cocoapods.org/ +## Using the RainbowSloth package -Then enter the iOS folder and execute the following: +The `RainbowSloth` package is synced to another repository to allow it to be included as a Swift package dependency. +Refer to the `README.md` over there: https://github.com/lambdapioneer/sloth-ios -```bash -pod install -``` -Then open the `Sloth.xcworkspace` file in Xcode. -It is important to open the workspace file and not the project file. - - -### Adding Sloth to your iOS project +## Tests -> [!IMPORTANT] -> We have not _yet_ published library artifacts. For now, you need to build the project locally. +Most low-level tests live inside the `RainbowSloth` package. +However, those that require the Secure Enclave live in the `Sloth` app test target as they require entitlements. +When testing, make sure to execute both sets of tests. ## The benchmark app @@ -29,6 +22,8 @@ It is important to open the workspace file and not the project file. The project comes with a benchmark app that is also used to generate the performance numbers that are reported in the paper. You can install it on a real device or a simulator using Xcode. +![Screenshot of the app](docs/screenshot-framed.png) + For our evaluation we created .IPA files that we then run online using AWS DeviceFarm. During these runs we manually interacted with the app through the web interface of DeviceFarm. The app reports the results to a custom server that we run on one of our servers. @@ -38,8 +33,3 @@ To replicate these steps first start the server on a server and update the IP ad Build the artifacts by running `build_artifact.sh`. Start the simulator (or use real devices) and install the IPA file. Execute the scenarios under test using the UI and observe that results are collected on the server as log files. - - -## Tests - -The project bundles tests for the individual components and you can execute them as usual through the IDE on either the simulators or a real device. diff --git a/ios/RainbowSloth/.gitignore b/ios/RainbowSloth/.gitignore new file mode 100644 index 0000000..0023a53 --- /dev/null +++ b/ios/RainbowSloth/.gitignore @@ -0,0 +1,8 @@ +.DS_Store +/.build +/Packages +xcuserdata/ +DerivedData/ +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc diff --git a/ios/RainbowSloth/Package.swift b/ios/RainbowSloth/Package.swift new file mode 100644 index 0000000..0385df7 --- /dev/null +++ b/ios/RainbowSloth/Package.swift @@ -0,0 +1,27 @@ +// swift-tools-version: 5.9 + +import PackageDescription + +let package = Package( + name: "RainbowSloth", + platforms: [.iOS(.v14)], + products: [ + .library( + name: "RainbowSloth", + targets: ["RainbowSloth"]), + ], + dependencies: [ + .package(url: "https://github.com/jedisct1/swift-sodium.git", from: "0.9.1"), + ], + targets: [ + .target( + name: "RainbowSloth", + dependencies: [ + .product(name: "Sodium", package: "swift-sodium") + ] + ), + .testTarget( + name: "RainbowSlothTests", + dependencies: ["RainbowSloth"]), + ] +) diff --git a/ios/RainbowSloth/README.md b/ios/RainbowSloth/README.md new file mode 100644 index 0000000..8096533 --- /dev/null +++ b/ios/RainbowSloth/README.md @@ -0,0 +1,49 @@ +# Sloth: iOS + +We have implemented the SE-backed key stretching scheme RainbowSloth for iOS 15+. +This folder gets synced into a designated repository to allow inclusion as a Swift package dependency. + +For changes refer to the main repository here: https://github.com/lambdapioneer/sloth + + +## Setting up + +Add this repository as a dependency to your `Package.swift` file like so: + +```swift + dependencies: [ + .package(url: "https://github.com/lambdapioneer/sloth-ios.git", from: "0.0.1"), + ], + + // ... + + dependencies: [ + .product(name: "RainbowSloth", package: "sloth-ios") + ] +``` + + +## Using RainbowSloth + +After adding the dependency you can import the library in the respective `.swift` files and use it: + +```swift +import RainbowSloth + +// create a new Sloth instance +let sloth = RainbowSloth(withN: 100) // see paper on how to choose `n` + +// create a new key +let (storageState, key) = try sloth.keygen( + pw: "user-passphrase", + handle: "your-identifier", + outputLength: 32 +) + +// re-derive the same key later +let key = try sloth.derive( + storageState: storageState, + pw: "user-passphrase", + outputLength: 32 +) +``` diff --git a/ios/SecureEnclaveBench/SecureEnclaveBench/Hkdf.swift b/ios/RainbowSloth/Sources/RainbowSloth/Hkdf.swift similarity index 57% rename from ios/SecureEnclaveBench/SecureEnclaveBench/Hkdf.swift rename to ios/RainbowSloth/Sources/RainbowSloth/Hkdf.swift index 317249c..82612bd 100644 --- a/ios/SecureEnclaveBench/SecureEnclaveBench/Hkdf.swift +++ b/ios/RainbowSloth/Sources/RainbowSloth/Hkdf.swift @@ -1,14 +1,16 @@ import CryptoKit import Foundation +/// A simple wrapper around `HDKF` with `SHA256` using `Data` types. public struct HkdfSha256 { - public static func derive(salt: Data, ikm: Data, info: Data, l: Int) -> Data { + /// Derives a key from the initial key material `ikm` using the given `salt` and `info`. The output will be `outputLength` bytes long. + public static func derive(salt: Data, ikm: Data, info: Data, outputLength: Int) -> Data { let output = HKDF.deriveKey( inputKeyMaterial: SymmetricKey(data: ikm), salt: salt, info: info, - outputByteCount: l + outputByteCount: outputLength ) return output.withUnsafeBytes { body in Data(body) diff --git a/ios/RainbowSloth/Sources/RainbowSloth/PwHash.swift b/ios/RainbowSloth/Sources/RainbowSloth/PwHash.swift new file mode 100644 index 0000000..a9d53ea --- /dev/null +++ b/ios/RainbowSloth/Sources/RainbowSloth/PwHash.swift @@ -0,0 +1,29 @@ +import Sodium +import Foundation + +/// Wrapper around the Argon2id password hashing algorithm as provided by `Sodium`. +public struct PwHash { + + /// Derives a key from the given `salt` and password `pw`. The output will be `outputLength` bytes long. + public static func derive(salt: Data, pw: Data, outputLength: Int) -> Data { + // OWASP: "Use Argon2id with a minimum configuration of 19 MiB of memory, an iteration count of 2, and 1 degree of parallelism." + let sodium = Sodium.init() + let sodiumPwHash = sodium.pwHash + let res = sodiumPwHash.hash( + outputLength: outputLength, + passwd: Array(pw), + salt: Array(salt), + opsLimit: 2, + memLimit: 19*1024*1024 // 19 MiB + ) + return Data(res!) + } + + /// Creates a new random `salt` byte array that can be used with the `derive` function. + public static func randomSalt(outputLength: Int = 16) -> Data { + var bytes = [UInt8](repeating: 0, count: outputLength) + let result = SecRandomCopyBytes(kSecRandomDefault, bytes.count, &bytes) + assert(result == errSecSuccess, "Failed to generate random bytes") + return Data(bytes) + } +} diff --git a/ios/SecureEnclaveBench/SecureEnclaveBench/RainbowSloth.swift b/ios/RainbowSloth/Sources/RainbowSloth/RainbowSloth.swift similarity index 55% rename from ios/SecureEnclaveBench/SecureEnclaveBench/RainbowSloth.swift rename to ios/RainbowSloth/Sources/RainbowSloth/RainbowSloth.swift index 6434640..136914e 100644 --- a/ios/SecureEnclaveBench/SecureEnclaveBench/RainbowSloth.swift +++ b/ios/RainbowSloth/Sources/RainbowSloth/RainbowSloth.swift @@ -1,20 +1,25 @@ import Foundation -let DEFAULT_HANDLE = Data() -let P256_PUBLIC_KEY_SIZE = 32 +private let P256_PUBLIC_KEY_SIZE = 32 +/// Implementation of the RainbowSloth algorithm for tuneable password-based key stretching on iOS using the SecureEnclave (SE). +/// The parameter `n` determines the number of required SE operations and can be increased for higher security levels. +/// Refer to the paper and documentation for more details. public struct RainbowSloth { var n: Int - init(withN n: Int) { + public init(withN n: Int) { self.n = n; } - func keygen(pw: String, handle: String, outputLength: Int) throws -> (RainbowSlothStorageState, Data) { + /// Generates a new key under the handle `handle` using the password `pw`. The output will be `outputLength` bytes long. + /// Every call to this function will result in a new key and any existing key under the same handle will be overwritten. + /// Calls to `derive` using the returned storage state will result in the same key. + public func keygen(pw: String, handle: String, outputLength: Int) throws -> (RainbowSlothStorageState, Data) { let storageState = RainbowSlothStorageState( handle: handle, - salt: randomSalt() + salt: PwHash.randomSalt() ) try SecureEnclave.resetSecretSeKey(handle: storageState.handle) @@ -24,13 +29,16 @@ public struct RainbowSloth { return (storageState, k) } - func derive(storageState: RainbowSlothStorageState, pw: String, outputLength: Int) throws -> Data { + /// Re-derives a key from the given storage state. The result will be `outputLength` bytes long. + public func derive(storageState: RainbowSlothStorageState, pw: String, outputLength: Int) throws -> Data { let pres = try preambleDerive(storageState: storageState, pw: pw) let k = try innerDerive(storageState: storageState, pres: pres, outputLength: outputLength) return k } - func eval(storageState: RainbowSlothStorageState, pw: String, outputLength: Int, iterations: Int) throws -> [Double] { + /// An evaluation method of the internal derive method to measure the effective time guarantees. The returned array contains + /// `iterations` many measurements of this operation in seconds. + public func eval(storageState: RainbowSlothStorageState, pw: String, outputLength: Int, iterations: Int) throws -> [Double] { let pres = try preambleDerive(storageState: storageState, pw: pw) var durations = [Double]() @@ -47,7 +55,8 @@ public struct RainbowSloth { private func preambleDerive(storageState: RainbowSlothStorageState, pw: String) throws -> [Data] { let l = n * P256_PUBLIC_KEY_SIZE - let pres_combined = PwHash.derive(salt: storageState.salt, pw: pw, l: l) + let pwBytes = pw.data(using: .utf8)! + let pres_combined = PwHash.derive(salt: storageState.salt, pw: pwBytes, outputLength: l) return pres_combined.chunkify(length: P256_PUBLIC_KEY_SIZE) } @@ -66,13 +75,14 @@ public struct RainbowSloth { salt: storageState.salt, ikm: posts_combined, info: Data(), - l: outputLength + outputLength: outputLength ) return k } } +/// The required data to be persisted for later re-deriving the same key using `RainbowSloth`. public struct RainbowSlothStorageState { var handle: String var salt: Data diff --git a/ios/SecureEnclaveBench/SecureEnclaveBench/ReHashToEc.swift b/ios/RainbowSloth/Sources/RainbowSloth/ReHashToEc.swift similarity index 80% rename from ios/SecureEnclaveBench/SecureEnclaveBench/ReHashToEc.swift rename to ios/RainbowSloth/Sources/RainbowSloth/ReHashToEc.swift index d6b6aa3..77b03db 100644 --- a/ios/SecureEnclaveBench/SecureEnclaveBench/ReHashToEc.swift +++ b/ios/RainbowSloth/Sources/RainbowSloth/ReHashToEc.swift @@ -1,8 +1,10 @@ import CryptoKit import Foundation +/// Helper functions for creating and manipulating P256 keys. public struct ReHashToEc { + /// Deterministically maps an input `seed` value to a P256 `SecKey`. public static func rehashToP256(seed: Data) -> SecKey { let salt = Data() let info = Data() @@ -10,7 +12,7 @@ public struct ReHashToEc { while (true) { let seedString = "\(seed.toHex)\(counter)" let currentSeed = seedString.data(using: .ascii)! - var arr = HkdfSha256.derive(salt: salt, ikm: currentSeed, info: info, l: 33) + var arr = HkdfSha256.derive(salt: salt, ikm: currentSeed, info: info, outputLength: 33) arr[0] = 0x02 | (arr[0] & 0x01) // try to convert and for any failure restart the loop with an incremented counter @@ -27,7 +29,8 @@ public struct ReHashToEc { } } - public static func convertCompressedToX963(data: Data) throws -> Data { + /// Convert a P256 key from its compressed representation to the X963 represeantation that is expected for importing it the iOS APIs. + internal static func convertCompressedToX963(data: Data) throws -> Data { // Unfortunately, iOS only added support for the SEC1-style compressed representation // in iOS 16. That works as expected on an array with 33 bytes with the first one being 0x02/0x03 // to indicate which of the possible Y values to choose. @@ -47,14 +50,14 @@ public struct ReHashToEc { } } - static func convertCompressedToX963_below16(data: Data) throws -> Data { + internal static func convertCompressedToX963_below16(data: Data) throws -> Data { // drop the first byte from the compressed SEC-1 representation for Apple's special compact representation let trimmedData = data.subdata(in: 1.. Data { + internal static func convertCompressedToX963_16andAbove(data: Data) throws -> Data { return try P256.Signing.PublicKey.init(compressedRepresentation: data).x963Representation } } diff --git a/ios/SecureEnclaveBench/SecureEnclaveBench/SecureEnclave.swift b/ios/RainbowSloth/Sources/RainbowSloth/SecureEnclave.swift similarity index 92% rename from ios/SecureEnclaveBench/SecureEnclaveBench/SecureEnclave.swift rename to ios/RainbowSloth/Sources/RainbowSloth/SecureEnclave.swift index eb14be8..49e1556 100644 --- a/ios/SecureEnclaveBench/SecureEnclaveBench/SecureEnclave.swift +++ b/ios/RainbowSloth/Sources/RainbowSloth/SecureEnclave.swift @@ -1,6 +1,6 @@ import Foundation -enum PdeSeError: Error { +enum SlothSecureEnclaveError: Error { case loadFailed(String) case genFailed(String) case ecdhFailed(String) @@ -10,7 +10,7 @@ public struct SecureEnclave { public static func runEval(iterations: Int) throws -> [Double] { // create keys to play with - try resetSecretSeKey() + try! resetSecretSeKey() let secretSeKey = try! loadSecretSeKey() debugPrint("secretSeKey", secretSeKey) @@ -74,13 +74,13 @@ public struct SecureEnclave { var pubKey, secretKey: SecKey? let status = SecKeyGeneratePair(pairAttributes as CFDictionary, &pubKey, &secretKey) guard status == errSecSuccess else { - throw PdeSeError.genFailed("generating random public key failed") + throw SlothSecureEnclaveError.genFailed("generating random public key failed") } return pubKey! } - public static func loadSecretSeKey(handle: String = "sloth") throws -> SecKey { + public static func loadSecretSeKey(handle: String = "sloth_default") throws -> SecKey { let query: NSDictionary = [ kSecClass: kSecClassKey, kSecAttrApplicationTag: handle, @@ -91,12 +91,12 @@ public struct SecureEnclave { var item: CFTypeRef? let status = SecItemCopyMatching(query as CFDictionary, &item) guard status == errSecSuccess else { - throw PdeSeError.loadFailed("load failed") + throw SlothSecureEnclaveError.loadFailed("load failed") } return item as! SecKey } - public static func resetSecretSeKey(handle: String = "sloth") throws { + public static func resetSecretSeKey(handle: String = "sloth_default") throws { // (1) delete existing key (if any) under the given handle, as create does not // overwrite existing keys let query: NSDictionary = [ diff --git a/ios/SecureEnclaveBench/SecureEnclaveBench/Utils.swift b/ios/RainbowSloth/Sources/RainbowSloth/Utils.swift similarity index 74% rename from ios/SecureEnclaveBench/SecureEnclaveBench/Utils.swift rename to ios/RainbowSloth/Sources/RainbowSloth/Utils.swift index b7c9bd9..aaad8e2 100644 --- a/ios/SecureEnclaveBench/SecureEnclaveBench/Utils.swift +++ b/ios/RainbowSloth/Sources/RainbowSloth/Utils.swift @@ -1,14 +1,9 @@ import Foundation -public func randomSalt(l: Int = 32) -> Data { - var bytes = [UInt8](repeating: 0, count: l) - let result = SecRandomCopyBytes(kSecRandomDefault, bytes.count, &bytes) - assert(result == errSecSuccess, "Failed to generate random bytes") - return Data(bytes) -} - public extension Data { + + /// Creates a new `Data` object initialized with bytes decoded from the provided hexadecimal-encoded String. init(hex: String) { let l = hex.count / 2 var data = Data(capacity: l) @@ -23,11 +18,13 @@ public extension Data { self = data } + /// Returns a hexadecimal-encoded version of this `Data` object. var toHex: String { return map { String(format: "%02x", $0) } .joined() } + /// Splits this array into arrays that each have `length` bytes. Throws if the `.count` of this object cannot be evenly divided. func chunkify(length: Int) -> [Data] { precondition(self.count % length == 0, "Data is not evenly divisible by chunk size.") let count = self.count / length @@ -41,6 +38,7 @@ public extension Data { return result } + /// Concatenates all given `chunks` to create a new `Data` object. static func combine(chunks: [Data]) -> Data { var result = Data() for chunk in chunks { diff --git a/ios/SecureEnclaveBench/SecureEnclaveBenchTests/HkdfTests.swift b/ios/RainbowSloth/Tests/RainbowSlothTests/HkdfTests.swift similarity index 93% rename from ios/SecureEnclaveBench/SecureEnclaveBenchTests/HkdfTests.swift rename to ios/RainbowSloth/Tests/RainbowSlothTests/HkdfTests.swift index 7bacfda..3ac9ca9 100644 --- a/ios/SecureEnclaveBench/SecureEnclaveBenchTests/HkdfTests.swift +++ b/ios/RainbowSloth/Tests/RainbowSlothTests/HkdfTests.swift @@ -1,3 +1,4 @@ +import RainbowSloth import XCTest final class HkdfTests: XCTestCase { @@ -15,10 +16,9 @@ final class HkdfTests: XCTestCase { let info = Data(hex: "f0f1f2f3f4f5f6f7f8f9") let l = 42 - let actual = HkdfSha256.derive(salt: salt, ikm: ikm, info: info, l: l) + let actual = HkdfSha256.derive(salt: salt, ikm: ikm, info: info, outputLength: l) let expected = Data(hex: "3cb25f25faacd57a90434f64d0362f2a2d2d0a90cf1a5a4c5db02d56ecc4c5bf34007208d5b887185865") XCTAssertEqual(actual, expected) } - } diff --git a/ios/RainbowSloth/Tests/RainbowSlothTests/PwHashTests.swift b/ios/RainbowSloth/Tests/RainbowSlothTests/PwHashTests.swift new file mode 100644 index 0000000..9b4e0b0 --- /dev/null +++ b/ios/RainbowSloth/Tests/RainbowSlothTests/PwHashTests.swift @@ -0,0 +1,46 @@ +import RainbowSloth +import XCTest + +final class PwHashTests: XCTestCase { + + func testPwHashOutputLengthMatches() throws { + let pw = "test".data(using: .utf8)! + let salt = Data(hex: "0123456789ABCDEF0123456789ABCDEF") + + let res = PwHash.derive(salt: salt, pw: pw, outputLength: 42) + + XCTAssertEqual(res.count, 42) + } + + func testPwHashDifferentPasswordsDifferentOutput() throws { + let pw1 = "test".data(using: .utf8)! + let pw2 = "test2".data(using: .utf8)! + let salt = Data(hex: "0123456789ABCDEF0123456789ABCDEF") + + let res1 = PwHash.derive(salt: salt, pw: pw1, outputLength: 32) + let res2 = PwHash.derive(salt: salt, pw: pw2, outputLength: 32) + + XCTAssertNotEqual(res1, res2) + } + + func testPwHashDifferentSaltsDifferentOutput() throws { + let pw = "test".data(using: .utf8)! + let salt1 = Data(hex: "0123456789ABCDEF0123456789ABCDEF") + let salt2 = Data(hex: "F123456789ABCDEF0123456789ABCDEF") + + let res1 = PwHash.derive(salt: salt1, pw: pw, outputLength: 32) + let res2 = PwHash.derive(salt: salt2, pw: pw, outputLength: 32) + + XCTAssertNotEqual(res1, res2) + } + + func testPwHashSameParametersSameOutput() throws { + let pw = "test".data(using: .utf8)! + let salt = Data(hex: "0123456789ABCDEF0123456789ABCDEF") + + let res1 = PwHash.derive(salt: salt, pw: pw, outputLength: 32) + let res2 = PwHash.derive(salt: salt, pw: pw, outputLength: 32) + + XCTAssertEqual(res1, res2) + } +} diff --git a/ios/SecureEnclaveBench/SecureEnclaveBenchTests/ReHashToEcTests.swift b/ios/RainbowSloth/Tests/RainbowSlothTests/ReHashToEcTests.swift similarity index 96% rename from ios/SecureEnclaveBench/SecureEnclaveBenchTests/ReHashToEcTests.swift rename to ios/RainbowSloth/Tests/RainbowSlothTests/ReHashToEcTests.swift index 92f060a..d8af441 100644 --- a/ios/SecureEnclaveBench/SecureEnclaveBenchTests/ReHashToEcTests.swift +++ b/ios/RainbowSloth/Tests/RainbowSlothTests/ReHashToEcTests.swift @@ -1,3 +1,4 @@ +import RainbowSloth import XCTest final class ReHashToEcTests: XCTestCase { diff --git a/ios/SecureEnclaveBench/Podfile b/ios/SecureEnclaveBench/Podfile deleted file mode 100644 index d1eeb60..0000000 --- a/ios/SecureEnclaveBench/Podfile +++ /dev/null @@ -1,9 +0,0 @@ -target 'SecureEnclaveBench' do - use_frameworks! - - pod 'Argon2Swift' - - target 'SecureEnclaveBenchTests' do - inherit! :search_paths - end -end diff --git a/ios/SecureEnclaveBench/Podfile.lock b/ios/SecureEnclaveBench/Podfile.lock deleted file mode 100644 index b57ee97..0000000 --- a/ios/SecureEnclaveBench/Podfile.lock +++ /dev/null @@ -1,16 +0,0 @@ -PODS: - - Argon2Swift (1.0.4) - -DEPENDENCIES: - - Argon2Swift - -SPEC REPOS: - trunk: - - Argon2Swift - -SPEC CHECKSUMS: - Argon2Swift: 295b8bde7ba61434f227f5610b8813c42e866f74 - -PODFILE CHECKSUM: 90b18f464c3efd9874647c7ef11d7efc2efa01c3 - -COCOAPODS: 1.12.0 diff --git a/ios/SecureEnclaveBench/SecureEnclaveBench.xcodeproj/project.pbxproj b/ios/SecureEnclaveBench/SecureEnclaveBench.xcodeproj/project.pbxproj deleted file mode 100644 index fd689ca..0000000 --- a/ios/SecureEnclaveBench/SecureEnclaveBench.xcodeproj/project.pbxproj +++ /dev/null @@ -1,630 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 56; - objects = { - -/* Begin PBXBuildFile section */ - 3003F74329C5B6A6001D48FC /* RainbowSloth.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3003F74229C5B6A6001D48FC /* RainbowSloth.swift */; }; - 3003F74429C5B6A6001D48FC /* RainbowSloth.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3003F74229C5B6A6001D48FC /* RainbowSloth.swift */; }; - 300DBA6129AE463C007DA9A6 /* Hkdf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 300DBA6029AE463C007DA9A6 /* Hkdf.swift */; }; - 300DBA6329AE4B44007DA9A6 /* HkdfTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 300DBA6229AE4B44007DA9A6 /* HkdfTests.swift */; }; - 300DBA6429AE53A5007DA9A6 /* Hkdf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 300DBA6029AE463C007DA9A6 /* Hkdf.swift */; }; - 300DBA6629AE54F2007DA9A6 /* SecureEnclaveTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 300DBA6529AE54F2007DA9A6 /* SecureEnclaveTests.swift */; }; - 303ADED029700A3B005E3023 /* SecureEnclave.swift in Sources */ = {isa = PBXBuildFile; fileRef = 303ADECF29700A3B005E3023 /* SecureEnclave.swift */; }; - 303ADED2297026D7005E3023 /* UIDevice.swift in Sources */ = {isa = PBXBuildFile; fileRef = 303ADED1297026D7005E3023 /* UIDevice.swift */; }; - 30850551296F1A6800FFB481 /* SecureEnclaveBenchApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30850550296F1A6800FFB481 /* SecureEnclaveBenchApp.swift */; }; - 30850553296F1A6800FFB481 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30850552296F1A6800FFB481 /* ContentView.swift */; }; - 30850555296F1A6A00FFB481 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 30850554296F1A6A00FFB481 /* Assets.xcassets */; }; - 30850558296F1A6A00FFB481 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 30850557296F1A6A00FFB481 /* Preview Assets.xcassets */; }; - 30D3BC8829C5F8BA004F6DFD /* PwHash.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D3BC8729C5F8BA004F6DFD /* PwHash.swift */; }; - 30D3BC8929C5F8BA004F6DFD /* PwHash.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D3BC8729C5F8BA004F6DFD /* PwHash.swift */; }; - 30D3BC8B29C5FB4F004F6DFD /* PwHashTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D3BC8A29C5FB4F004F6DFD /* PwHashTests.swift */; }; - 30D3BC8D29C5FEEC004F6DFD /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D3BC8C29C5FEEC004F6DFD /* Utils.swift */; }; - 30D3BC8E29C5FEEC004F6DFD /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D3BC8C29C5FEEC004F6DFD /* Utils.swift */; }; - 30D3BC9029C603FE004F6DFD /* RainbowSlothTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D3BC8F29C603FE004F6DFD /* RainbowSlothTests.swift */; }; - 30E01BB329B0EF01002D05DC /* SecureEnclave.swift in Sources */ = {isa = PBXBuildFile; fileRef = 303ADECF29700A3B005E3023 /* SecureEnclave.swift */; }; - 30E01BB529B0F80E002D05DC /* ReHashToEc.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30E01BB429B0F80E002D05DC /* ReHashToEc.swift */; }; - 30E01BB629B0F80E002D05DC /* ReHashToEc.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30E01BB429B0F80E002D05DC /* ReHashToEc.swift */; }; - 30E01BB829B10758002D05DC /* ReHashToEcTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30E01BB729B10758002D05DC /* ReHashToEcTests.swift */; }; - 40EFAA80359694B09071DCD0 /* Pods_SecureEnclaveBench.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F7E5577059410859844DECB3 /* Pods_SecureEnclaveBench.framework */; }; - E816CCFCC678E33C1456463E /* Pods_SecureEnclaveBenchTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7896F15D3F3E08E274B44876 /* Pods_SecureEnclaveBenchTests.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 3085055E296F1A6A00FFB481 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 30850545296F1A6800FFB481 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 3085054C296F1A6800FFB481; - remoteInfo = SecureEnclaveBench; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 3003F74229C5B6A6001D48FC /* RainbowSloth.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RainbowSloth.swift; sourceTree = ""; }; - 300DBA6029AE463C007DA9A6 /* Hkdf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Hkdf.swift; sourceTree = ""; }; - 300DBA6229AE4B44007DA9A6 /* HkdfTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HkdfTests.swift; sourceTree = ""; }; - 300DBA6529AE54F2007DA9A6 /* SecureEnclaveTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecureEnclaveTests.swift; sourceTree = ""; }; - 303ADECF29700A3B005E3023 /* SecureEnclave.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecureEnclave.swift; sourceTree = ""; }; - 303ADED1297026D7005E3023 /* UIDevice.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIDevice.swift; sourceTree = ""; }; - 3056BB0DFF210673FF054D85 /* Pods-SecureEnclaveBenchTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SecureEnclaveBenchTests.release.xcconfig"; path = "Target Support Files/Pods-SecureEnclaveBenchTests/Pods-SecureEnclaveBenchTests.release.xcconfig"; sourceTree = ""; }; - 3085054D296F1A6800FFB481 /* SecureEnclaveBench.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SecureEnclaveBench.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 30850550296F1A6800FFB481 /* SecureEnclaveBenchApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecureEnclaveBenchApp.swift; sourceTree = ""; }; - 30850552296F1A6800FFB481 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; - 30850554296F1A6A00FFB481 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 30850557296F1A6A00FFB481 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; - 3085055D296F1A6A00FFB481 /* SecureEnclaveBenchTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SecureEnclaveBenchTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 30D3BC8729C5F8BA004F6DFD /* PwHash.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PwHash.swift; sourceTree = ""; }; - 30D3BC8A29C5FB4F004F6DFD /* PwHashTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PwHashTests.swift; sourceTree = ""; }; - 30D3BC8C29C5FEEC004F6DFD /* Utils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Utils.swift; sourceTree = ""; }; - 30D3BC8F29C603FE004F6DFD /* RainbowSlothTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RainbowSlothTests.swift; sourceTree = ""; }; - 30E01BB429B0F80E002D05DC /* ReHashToEc.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReHashToEc.swift; sourceTree = ""; }; - 30E01BB729B10758002D05DC /* ReHashToEcTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReHashToEcTests.swift; sourceTree = ""; }; - 7896F15D3F3E08E274B44876 /* Pods_SecureEnclaveBenchTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SecureEnclaveBenchTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 8E36CE7BC39DE6058CD8F830 /* Pods-SecureEnclaveBench.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SecureEnclaveBench.debug.xcconfig"; path = "Target Support Files/Pods-SecureEnclaveBench/Pods-SecureEnclaveBench.debug.xcconfig"; sourceTree = ""; }; - A8C6A422BF7C92F896CF025D /* Pods-SecureEnclaveBenchTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SecureEnclaveBenchTests.debug.xcconfig"; path = "Target Support Files/Pods-SecureEnclaveBenchTests/Pods-SecureEnclaveBenchTests.debug.xcconfig"; sourceTree = ""; }; - C7E2EFB1A1538986901492EC /* Pods-SecureEnclaveBench.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SecureEnclaveBench.release.xcconfig"; path = "Target Support Files/Pods-SecureEnclaveBench/Pods-SecureEnclaveBench.release.xcconfig"; sourceTree = ""; }; - F7E5577059410859844DECB3 /* Pods_SecureEnclaveBench.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SecureEnclaveBench.framework; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 3085054A296F1A6800FFB481 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 40EFAA80359694B09071DCD0 /* Pods_SecureEnclaveBench.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 3085055A296F1A6A00FFB481 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - E816CCFCC678E33C1456463E /* Pods_SecureEnclaveBenchTests.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 30850544296F1A6800FFB481 = { - isa = PBXGroup; - children = ( - 3085054F296F1A6800FFB481 /* SecureEnclaveBench */, - 30850560296F1A6A00FFB481 /* SecureEnclaveBenchTests */, - 3085054E296F1A6800FFB481 /* Products */, - DBD0D1FECE377AF3FF326C76 /* Pods */, - C38E7772D1F0A77A64F74333 /* Frameworks */, - ); - sourceTree = ""; - }; - 3085054E296F1A6800FFB481 /* Products */ = { - isa = PBXGroup; - children = ( - 3085054D296F1A6800FFB481 /* SecureEnclaveBench.app */, - 3085055D296F1A6A00FFB481 /* SecureEnclaveBenchTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 3085054F296F1A6800FFB481 /* SecureEnclaveBench */ = { - isa = PBXGroup; - children = ( - 30850550296F1A6800FFB481 /* SecureEnclaveBenchApp.swift */, - 30850552296F1A6800FFB481 /* ContentView.swift */, - 30850554296F1A6A00FFB481 /* Assets.xcassets */, - 30850556296F1A6A00FFB481 /* Preview Content */, - 303ADECF29700A3B005E3023 /* SecureEnclave.swift */, - 303ADED1297026D7005E3023 /* UIDevice.swift */, - 300DBA6029AE463C007DA9A6 /* Hkdf.swift */, - 30E01BB429B0F80E002D05DC /* ReHashToEc.swift */, - 3003F74229C5B6A6001D48FC /* RainbowSloth.swift */, - 30D3BC8729C5F8BA004F6DFD /* PwHash.swift */, - 30D3BC8C29C5FEEC004F6DFD /* Utils.swift */, - ); - path = SecureEnclaveBench; - sourceTree = ""; - }; - 30850556296F1A6A00FFB481 /* Preview Content */ = { - isa = PBXGroup; - children = ( - 30850557296F1A6A00FFB481 /* Preview Assets.xcassets */, - ); - path = "Preview Content"; - sourceTree = ""; - }; - 30850560296F1A6A00FFB481 /* SecureEnclaveBenchTests */ = { - isa = PBXGroup; - children = ( - 300DBA6229AE4B44007DA9A6 /* HkdfTests.swift */, - 30D3BC8A29C5FB4F004F6DFD /* PwHashTests.swift */, - 300DBA6529AE54F2007DA9A6 /* SecureEnclaveTests.swift */, - 30E01BB729B10758002D05DC /* ReHashToEcTests.swift */, - 30D3BC8F29C603FE004F6DFD /* RainbowSlothTests.swift */, - ); - path = SecureEnclaveBenchTests; - sourceTree = ""; - }; - C38E7772D1F0A77A64F74333 /* Frameworks */ = { - isa = PBXGroup; - children = ( - F7E5577059410859844DECB3 /* Pods_SecureEnclaveBench.framework */, - 7896F15D3F3E08E274B44876 /* Pods_SecureEnclaveBenchTests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - DBD0D1FECE377AF3FF326C76 /* Pods */ = { - isa = PBXGroup; - children = ( - 8E36CE7BC39DE6058CD8F830 /* Pods-SecureEnclaveBench.debug.xcconfig */, - C7E2EFB1A1538986901492EC /* Pods-SecureEnclaveBench.release.xcconfig */, - A8C6A422BF7C92F896CF025D /* Pods-SecureEnclaveBenchTests.debug.xcconfig */, - 3056BB0DFF210673FF054D85 /* Pods-SecureEnclaveBenchTests.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 3085054C296F1A6800FFB481 /* SecureEnclaveBench */ = { - isa = PBXNativeTarget; - buildConfigurationList = 30850571296F1A6A00FFB481 /* Build configuration list for PBXNativeTarget "SecureEnclaveBench" */; - buildPhases = ( - B3E35FBEE635C2F3E3DEB0EB /* [CP] Check Pods Manifest.lock */, - 30850549296F1A6800FFB481 /* Sources */, - 3085054A296F1A6800FFB481 /* Frameworks */, - 3085054B296F1A6800FFB481 /* Resources */, - B4AA9042F58316AE5F77AB8C /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SecureEnclaveBench; - productName = SecureEnclaveBench; - productReference = 3085054D296F1A6800FFB481 /* SecureEnclaveBench.app */; - productType = "com.apple.product-type.application"; - }; - 3085055C296F1A6A00FFB481 /* SecureEnclaveBenchTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 30850574296F1A6A00FFB481 /* Build configuration list for PBXNativeTarget "SecureEnclaveBenchTests" */; - buildPhases = ( - 28FDBC4A90A64965F6BC3E42 /* [CP] Check Pods Manifest.lock */, - 30850559296F1A6A00FFB481 /* Sources */, - 3085055A296F1A6A00FFB481 /* Frameworks */, - 3085055B296F1A6A00FFB481 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 3085055F296F1A6A00FFB481 /* PBXTargetDependency */, - ); - name = SecureEnclaveBenchTests; - productName = SecureEnclaveBenchTests; - productReference = 3085055D296F1A6A00FFB481 /* SecureEnclaveBenchTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 30850545296F1A6800FFB481 /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = 1; - LastSwiftUpdateCheck = 1420; - LastUpgradeCheck = 1420; - TargetAttributes = { - 3085054C296F1A6800FFB481 = { - CreatedOnToolsVersion = 14.2; - }; - 3085055C296F1A6A00FFB481 = { - CreatedOnToolsVersion = 14.2; - TestTargetID = 3085054C296F1A6800FFB481; - }; - }; - }; - buildConfigurationList = 30850548296F1A6800FFB481 /* Build configuration list for PBXProject "SecureEnclaveBench" */; - compatibilityVersion = "Xcode 14.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 30850544296F1A6800FFB481; - productRefGroup = 3085054E296F1A6800FFB481 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 3085054C296F1A6800FFB481 /* SecureEnclaveBench */, - 3085055C296F1A6A00FFB481 /* SecureEnclaveBenchTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 3085054B296F1A6800FFB481 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 30850558296F1A6A00FFB481 /* Preview Assets.xcassets in Resources */, - 30850555296F1A6A00FFB481 /* Assets.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 3085055B296F1A6A00FFB481 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 28FDBC4A90A64965F6BC3E42 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-SecureEnclaveBenchTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - B3E35FBEE635C2F3E3DEB0EB /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-SecureEnclaveBench-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - B4AA9042F58316AE5F77AB8C /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-SecureEnclaveBench/Pods-SecureEnclaveBench-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-SecureEnclaveBench/Pods-SecureEnclaveBench-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SecureEnclaveBench/Pods-SecureEnclaveBench-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 30850549296F1A6800FFB481 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 303ADED029700A3B005E3023 /* SecureEnclave.swift in Sources */, - 30850553296F1A6800FFB481 /* ContentView.swift in Sources */, - 30D3BC8D29C5FEEC004F6DFD /* Utils.swift in Sources */, - 30850551296F1A6800FFB481 /* SecureEnclaveBenchApp.swift in Sources */, - 300DBA6129AE463C007DA9A6 /* Hkdf.swift in Sources */, - 303ADED2297026D7005E3023 /* UIDevice.swift in Sources */, - 3003F74329C5B6A6001D48FC /* RainbowSloth.swift in Sources */, - 30D3BC8829C5F8BA004F6DFD /* PwHash.swift in Sources */, - 30E01BB529B0F80E002D05DC /* ReHashToEc.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 30850559296F1A6A00FFB481 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 300DBA6329AE4B44007DA9A6 /* HkdfTests.swift in Sources */, - 30E01BB329B0EF01002D05DC /* SecureEnclave.swift in Sources */, - 30D3BC8B29C5FB4F004F6DFD /* PwHashTests.swift in Sources */, - 30D3BC9029C603FE004F6DFD /* RainbowSlothTests.swift in Sources */, - 300DBA6429AE53A5007DA9A6 /* Hkdf.swift in Sources */, - 300DBA6629AE54F2007DA9A6 /* SecureEnclaveTests.swift in Sources */, - 30D3BC8E29C5FEEC004F6DFD /* Utils.swift in Sources */, - 30E01BB629B0F80E002D05DC /* ReHashToEc.swift in Sources */, - 3003F74429C5B6A6001D48FC /* RainbowSloth.swift in Sources */, - 30D3BC8929C5F8BA004F6DFD /* PwHash.swift in Sources */, - 30E01BB829B10758002D05DC /* ReHashToEcTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 3085055F296F1A6A00FFB481 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 3085054C296F1A6800FFB481 /* SecureEnclaveBench */; - targetProxy = 3085055E296F1A6A00FFB481 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 3085056F296F1A6A00FFB481 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 30850570296F1A6A00FFB481 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 30850572296F1A6A00FFB481 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 8E36CE7BC39DE6058CD8F830 /* Pods-SecureEnclaveBench.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_ASSET_PATHS = "\"SecureEnclaveBench/Preview Content\""; - DEVELOPMENT_TEAM = 48XKGWFXVN; - ENABLE_PREVIEWS = YES; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; - INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; - INFOPLIST_KEY_UILaunchScreen_Generation = YES; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.lambdapioneer.pdese.SecureEnclaveBench; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 30850573296F1A6A00FFB481 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = C7E2EFB1A1538986901492EC /* Pods-SecureEnclaveBench.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_ASSET_PATHS = "\"SecureEnclaveBench/Preview Content\""; - DEVELOPMENT_TEAM = 48XKGWFXVN; - ENABLE_PREVIEWS = YES; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; - INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; - INFOPLIST_KEY_UILaunchScreen_Generation = YES; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.lambdapioneer.pdese.SecureEnclaveBench; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - 30850575296F1A6A00FFB481 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = A8C6A422BF7C92F896CF025D /* Pods-SecureEnclaveBenchTests.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 48XKGWFXVN; - GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.lambdapioneer.pdese.SecureEnclaveBenchTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SecureEnclaveBench.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/SecureEnclaveBench"; - }; - name = Debug; - }; - 30850576296F1A6A00FFB481 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3056BB0DFF210673FF054D85 /* Pods-SecureEnclaveBenchTests.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 48XKGWFXVN; - GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.lambdapioneer.pdese.SecureEnclaveBenchTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SecureEnclaveBench.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/SecureEnclaveBench"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 30850548296F1A6800FFB481 /* Build configuration list for PBXProject "SecureEnclaveBench" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 3085056F296F1A6A00FFB481 /* Debug */, - 30850570296F1A6A00FFB481 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 30850571296F1A6A00FFB481 /* Build configuration list for PBXNativeTarget "SecureEnclaveBench" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 30850572296F1A6A00FFB481 /* Debug */, - 30850573296F1A6A00FFB481 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 30850574296F1A6A00FFB481 /* Build configuration list for PBXNativeTarget "SecureEnclaveBenchTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 30850575296F1A6A00FFB481 /* Debug */, - 30850576296F1A6A00FFB481 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 30850545296F1A6800FFB481 /* Project object */; -} diff --git a/ios/SecureEnclaveBench/SecureEnclaveBench.xcworkspace/contents.xcworkspacedata b/ios/SecureEnclaveBench/SecureEnclaveBench.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index d57603f..0000000 --- a/ios/SecureEnclaveBench/SecureEnclaveBench.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/ios/SecureEnclaveBench/SecureEnclaveBench.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/SecureEnclaveBench/SecureEnclaveBench.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/ios/SecureEnclaveBench/SecureEnclaveBench.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/ios/SecureEnclaveBench/SecureEnclaveBench/PwHash.swift b/ios/SecureEnclaveBench/SecureEnclaveBench/PwHash.swift deleted file mode 100644 index 3a488b1..0000000 --- a/ios/SecureEnclaveBench/SecureEnclaveBench/PwHash.swift +++ /dev/null @@ -1,19 +0,0 @@ -import Argon2Swift -import Foundation - -public struct PwHash { - public static func derive(salt: Data, pw: String, l: Int) -> Data { - // OWASP: "Use Argon2id with a minimum configuration of 19 MiB of memory, an iteration count of 2, and 1 degree of parallelism." - let res = try! Argon2Swift.hashPasswordString( - password: pw, - salt: Salt(bytes: salt), - iterations: 2, - memory: 19*1024, // 19 MiB - parallelism: 1, - length: l, - type: Argon2Type.id - ) - - return res.hashData() - } -} diff --git a/ios/SecureEnclaveBench/SecureEnclaveBenchTests/PwHashTests.swift b/ios/SecureEnclaveBench/SecureEnclaveBenchTests/PwHashTests.swift deleted file mode 100644 index 7a9a1a8..0000000 --- a/ios/SecureEnclaveBench/SecureEnclaveBenchTests/PwHashTests.swift +++ /dev/null @@ -1,13 +0,0 @@ -import XCTest - -final class PwHashTests: XCTestCase { - - func testArgon2OutputLengthMatches() throws { - let pw = "test" - let salt = Data(hex: "0123456789ABCDEF0123456789ABCDEF") - - let res = PwHash.derive(salt: salt, pw: pw, l: 42) - - XCTAssertEqual(res.count, 42) - } -} diff --git a/ios/Sloth/.gitignore b/ios/Sloth/.gitignore new file mode 100644 index 0000000..0023a53 --- /dev/null +++ b/ios/Sloth/.gitignore @@ -0,0 +1,8 @@ +.DS_Store +/.build +/Packages +xcuserdata/ +DerivedData/ +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc diff --git a/ios/Sloth/Sloth.xcodeproj/project.pbxproj b/ios/Sloth/Sloth.xcodeproj/project.pbxproj new file mode 100644 index 0000000..98c0bef --- /dev/null +++ b/ios/Sloth/Sloth.xcodeproj/project.pbxproj @@ -0,0 +1,511 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 29AAF9C12B0B55A800E12423 /* SlothApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29AAF9C02B0B55A800E12423 /* SlothApp.swift */; }; + 29AAF9C32B0B55A800E12423 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29AAF9C22B0B55A800E12423 /* ContentView.swift */; }; + 29AAF9C52B0B55A900E12423 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 29AAF9C42B0B55A900E12423 /* Assets.xcassets */; }; + 29AAF9C82B0B55A900E12423 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 29AAF9C72B0B55A900E12423 /* Preview Assets.xcassets */; }; + 29AAF9EE2B0B5FA400E12423 /* RainbowSlothTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29AAF9ED2B0B5FA400E12423 /* RainbowSlothTests.swift */; }; + 29AAF9F02B0B5FF700E12423 /* SecureEnclaveTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29AAF9EF2B0B5FF700E12423 /* SecureEnclaveTests.swift */; }; + 29AAF9F22B0B618300E12423 /* UIDevice.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29AAF9F12B0B618300E12423 /* UIDevice.swift */; }; + 29AAF9F52B0B61AC00E12423 /* RainbowSloth in Frameworks */ = {isa = PBXBuildFile; productRef = 29AAF9F42B0B61AC00E12423 /* RainbowSloth */; }; + 29AAF9F72B0B624200E12423 /* RainbowSloth in Frameworks */ = {isa = PBXBuildFile; productRef = 29AAF9F62B0B624200E12423 /* RainbowSloth */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 29AAF9CE2B0B55A900E12423 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 29AAF9B52B0B55A800E12423 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 29AAF9BC2B0B55A800E12423; + remoteInfo = Sloth; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 29AAF9BD2B0B55A800E12423 /* Sloth.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Sloth.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 29AAF9C02B0B55A800E12423 /* SlothApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SlothApp.swift; sourceTree = ""; }; + 29AAF9C22B0B55A800E12423 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 29AAF9C42B0B55A900E12423 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 29AAF9C72B0B55A900E12423 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 29AAF9CD2B0B55A900E12423 /* SlothTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SlothTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 29AAF9EA2B0B55F300E12423 /* RainbowSloth */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = RainbowSloth; path = ../../RainbowSloth; sourceTree = ""; }; + 29AAF9ED2B0B5FA400E12423 /* RainbowSlothTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RainbowSlothTests.swift; sourceTree = ""; }; + 29AAF9EF2B0B5FF700E12423 /* SecureEnclaveTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecureEnclaveTests.swift; sourceTree = ""; }; + 29AAF9F12B0B618300E12423 /* UIDevice.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIDevice.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 29AAF9BA2B0B55A800E12423 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 29AAF9F52B0B61AC00E12423 /* RainbowSloth in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 29AAF9CA2B0B55A900E12423 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 29AAF9F72B0B624200E12423 /* RainbowSloth in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 29AAF9B42B0B55A800E12423 = { + isa = PBXGroup; + children = ( + 29AAF9BF2B0B55A800E12423 /* Sloth */, + 29AAF9D02B0B55A900E12423 /* SlothTests */, + 29AAF9BE2B0B55A800E12423 /* Products */, + 29AAF9F32B0B61AC00E12423 /* Frameworks */, + ); + sourceTree = ""; + }; + 29AAF9BE2B0B55A800E12423 /* Products */ = { + isa = PBXGroup; + children = ( + 29AAF9BD2B0B55A800E12423 /* Sloth.app */, + 29AAF9CD2B0B55A900E12423 /* SlothTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 29AAF9BF2B0B55A800E12423 /* Sloth */ = { + isa = PBXGroup; + children = ( + 29AAF9EA2B0B55F300E12423 /* RainbowSloth */, + 29AAF9C02B0B55A800E12423 /* SlothApp.swift */, + 29AAF9C22B0B55A800E12423 /* ContentView.swift */, + 29AAF9F12B0B618300E12423 /* UIDevice.swift */, + 29AAF9C42B0B55A900E12423 /* Assets.xcassets */, + 29AAF9C62B0B55A900E12423 /* Preview Content */, + ); + path = Sloth; + sourceTree = ""; + }; + 29AAF9C62B0B55A900E12423 /* Preview Content */ = { + isa = PBXGroup; + children = ( + 29AAF9C72B0B55A900E12423 /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + 29AAF9D02B0B55A900E12423 /* SlothTests */ = { + isa = PBXGroup; + children = ( + 29AAF9ED2B0B5FA400E12423 /* RainbowSlothTests.swift */, + 29AAF9EF2B0B5FF700E12423 /* SecureEnclaveTests.swift */, + ); + path = SlothTests; + sourceTree = ""; + }; + 29AAF9F32B0B61AC00E12423 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 29AAF9BC2B0B55A800E12423 /* Sloth */ = { + isa = PBXNativeTarget; + buildConfigurationList = 29AAF9E12B0B55A900E12423 /* Build configuration list for PBXNativeTarget "Sloth" */; + buildPhases = ( + 29AAF9B92B0B55A800E12423 /* Sources */, + 29AAF9BA2B0B55A800E12423 /* Frameworks */, + 29AAF9BB2B0B55A800E12423 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Sloth; + packageProductDependencies = ( + 29AAF9F42B0B61AC00E12423 /* RainbowSloth */, + ); + productName = Sloth; + productReference = 29AAF9BD2B0B55A800E12423 /* Sloth.app */; + productType = "com.apple.product-type.application"; + }; + 29AAF9CC2B0B55A900E12423 /* SlothTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 29AAF9E42B0B55A900E12423 /* Build configuration list for PBXNativeTarget "SlothTests" */; + buildPhases = ( + 29AAF9C92B0B55A900E12423 /* Sources */, + 29AAF9CA2B0B55A900E12423 /* Frameworks */, + 29AAF9CB2B0B55A900E12423 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 29AAF9CF2B0B55A900E12423 /* PBXTargetDependency */, + ); + name = SlothTests; + packageProductDependencies = ( + 29AAF9F62B0B624200E12423 /* RainbowSloth */, + ); + productName = SlothTests; + productReference = 29AAF9CD2B0B55A900E12423 /* SlothTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29AAF9B52B0B55A800E12423 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1500; + LastUpgradeCheck = 1500; + TargetAttributes = { + 29AAF9BC2B0B55A800E12423 = { + CreatedOnToolsVersion = 15.0.1; + }; + 29AAF9CC2B0B55A900E12423 = { + CreatedOnToolsVersion = 15.0.1; + TestTargetID = 29AAF9BC2B0B55A800E12423; + }; + }; + }; + buildConfigurationList = 29AAF9B82B0B55A800E12423 /* Build configuration list for PBXProject "Sloth" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 29AAF9B42B0B55A800E12423; + productRefGroup = 29AAF9BE2B0B55A800E12423 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 29AAF9BC2B0B55A800E12423 /* Sloth */, + 29AAF9CC2B0B55A900E12423 /* SlothTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 29AAF9BB2B0B55A800E12423 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 29AAF9C82B0B55A900E12423 /* Preview Assets.xcassets in Resources */, + 29AAF9C52B0B55A900E12423 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 29AAF9CB2B0B55A900E12423 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 29AAF9B92B0B55A800E12423 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 29AAF9C32B0B55A800E12423 /* ContentView.swift in Sources */, + 29AAF9F22B0B618300E12423 /* UIDevice.swift in Sources */, + 29AAF9C12B0B55A800E12423 /* SlothApp.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 29AAF9C92B0B55A900E12423 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 29AAF9EE2B0B5FA400E12423 /* RainbowSlothTests.swift in Sources */, + 29AAF9F02B0B5FF700E12423 /* SecureEnclaveTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 29AAF9CF2B0B55A900E12423 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 29AAF9BC2B0B55A800E12423 /* Sloth */; + targetProxy = 29AAF9CE2B0B55A900E12423 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 29AAF9DF2B0B55A900E12423 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 29AAF9E02B0B55A900E12423 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 29AAF9E22B0B55A900E12423 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"Sloth/Preview Content\""; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.lambdapioneer.Sloth; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 29AAF9E32B0B55A900E12423 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"Sloth/Preview Content\""; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.lambdapioneer.Sloth; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 29AAF9E52B0B55A900E12423 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.lambdapioneer.SlothTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Sloth.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Sloth"; + }; + name = Debug; + }; + 29AAF9E62B0B55A900E12423 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.lambdapioneer.SlothTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Sloth.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Sloth"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 29AAF9B82B0B55A800E12423 /* Build configuration list for PBXProject "Sloth" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 29AAF9DF2B0B55A900E12423 /* Debug */, + 29AAF9E02B0B55A900E12423 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 29AAF9E12B0B55A900E12423 /* Build configuration list for PBXNativeTarget "Sloth" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 29AAF9E22B0B55A900E12423 /* Debug */, + 29AAF9E32B0B55A900E12423 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 29AAF9E42B0B55A900E12423 /* Build configuration list for PBXNativeTarget "SlothTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 29AAF9E52B0B55A900E12423 /* Debug */, + 29AAF9E62B0B55A900E12423 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCSwiftPackageProductDependency section */ + 29AAF9F42B0B61AC00E12423 /* RainbowSloth */ = { + isa = XCSwiftPackageProductDependency; + productName = RainbowSloth; + }; + 29AAF9F62B0B624200E12423 /* RainbowSloth */ = { + isa = XCSwiftPackageProductDependency; + productName = RainbowSloth; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = 29AAF9B52B0B55A800E12423 /* Project object */; +} diff --git a/ios/SecureEnclaveBench/SecureEnclaveBench.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Sloth/Sloth.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from ios/SecureEnclaveBench/SecureEnclaveBench.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to ios/Sloth/Sloth.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/ios/SecureEnclaveBench/SecureEnclaveBench.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Sloth/Sloth.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from ios/SecureEnclaveBench/SecureEnclaveBench.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to ios/Sloth/Sloth.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/ios/Sloth/Sloth.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ios/Sloth/Sloth.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..306373d --- /dev/null +++ b/ios/Sloth/Sloth.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,14 @@ +{ + "pins" : [ + { + "identity" : "swift-sodium", + "kind" : "remoteSourceControl", + "location" : "https://github.com/jedisct1/swift-sodium.git", + "state" : { + "revision" : "4f9164a0a2c9a6a7ff53a2833d54a5c79c957342", + "version" : "0.9.1" + } + } + ], + "version" : 2 +} diff --git a/ios/SecureEnclaveBench/SecureEnclaveBench/Assets.xcassets/AccentColor.colorset/Contents.json b/ios/Sloth/Sloth/Assets.xcassets/AccentColor.colorset/Contents.json similarity index 100% rename from ios/SecureEnclaveBench/SecureEnclaveBench/Assets.xcassets/AccentColor.colorset/Contents.json rename to ios/Sloth/Sloth/Assets.xcassets/AccentColor.colorset/Contents.json diff --git a/ios/SecureEnclaveBench/SecureEnclaveBench/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Sloth/Sloth/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from ios/SecureEnclaveBench/SecureEnclaveBench/Assets.xcassets/AppIcon.appiconset/Contents.json rename to ios/Sloth/Sloth/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/ios/SecureEnclaveBench/SecureEnclaveBench/Assets.xcassets/Contents.json b/ios/Sloth/Sloth/Assets.xcassets/Contents.json similarity index 100% rename from ios/SecureEnclaveBench/SecureEnclaveBench/Assets.xcassets/Contents.json rename to ios/Sloth/Sloth/Assets.xcassets/Contents.json diff --git a/ios/SecureEnclaveBench/SecureEnclaveBench/ContentView.swift b/ios/Sloth/Sloth/ContentView.swift similarity index 72% rename from ios/SecureEnclaveBench/SecureEnclaveBench/ContentView.swift rename to ios/Sloth/Sloth/ContentView.swift index 43e9482..2a50669 100644 --- a/ios/SecureEnclaveBench/SecureEnclaveBench/ContentView.swift +++ b/ios/Sloth/Sloth/ContentView.swift @@ -1,3 +1,4 @@ +import RainbowSloth import SwiftUI func runExperiment(experiment: String, n: Int, iterations: Int) throws -> [Double] { @@ -34,7 +35,9 @@ func backgroundWork(experiment: String, n: Int, iterations: Int) throws -> Strin let jsonData = try! JSONSerialization.data(withJSONObject: json) debugPrint("json", json) - // CHANGE THIS LINE TO YOUR SERVER! + // + // --> CHANGE ME <-- + // let url = URL(string: "http://127.0.0.1:8080/ios-report")! // upload @@ -62,27 +65,34 @@ struct ContentView: View { @State var taskOutput = "ready" var body: some View { - VStack { + VStack(alignment: .leading) { + Spacer() + Text("Rainbow Sloth 🦥").font(.title) + Spacer() + + Text("Experiment to run:").font(.headline) Picker("Experiment", selection: $taskSelection, content: { Text("SE-OP").tag("seop") Text("RainbowSloth").tag("sloth") }).disabled(isRunning) - - TextField("N", text:Binding( - get: { String(n) }, - set: { n = Int($0) ?? 1 } - )) - .keyboardType(.numberPad) - .disabled(taskSelection != "sloth") - - Picker("How many iterations", selection: $iterations, content: { - Text("Iterations: 1").tag(1) - Text("Iterations: 10").tag(10) - Text("Iterations: 100").tag(100) - Text("Iterations: 1000").tag(1000) + + Text("Rainbow parameter n:").font(.headline) + Picker("Rainbow parameter n", selection: $n, content: { + Text("1").tag(1) + Text("10").tag(10) + Text("100").tag(100) + Text("1000").tag(1000) + }).disabled(isRunning || taskSelection != "sloth") + + Text("Number of experiment iterations:").font(.headline) + Picker("Number of experiment iterations", selection: $iterations, content: { + Text("1").tag(1) + Text("10").tag(10) + Text("100").tag(100) + Text("1000").tag(1000) }).disabled(isRunning) - - Button("Action") { + + Button("Start run") { taskOutput = "started" isRunning = true let dispatchQueue = DispatchQueue.global(qos: .background) @@ -90,7 +100,7 @@ struct ContentView: View { do{ let output = try backgroundWork( experiment: taskSelection, - n: n, + n: Int(n), iterations: Int(iterations) ) DispatchQueue.main.async { @@ -104,18 +114,21 @@ struct ContentView: View { } } } - }.padding().disabled(isRunning) + } + .buttonStyle(.borderedProminent) + .padding().disabled(isRunning) + + Text("Status/output:").font(.headline) if isRunning { ProgressView() } - Text(taskOutput).padding() + Text(taskOutput) + Spacer() } .padding() } } -struct ContentView_Previews: PreviewProvider { - static var previews: some View { - ContentView() - } +#Preview { + ContentView() } diff --git a/ios/SecureEnclaveBench/SecureEnclaveBench/Preview Content/Preview Assets.xcassets/Contents.json b/ios/Sloth/Sloth/Preview Content/Preview Assets.xcassets/Contents.json similarity index 100% rename from ios/SecureEnclaveBench/SecureEnclaveBench/Preview Content/Preview Assets.xcassets/Contents.json rename to ios/Sloth/Sloth/Preview Content/Preview Assets.xcassets/Contents.json diff --git a/ios/SecureEnclaveBench/SecureEnclaveBench/SecureEnclaveBenchApp.swift b/ios/Sloth/Sloth/SlothApp.swift similarity index 76% rename from ios/SecureEnclaveBench/SecureEnclaveBench/SecureEnclaveBenchApp.swift rename to ios/Sloth/Sloth/SlothApp.swift index 063100e..6ac4c1c 100644 --- a/ios/SecureEnclaveBench/SecureEnclaveBench/SecureEnclaveBenchApp.swift +++ b/ios/Sloth/Sloth/SlothApp.swift @@ -1,7 +1,7 @@ import SwiftUI @main -struct SecureEnclaveBenchApp: App { +struct SlothApp: App { var body: some Scene { WindowGroup { ContentView() diff --git a/ios/SecureEnclaveBench/SecureEnclaveBench/UIDevice.swift b/ios/Sloth/Sloth/UIDevice.swift similarity index 100% rename from ios/SecureEnclaveBench/SecureEnclaveBench/UIDevice.swift rename to ios/Sloth/Sloth/UIDevice.swift diff --git a/ios/SecureEnclaveBench/SecureEnclaveBenchTests/RainbowSlothTests.swift b/ios/Sloth/SlothTests/RainbowSlothTests.swift similarity index 95% rename from ios/SecureEnclaveBench/SecureEnclaveBenchTests/RainbowSlothTests.swift rename to ios/Sloth/SlothTests/RainbowSlothTests.swift index 5b7c1e4..6f56fc8 100644 --- a/ios/SecureEnclaveBench/SecureEnclaveBenchTests/RainbowSlothTests.swift +++ b/ios/Sloth/SlothTests/RainbowSlothTests.swift @@ -1,5 +1,7 @@ +import RainbowSloth import XCTest +/// These tests must live in a target of an app to get the right entitlements to access the key chain / SecureEnclave. final class RainbowSlothTests: XCTestCase { func testWorksWithLargeN() throws { diff --git a/ios/SecureEnclaveBench/SecureEnclaveBenchTests/SecureEnclaveTests.swift b/ios/Sloth/SlothTests/SecureEnclaveTests.swift similarity index 92% rename from ios/SecureEnclaveBench/SecureEnclaveBenchTests/SecureEnclaveTests.swift rename to ios/Sloth/SlothTests/SecureEnclaveTests.swift index 76782d2..f8b36f6 100644 --- a/ios/SecureEnclaveBench/SecureEnclaveBenchTests/SecureEnclaveTests.swift +++ b/ios/Sloth/SlothTests/SecureEnclaveTests.swift @@ -1,5 +1,7 @@ +import RainbowSloth import XCTest +/// These tests must live in a target of an app to get the right entitlements to access the key chain / SecureEnclave. final class SecureEnclaveTests: XCTestCase { func testKeyGenAndEcdh() throws { diff --git a/ios/build_artifacts.sh b/ios/build_artifacts.sh deleted file mode 100755 index 8544d04..0000000 --- a/ios/build_artifacts.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -set -e - -mkdir -p Artifacts; -rm -rf Artifacts/*; - -cd SecureEnclaveBench; - -xcodebuild clean -workspace SecureEnclaveBench.xcworkspace -scheme SecureEnclaveBench; -xcodebuild build -workspace SecureEnclaveBench.xcworkspace -scheme SecureEnclaveBench; -xcodebuild archive -workspace SecureEnclaveBench.xcworkspace -scheme SecureEnclaveBench -archivePath ../Artifacts/SecureEnclaveBench.xcarchive; -xcodebuild -exportArchive -archivePath ../Artifacts/SecureEnclaveBench.xcarchive -exportOptionsPlist ../ExportOptions.plist -exportPath ../Artifacts; diff --git a/ios/docs/screenshot-framed.png b/ios/docs/screenshot-framed.png new file mode 100644 index 0000000..cb2443b Binary files /dev/null and b/ios/docs/screenshot-framed.png differ