Update repositories
This commit is contained in:
parent
06e500809d
commit
e3e7b29846
11
.gitignore
vendored
11
.gitignore
vendored
@ -1,2 +1,13 @@
|
||||
.DS_Store
|
||||
|
||||
## User settings
|
||||
xcuserdata
|
||||
|
||||
## Xcode Patch
|
||||
*.xcodeproj/*
|
||||
!*.xcodeproj/project.pbxproj
|
||||
!*.xcodeproj/xcshareddata/
|
||||
!*.xcworkspace/contents.xcworkspacedata
|
||||
/*.gcno
|
||||
|
||||
Pods
|
||||
|
||||
0
.gitmodules
vendored
0
.gitmodules
vendored
3
Examples/ZKGroup-iOS-Example/Gemfile
Normal file
3
Examples/ZKGroup-iOS-Example/Gemfile
Normal file
@ -0,0 +1,3 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
gem 'cocoapods'
|
||||
76
Examples/ZKGroup-iOS-Example/Gemfile.lock
Normal file
76
Examples/ZKGroup-iOS-Example/Gemfile.lock
Normal file
@ -0,0 +1,76 @@
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
CFPropertyList (3.0.0)
|
||||
activesupport (4.2.11.1)
|
||||
i18n (~> 0.7)
|
||||
minitest (~> 5.1)
|
||||
thread_safe (~> 0.3, >= 0.3.4)
|
||||
tzinfo (~> 1.1)
|
||||
atomos (0.1.3)
|
||||
claide (1.0.2)
|
||||
cocoapods (1.7.0)
|
||||
activesupport (>= 4.0.2, < 5)
|
||||
claide (>= 1.0.2, < 2.0)
|
||||
cocoapods-core (= 1.7.0)
|
||||
cocoapods-deintegrate (>= 1.0.3, < 2.0)
|
||||
cocoapods-downloader (>= 1.2.2, < 2.0)
|
||||
cocoapods-plugins (>= 1.0.0, < 2.0)
|
||||
cocoapods-search (>= 1.0.0, < 2.0)
|
||||
cocoapods-stats (>= 1.0.0, < 2.0)
|
||||
cocoapods-trunk (>= 1.3.1, < 2.0)
|
||||
cocoapods-try (>= 1.1.0, < 2.0)
|
||||
colored2 (~> 3.1)
|
||||
escape (~> 0.0.4)
|
||||
fourflusher (>= 2.2.0, < 3.0)
|
||||
gh_inspector (~> 1.0)
|
||||
molinillo (~> 0.6.6)
|
||||
nap (~> 1.0)
|
||||
ruby-macho (~> 1.4)
|
||||
xcodeproj (>= 1.8.2, < 2.0)
|
||||
cocoapods-core (1.7.0)
|
||||
activesupport (>= 4.0.2, < 6)
|
||||
fuzzy_match (~> 2.0.4)
|
||||
nap (~> 1.0)
|
||||
cocoapods-deintegrate (1.0.4)
|
||||
cocoapods-downloader (1.2.2)
|
||||
cocoapods-plugins (1.0.0)
|
||||
nap
|
||||
cocoapods-search (1.0.0)
|
||||
cocoapods-stats (1.1.0)
|
||||
cocoapods-trunk (1.3.1)
|
||||
nap (>= 0.8, < 2.0)
|
||||
netrc (~> 0.11)
|
||||
cocoapods-try (1.1.0)
|
||||
colored2 (3.1.2)
|
||||
concurrent-ruby (1.1.5)
|
||||
escape (0.0.4)
|
||||
fourflusher (2.2.0)
|
||||
fuzzy_match (2.0.4)
|
||||
gh_inspector (1.1.3)
|
||||
i18n (0.9.5)
|
||||
concurrent-ruby (~> 1.0)
|
||||
minitest (5.11.3)
|
||||
molinillo (0.6.6)
|
||||
nanaimo (0.2.6)
|
||||
nap (1.1.0)
|
||||
netrc (0.11.0)
|
||||
ruby-macho (1.4.0)
|
||||
thread_safe (0.3.6)
|
||||
tzinfo (1.2.5)
|
||||
thread_safe (~> 0.1)
|
||||
xcodeproj (1.9.0)
|
||||
CFPropertyList (>= 2.3.3, < 4.0)
|
||||
atomos (~> 0.1.3)
|
||||
claide (>= 1.0.2, < 2.0)
|
||||
colored2 (~> 3.1)
|
||||
nanaimo (~> 0.2.6)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
cocoapods
|
||||
|
||||
BUNDLED WITH
|
||||
1.16.2
|
||||
23
Examples/ZKGroup-iOS-Example/Podfile
Normal file
23
Examples/ZKGroup-iOS-Example/Podfile
Normal file
@ -0,0 +1,23 @@
|
||||
# Uncomment the next line to define a global platform for your project
|
||||
platform :ios, '9.0'
|
||||
|
||||
target 'ZKGroup-iOS-Example' do
|
||||
# Comment the next line if you don't want to use dynamic frameworks
|
||||
use_frameworks!
|
||||
|
||||
# Pods for ZKGroup-iOS-Example
|
||||
pod 'ZKGroup', path: '../../', testspecs: ['Tests']
|
||||
|
||||
target 'ZKGroup-iOS-ExampleTests' do
|
||||
inherit! :search_paths
|
||||
# Pods for testing
|
||||
end
|
||||
end
|
||||
|
||||
post_install do |installer|
|
||||
installer.pods_project.targets.each do |target|
|
||||
target.build_configurations.each do |config|
|
||||
config.build_settings['ENABLE_BITCODE'] = 'NO'
|
||||
end
|
||||
end
|
||||
end
|
||||
18
Examples/ZKGroup-iOS-Example/Podfile.lock
Normal file
18
Examples/ZKGroup-iOS-Example/Podfile.lock
Normal file
@ -0,0 +1,18 @@
|
||||
PODS:
|
||||
- ZKGroup (0.0.1)
|
||||
- ZKGroup/Tests (0.0.1)
|
||||
|
||||
DEPENDENCIES:
|
||||
- ZKGroup (from `../../`)
|
||||
- ZKGroup/Tests (from `../../`)
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
ZKGroup:
|
||||
:path: "../../"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
ZKGroup: 6277db4b7c2e10a530b584bf27d9b070b3412e7d
|
||||
|
||||
PODFILE CHECKSUM: 414c9fc1061997b0c9119f9418fd0079a3f3dae5
|
||||
|
||||
COCOAPODS: 1.7.0
|
||||
7
Examples/ZKGroup-iOS-Example/README.md
Normal file
7
Examples/ZKGroup-iOS-Example/README.md
Normal file
@ -0,0 +1,7 @@
|
||||
# Installation
|
||||
|
||||
Assuming you already have bundler and cocoapods installed
|
||||
|
||||
bundle exec pod install
|
||||
open ZKGroup-iOS-Example.xcworkspace
|
||||
|
||||
@ -0,0 +1,593 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 51;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
4CFFA516229F192A00B36CB4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CFFA515229F192A00B36CB4 /* AppDelegate.swift */; };
|
||||
4CFFA518229F192A00B36CB4 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CFFA517229F192A00B36CB4 /* ViewController.swift */; };
|
||||
4CFFA51B229F192A00B36CB4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4CFFA519229F192A00B36CB4 /* Main.storyboard */; };
|
||||
4CFFA51D229F192C00B36CB4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4CFFA51C229F192C00B36CB4 /* Assets.xcassets */; };
|
||||
4CFFA520229F192C00B36CB4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4CFFA51E229F192C00B36CB4 /* LaunchScreen.storyboard */; };
|
||||
4CFFA52B229F192C00B36CB4 /* ZKGroup_iOS_ExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CFFA52A229F192C00B36CB4 /* ZKGroup_iOS_ExampleTests.swift */; };
|
||||
C14A374B051250FD083766A8 /* Pods_ZKGroup_iOS_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9BC944EC44AB00A281642AAD /* Pods_ZKGroup_iOS_Example.framework */; };
|
||||
CA91E7CFD2B989AB0854B995 /* Pods_ZKGroup_iOS_ExampleTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BA58EE2DE59E6333F2BE1AB2 /* Pods_ZKGroup_iOS_ExampleTests.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
4CFFA527229F192C00B36CB4 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 4CFFA50A229F192A00B36CB4 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 4CFFA511229F192A00B36CB4;
|
||||
remoteInfo = "ZKGroup-iOS-Example";
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
04C8ACD0C0CC9B5F0019BB68 /* Pods-ZKGroup-iOS-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZKGroup-iOS-Example.debug.xcconfig"; path = "Target Support Files/Pods-ZKGroup-iOS-Example/Pods-ZKGroup-iOS-Example.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
22F46609A120248B07FFAFFF /* Pods-ZKGroup-iOS-ExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZKGroup-iOS-ExampleTests.release.xcconfig"; path = "Target Support Files/Pods-ZKGroup-iOS-ExampleTests/Pods-ZKGroup-iOS-ExampleTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
2FB92BE856F6237F647BB460 /* Pods-ZKGroup-iOS-ExampleUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZKGroup-iOS-ExampleUITests.debug.xcconfig"; path = "Target Support Files/Pods-ZKGroup-iOS-ExampleUITests/Pods-ZKGroup-iOS-ExampleUITests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
3822D1C06EF4D67B87FAD204 /* Pods-ZKGroup-iOS-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZKGroup-iOS-Example.release.xcconfig"; path = "Target Support Files/Pods-ZKGroup-iOS-Example/Pods-ZKGroup-iOS-Example.release.xcconfig"; sourceTree = "<group>"; };
|
||||
3AE78FBC0366BB158AE10B68 /* Pods_ZKGroup_iOS_ExampleUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ZKGroup_iOS_ExampleUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
4CFFA512229F192A00B36CB4 /* ZKGroup-iOS-Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ZKGroup-iOS-Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
4CFFA515229F192A00B36CB4 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
4CFFA517229F192A00B36CB4 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
|
||||
4CFFA51A229F192A00B36CB4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
4CFFA51C229F192C00B36CB4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
4CFFA51F229F192C00B36CB4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
4CFFA521229F192C00B36CB4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
4CFFA526229F192C00B36CB4 /* ZKGroup-iOS-ExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ZKGroup-iOS-ExampleTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
4CFFA52A229F192C00B36CB4 /* ZKGroup_iOS_ExampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZKGroup_iOS_ExampleTests.swift; sourceTree = "<group>"; };
|
||||
4CFFA52C229F192C00B36CB4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
4CFFA535229F192C00B36CB4 /* ZKGroup_iOS_ExampleUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZKGroup_iOS_ExampleUITests.swift; sourceTree = "<group>"; };
|
||||
4CFFA537229F192C00B36CB4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
686BE7CC2165EB321C6D0477 /* Pods-ZKGroup-iOS-ExampleUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZKGroup-iOS-ExampleUITests.release.xcconfig"; path = "Target Support Files/Pods-ZKGroup-iOS-ExampleUITests/Pods-ZKGroup-iOS-ExampleUITests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
9BC944EC44AB00A281642AAD /* Pods_ZKGroup_iOS_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ZKGroup_iOS_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
BA58EE2DE59E6333F2BE1AB2 /* Pods_ZKGroup_iOS_ExampleTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ZKGroup_iOS_ExampleTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D199420EBA7ED2BF51567348 /* Pods-ZKGroup-iOS-ExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZKGroup-iOS-ExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-ZKGroup-iOS-ExampleTests/Pods-ZKGroup-iOS-ExampleTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
4CFFA50F229F192A00B36CB4 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
C14A374B051250FD083766A8 /* Pods_ZKGroup_iOS_Example.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
4CFFA523229F192C00B36CB4 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
CA91E7CFD2B989AB0854B995 /* Pods_ZKGroup_iOS_ExampleTests.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
11DCAF2407FC6B3568C789F9 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9BC944EC44AB00A281642AAD /* Pods_ZKGroup_iOS_Example.framework */,
|
||||
BA58EE2DE59E6333F2BE1AB2 /* Pods_ZKGroup_iOS_ExampleTests.framework */,
|
||||
3AE78FBC0366BB158AE10B68 /* Pods_ZKGroup_iOS_ExampleUITests.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4CFFA509229F192A00B36CB4 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4CFFA514229F192A00B36CB4 /* ZKGroup-iOS-Example */,
|
||||
4CFFA529229F192C00B36CB4 /* ZKGroup-iOS-ExampleTests */,
|
||||
4CFFA534229F192C00B36CB4 /* ZKGroup-iOS-ExampleUITests */,
|
||||
4CFFA513229F192A00B36CB4 /* Products */,
|
||||
CFA94523934DD8FA4ED8A965 /* Pods */,
|
||||
11DCAF2407FC6B3568C789F9 /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4CFFA513229F192A00B36CB4 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4CFFA512229F192A00B36CB4 /* ZKGroup-iOS-Example.app */,
|
||||
4CFFA526229F192C00B36CB4 /* ZKGroup-iOS-ExampleTests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4CFFA514229F192A00B36CB4 /* ZKGroup-iOS-Example */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4CFFA515229F192A00B36CB4 /* AppDelegate.swift */,
|
||||
4CFFA517229F192A00B36CB4 /* ViewController.swift */,
|
||||
4CFFA519229F192A00B36CB4 /* Main.storyboard */,
|
||||
4CFFA51C229F192C00B36CB4 /* Assets.xcassets */,
|
||||
4CFFA51E229F192C00B36CB4 /* LaunchScreen.storyboard */,
|
||||
4CFFA521229F192C00B36CB4 /* Info.plist */,
|
||||
);
|
||||
path = "ZKGroup-iOS-Example";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4CFFA529229F192C00B36CB4 /* ZKGroup-iOS-ExampleTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4CFFA52A229F192C00B36CB4 /* ZKGroup_iOS_ExampleTests.swift */,
|
||||
4CFFA52C229F192C00B36CB4 /* Info.plist */,
|
||||
);
|
||||
path = "ZKGroup-iOS-ExampleTests";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4CFFA534229F192C00B36CB4 /* ZKGroup-iOS-ExampleUITests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4CFFA535229F192C00B36CB4 /* ZKGroup_iOS_ExampleUITests.swift */,
|
||||
4CFFA537229F192C00B36CB4 /* Info.plist */,
|
||||
);
|
||||
path = "ZKGroup-iOS-ExampleUITests";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
CFA94523934DD8FA4ED8A965 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
04C8ACD0C0CC9B5F0019BB68 /* Pods-ZKGroup-iOS-Example.debug.xcconfig */,
|
||||
3822D1C06EF4D67B87FAD204 /* Pods-ZKGroup-iOS-Example.release.xcconfig */,
|
||||
D199420EBA7ED2BF51567348 /* Pods-ZKGroup-iOS-ExampleTests.debug.xcconfig */,
|
||||
22F46609A120248B07FFAFFF /* Pods-ZKGroup-iOS-ExampleTests.release.xcconfig */,
|
||||
2FB92BE856F6237F647BB460 /* Pods-ZKGroup-iOS-ExampleUITests.debug.xcconfig */,
|
||||
686BE7CC2165EB321C6D0477 /* Pods-ZKGroup-iOS-ExampleUITests.release.xcconfig */,
|
||||
);
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
4CFFA511229F192A00B36CB4 /* ZKGroup-iOS-Example */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 4CFFA53A229F192C00B36CB4 /* Build configuration list for PBXNativeTarget "ZKGroup-iOS-Example" */;
|
||||
buildPhases = (
|
||||
2C724A2B9D16BD255CAA0550 /* [CP] Check Pods Manifest.lock */,
|
||||
4CFFA50E229F192A00B36CB4 /* Sources */,
|
||||
4CFFA50F229F192A00B36CB4 /* Frameworks */,
|
||||
4CFFA510229F192A00B36CB4 /* Resources */,
|
||||
5FAC15DF92F4E0DEDBB1A49D /* [CP] Embed Pods Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "ZKGroup-iOS-Example";
|
||||
productName = "ZKGroup-iOS-Example";
|
||||
productReference = 4CFFA512229F192A00B36CB4 /* ZKGroup-iOS-Example.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
4CFFA525229F192C00B36CB4 /* ZKGroup-iOS-ExampleTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 4CFFA53D229F192C00B36CB4 /* Build configuration list for PBXNativeTarget "ZKGroup-iOS-ExampleTests" */;
|
||||
buildPhases = (
|
||||
1B4679C274B476C07167DE00 /* [CP] Check Pods Manifest.lock */,
|
||||
4CFFA522229F192C00B36CB4 /* Sources */,
|
||||
4CFFA523229F192C00B36CB4 /* Frameworks */,
|
||||
4CFFA524229F192C00B36CB4 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
4CFFA528229F192C00B36CB4 /* PBXTargetDependency */,
|
||||
);
|
||||
name = "ZKGroup-iOS-ExampleTests";
|
||||
productName = "ZKGroup-iOS-ExampleTests";
|
||||
productReference = 4CFFA526229F192C00B36CB4 /* ZKGroup-iOS-ExampleTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
4CFFA50A229F192A00B36CB4 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 1020;
|
||||
LastUpgradeCheck = 1020;
|
||||
ORGANIZATIONNAME = "Signal Messenger";
|
||||
TargetAttributes = {
|
||||
4CFFA511229F192A00B36CB4 = {
|
||||
CreatedOnToolsVersion = 10.2;
|
||||
};
|
||||
4CFFA525229F192C00B36CB4 = {
|
||||
CreatedOnToolsVersion = 10.2;
|
||||
TestTargetID = 4CFFA511229F192A00B36CB4;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 4CFFA50D229F192A00B36CB4 /* Build configuration list for PBXProject "ZKGroup-iOS-Example" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 4CFFA509229F192A00B36CB4;
|
||||
productRefGroup = 4CFFA513229F192A00B36CB4 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
4CFFA511229F192A00B36CB4 /* ZKGroup-iOS-Example */,
|
||||
4CFFA525229F192C00B36CB4 /* ZKGroup-iOS-ExampleTests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
4CFFA510229F192A00B36CB4 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4CFFA520229F192C00B36CB4 /* LaunchScreen.storyboard in Resources */,
|
||||
4CFFA51D229F192C00B36CB4 /* Assets.xcassets in Resources */,
|
||||
4CFFA51B229F192A00B36CB4 /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
4CFFA524229F192C00B36CB4 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
1B4679C274B476C07167DE00 /* [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-ZKGroup-iOS-ExampleTests-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;
|
||||
};
|
||||
2C724A2B9D16BD255CAA0550 /* [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-ZKGroup-iOS-Example-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;
|
||||
};
|
||||
5FAC15DF92F4E0DEDBB1A49D /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-ZKGroup-iOS-Example/Pods-ZKGroup-iOS-Example-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-ZKGroup-iOS-Example/Pods-ZKGroup-iOS-Example-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ZKGroup-iOS-Example/Pods-ZKGroup-iOS-Example-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
4CFFA50E229F192A00B36CB4 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4CFFA518229F192A00B36CB4 /* ViewController.swift in Sources */,
|
||||
4CFFA516229F192A00B36CB4 /* AppDelegate.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
4CFFA522229F192C00B36CB4 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4CFFA52B229F192C00B36CB4 /* ZKGroup_iOS_ExampleTests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
4CFFA528229F192C00B36CB4 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 4CFFA511229F192A00B36CB4 /* ZKGroup-iOS-Example */;
|
||||
targetProxy = 4CFFA527229F192C00B36CB4 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
4CFFA519229F192A00B36CB4 /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
4CFFA51A229F192A00B36CB4 /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4CFFA51E229F192C00B36CB4 /* LaunchScreen.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
4CFFA51F229F192C00B36CB4 /* Base */,
|
||||
);
|
||||
name = LaunchScreen.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
4CFFA538229F192C00B36CB4 /* 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++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
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_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;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_BITCODE = NO;
|
||||
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 = 9.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;
|
||||
};
|
||||
4CFFA539229F192C00B36CB4 /* 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++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
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_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;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_BITCODE = NO;
|
||||
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 = 9.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;
|
||||
};
|
||||
4CFFA53B229F192C00B36CB4 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 04C8ACD0C0CC9B5F0019BB68 /* Pods-ZKGroup-iOS-Example.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = U68MSDN6DR;
|
||||
INFOPLIST_FILE = "ZKGroup-iOS-Example/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.whispersystems.ZKGroup-iOS-Example";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
4CFFA53C229F192C00B36CB4 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 3822D1C06EF4D67B87FAD204 /* Pods-ZKGroup-iOS-Example.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = U68MSDN6DR;
|
||||
INFOPLIST_FILE = "ZKGroup-iOS-Example/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.whispersystems.ZKGroup-iOS-Example";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
4CFFA53E229F192C00B36CB4 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = D199420EBA7ED2BF51567348 /* Pods-ZKGroup-iOS-ExampleTests.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = U68MSDN6DR;
|
||||
INFOPLIST_FILE = "ZKGroup-iOS-ExampleTests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.whispersystems.ZKGroup-iOS-ExampleTests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ZKGroup-iOS-Example.app/ZKGroup-iOS-Example";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
4CFFA53F229F192C00B36CB4 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 22F46609A120248B07FFAFFF /* Pods-ZKGroup-iOS-ExampleTests.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = U68MSDN6DR;
|
||||
INFOPLIST_FILE = "ZKGroup-iOS-ExampleTests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.whispersystems.ZKGroup-iOS-ExampleTests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ZKGroup-iOS-Example.app/ZKGroup-iOS-Example";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
4CFFA50D229F192A00B36CB4 /* Build configuration list for PBXProject "ZKGroup-iOS-Example" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
4CFFA538229F192C00B36CB4 /* Debug */,
|
||||
4CFFA539229F192C00B36CB4 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
4CFFA53A229F192C00B36CB4 /* Build configuration list for PBXNativeTarget "ZKGroup-iOS-Example" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
4CFFA53B229F192C00B36CB4 /* Debug */,
|
||||
4CFFA53C229F192C00B36CB4 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
4CFFA53D229F192C00B36CB4 /* Build configuration list for PBXNativeTarget "ZKGroup-iOS-ExampleTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
4CFFA53E229F192C00B36CB4 /* Debug */,
|
||||
4CFFA53F229F192C00B36CB4 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 4CFFA50A229F192A00B36CB4 /* Project object */;
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:ZKGroup-iOS-Example.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -0,0 +1,111 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "4CFFA511229F192A00B36CB4"
|
||||
BuildableName = "ZKGroup-iOS-Example.app"
|
||||
BlueprintName = "ZKGroup-iOS-Example"
|
||||
ReferencedContainer = "container:ZKGroup-iOS-Example.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "4CFFA525229F192C00B36CB4"
|
||||
BuildableName = "ZKGroup-iOS-ExampleTests.xctest"
|
||||
BlueprintName = "ZKGroup-iOS-ExampleTests"
|
||||
ReferencedContainer = "container:ZKGroup-iOS-Example.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "74445091919E2B587DB292710A614AE9"
|
||||
BuildableName = "ZKGroup-Unit-Tests.xctest"
|
||||
BlueprintName = "ZKGroup-Unit-Tests"
|
||||
ReferencedContainer = "container:Pods/Pods.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "4CFFA511229F192A00B36CB4"
|
||||
BuildableName = "ZKGroup-iOS-Example.app"
|
||||
BlueprintName = "ZKGroup-iOS-Example"
|
||||
ReferencedContainer = "container:ZKGroup-iOS-Example.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "4CFFA511229F192A00B36CB4"
|
||||
BuildableName = "ZKGroup-iOS-Example.app"
|
||||
BlueprintName = "ZKGroup-iOS-Example"
|
||||
ReferencedContainer = "container:ZKGroup-iOS-Example.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "4CFFA511229F192A00B36CB4"
|
||||
BuildableName = "ZKGroup-iOS-Example.app"
|
||||
BlueprintName = "ZKGroup-iOS-Example"
|
||||
ReferencedContainer = "container:ZKGroup-iOS-Example.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
10
Examples/ZKGroup-iOS-Example/ZKGroup-iOS-Example.xcworkspace/contents.xcworkspacedata
generated
Normal file
10
Examples/ZKGroup-iOS-Example/ZKGroup-iOS-Example.xcworkspace/contents.xcworkspacedata
generated
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:ZKGroup-iOS-Example.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:Pods/Pods.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -0,0 +1,39 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
@UIApplicationMain
|
||||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
|
||||
var window: UIWindow?
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
||||
// Override point for customization after application launch.
|
||||
return true
|
||||
}
|
||||
|
||||
func applicationWillResignActive(_ application: UIApplication) {
|
||||
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
||||
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
|
||||
}
|
||||
|
||||
func applicationDidEnterBackground(_ application: UIApplication) {
|
||||
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
||||
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
|
||||
}
|
||||
|
||||
func applicationWillEnterForeground(_ application: UIApplication) {
|
||||
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
|
||||
}
|
||||
|
||||
func applicationDidBecomeActive(_ application: UIApplication) {
|
||||
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
||||
}
|
||||
|
||||
func applicationWillTerminate(_ application: UIApplication) {
|
||||
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,98 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "20x20",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "20x20",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "20x20",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "20x20",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "29x29",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "29x29",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "40x40",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "40x40",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "76x76",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "76x76",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "83.5x83.5",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ios-marketing",
|
||||
"size" : "1024x1024",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="EHf-IW-A2E">
|
||||
<objects>
|
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="53" y="375"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
45
Examples/ZKGroup-iOS-Example/ZKGroup-iOS-Example/Info.plist
Normal file
45
Examples/ZKGroup-iOS-Example/ZKGroup-iOS-Example/Info.plist
Normal file
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -0,0 +1,18 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import ZKGroup
|
||||
|
||||
class ViewController: UIViewController {
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
let input: [UInt8] = [1, 2, 3]
|
||||
let output = example(bytes: input)
|
||||
print("example input: \(input) -> output: \(output)")
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -0,0 +1,30 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
@testable import ZKGroup_iOS_Example
|
||||
|
||||
class ZKGroup_iOS_ExampleTests: XCTestCase {
|
||||
|
||||
override func setUp() {
|
||||
// Put setup code here. This method is called before the invocation of each test method in the class.
|
||||
}
|
||||
|
||||
override func tearDown() {
|
||||
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
||||
}
|
||||
|
||||
func testExample() {
|
||||
// This is an example of a functional test case.
|
||||
// Use XCTAssert and related functions to verify your tests produce the correct results.
|
||||
}
|
||||
|
||||
func testPerformanceExample() {
|
||||
// This is an example of a performance test case.
|
||||
self.measure {
|
||||
// Put the code you want to measure the time of here.
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -0,0 +1,30 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
|
||||
class ZKGroup_iOS_ExampleUITests: XCTestCase {
|
||||
|
||||
override func setUp() {
|
||||
// Put setup code here. This method is called before the invocation of each test method in the class.
|
||||
|
||||
// In UI tests it is usually best to stop immediately when a failure occurs.
|
||||
continueAfterFailure = false
|
||||
|
||||
// UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
|
||||
XCUIApplication().launch()
|
||||
|
||||
// In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
|
||||
}
|
||||
|
||||
override func tearDown() {
|
||||
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
||||
}
|
||||
|
||||
func testExample() {
|
||||
// Use recording to get started writing UI tests.
|
||||
// Use XCTAssert and related functions to verify your tests produce the correct results.
|
||||
}
|
||||
|
||||
}
|
||||
7
LICENSE
7
LICENSE
@ -1,3 +1,9 @@
|
||||
This software is provided under:
|
||||
|
||||
SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
The complete license text:
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
@ -619,3 +625,4 @@ Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
|
||||
8
README.md
Normal file
8
README.md
Normal file
@ -0,0 +1,8 @@
|
||||
# zkgroup
|
||||
|
||||
This is some incomplete code used for testing.
|
||||
|
||||
Most of the cryptography is not implemented so the code is COMPLETELY INSECURE and must not be used.
|
||||
|
||||
|
||||
|
||||
@ -8,17 +8,24 @@
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "ZKGroup"
|
||||
s.version = "0.0.1"
|
||||
s.version = "0.4.0"
|
||||
s.summary = "Swift API for the Rust zkgroup crate."
|
||||
s.homepage = "https://signal.org/"
|
||||
s.license = { :type => "GPLv3", :file => "LICENSE" }
|
||||
s.authors = { "Signal iOS" => "ios@signal.org" }
|
||||
s.source = { :git => "https://github.com/signalapp/signal-groupzk-swift.git", :tag => "#{s.version}" }
|
||||
|
||||
s.ios.deployment_target = "8.0"
|
||||
s.ios.deployment_target = "10.0"
|
||||
|
||||
s.ios.vendored_library = "ZKGroup/libzkgroup/libzkgroup_ios.a"
|
||||
|
||||
s.source_files = "ZKGroup/**/*.{h,swift}"
|
||||
|
||||
s.preserve_paths = 'ZKGroup/libzkgroup/module.modulemap'
|
||||
s.pod_target_xcconfig = {
|
||||
'SWIFT_INCLUDE_PATHS' => '$(PODS_TARGET_SRCROOT)/ZKGroup/libzkgroup',
|
||||
}
|
||||
|
||||
s.requires_arc = true
|
||||
|
||||
s.test_spec 'Tests' do |test_spec|
|
||||
|
||||
626
ZKGroup.xcodeproj/project.pbxproj
Normal file
626
ZKGroup.xcodeproj/project.pbxproj
Normal file
@ -0,0 +1,626 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 50;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
20118BA0237101A6004584B6 /* GroupSecretParams.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20118B9D237101A6004584B6 /* GroupSecretParams.swift */; };
|
||||
20118BA1237101A6004584B6 /* ByteArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20118B9E237101A6004584B6 /* ByteArray.swift */; };
|
||||
20118BA2237101A6004584B6 /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20118B9F237101A6004584B6 /* Errors.swift */; };
|
||||
20A67AB32374813600CB56A1 /* AuthCredential.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20A67AB02374813600CB56A1 /* AuthCredential.swift */; };
|
||||
20A67AB42374813600CB56A1 /* AuthCredentialResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20A67AB12374813600CB56A1 /* AuthCredentialResponse.swift */; };
|
||||
20A67AB52374813600CB56A1 /* AuthCredentialPresentation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20A67AB22374813600CB56A1 /* AuthCredentialPresentation.swift */; };
|
||||
20A67ABA2374814A00CB56A1 /* ClientZkProfileOperations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20A67AB62374814A00CB56A1 /* ClientZkProfileOperations.swift */; };
|
||||
20A67ABB2374814A00CB56A1 /* ChangeSignature.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20A67AB72374814A00CB56A1 /* ChangeSignature.swift */; };
|
||||
20A67ABC2374814A00CB56A1 /* ClientZkGroupCipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20A67AB82374814A00CB56A1 /* ClientZkGroupCipher.swift */; };
|
||||
20A67ABD2374814A00CB56A1 /* ClientZkAuthOperations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20A67AB92374814A00CB56A1 /* ClientZkAuthOperations.swift */; };
|
||||
20A67AC12374819000CB56A1 /* GroupMasterKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20A67ABE2374819000CB56A1 /* GroupMasterKey.swift */; };
|
||||
20A67AC22374819000CB56A1 /* GroupIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20A67ABF2374819000CB56A1 /* GroupIdentifier.swift */; };
|
||||
20A67AC32374819000CB56A1 /* GroupPublicParams.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20A67AC02374819000CB56A1 /* GroupPublicParams.swift */; };
|
||||
20A67AD5237481AD00CB56A1 /* ServerZkProfileOperations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20A67AC4237481AC00CB56A1 /* ServerZkProfileOperations.swift */; };
|
||||
20A67AD6237481AD00CB56A1 /* Native.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20A67AC5237481AC00CB56A1 /* Native.swift */; };
|
||||
20A67AD7237481AD00CB56A1 /* UuidCiphertext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20A67AC6237481AC00CB56A1 /* UuidCiphertext.swift */; };
|
||||
20A67AD8237481AD00CB56A1 /* ProfileKeyCredentialRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20A67AC7237481AC00CB56A1 /* ProfileKeyCredentialRequest.swift */; };
|
||||
20A67AD9237481AD00CB56A1 /* Uuid.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20A67AC8237481AC00CB56A1 /* Uuid.swift */; };
|
||||
20A67ADA237481AD00CB56A1 /* ServerZkAuthOperations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20A67AC9237481AC00CB56A1 /* ServerZkAuthOperations.swift */; };
|
||||
20A67ADB237481AD00CB56A1 /* ProfileKeyCredentialResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20A67ACA237481AC00CB56A1 /* ProfileKeyCredentialResponse.swift */; };
|
||||
20A67ADC237481AD00CB56A1 /* ServerPublicParams.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20A67ACB237481AC00CB56A1 /* ServerPublicParams.swift */; };
|
||||
20A67ADD237481AD00CB56A1 /* ServerSecretParams.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20A67ACC237481AC00CB56A1 /* ServerSecretParams.swift */; };
|
||||
20A67ADE237481AD00CB56A1 /* ProfileKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20A67ACD237481AC00CB56A1 /* ProfileKey.swift */; };
|
||||
20A67ADF237481AD00CB56A1 /* ProfileKeyCommitment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20A67ACE237481AC00CB56A1 /* ProfileKeyCommitment.swift */; };
|
||||
20A67AE0237481AD00CB56A1 /* ProfileKeyCredential.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20A67ACF237481AC00CB56A1 /* ProfileKeyCredential.swift */; };
|
||||
20A67AE1237481AD00CB56A1 /* ProfileKeyCiphertext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20A67AD0237481AC00CB56A1 /* ProfileKeyCiphertext.swift */; };
|
||||
20A67AE2237481AD00CB56A1 /* NotarySignature.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20A67AD1237481AC00CB56A1 /* NotarySignature.swift */; };
|
||||
20A67AE3237481AD00CB56A1 /* ProfileKeyCredentialPresentation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20A67AD2237481AC00CB56A1 /* ProfileKeyCredentialPresentation.swift */; };
|
||||
20A67AE4237481AD00CB56A1 /* ProfileKeyVersion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20A67AD3237481AC00CB56A1 /* ProfileKeyVersion.swift */; };
|
||||
20A67AE5237481AD00CB56A1 /* ProfileKeyCredentialRequestContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20A67AD4237481AD00CB56A1 /* ProfileKeyCredentialRequestContext.swift */; };
|
||||
4C6814EA229EFF00006FC282 /* ZKGroup.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C6814E0229EFF00006FC282 /* ZKGroup.framework */; };
|
||||
4C6814EF229EFF00006FC282 /* ZKGroupTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C6814EE229EFF00006FC282 /* ZKGroupTests.swift */; };
|
||||
4C6814F1229EFF00006FC282 /* ZKGroup.h in Headers */ = {isa = PBXBuildFile; fileRef = 4C6814E3229EFF00006FC282 /* ZKGroup.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
4CD24E7F229F122800BF655D /* libzkgroup_ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CD24E79229F0D3B00BF655D /* libzkgroup_ios.a */; };
|
||||
4CD24E80229F122F00BF655D /* zkgroup.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CD24E78229F0D3B00BF655D /* zkgroup.h */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
4C6814EB229EFF00006FC282 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 4C6814D7229EFF00006FC282 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 4C6814DF229EFF00006FC282;
|
||||
remoteInfo = ZKGroup;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
20118B9D237101A6004584B6 /* GroupSecretParams.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GroupSecretParams.swift; sourceTree = "<group>"; };
|
||||
20118B9E237101A6004584B6 /* ByteArray.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ByteArray.swift; sourceTree = "<group>"; };
|
||||
20118B9F237101A6004584B6 /* Errors.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Errors.swift; sourceTree = "<group>"; };
|
||||
20A67AB02374813600CB56A1 /* AuthCredential.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AuthCredential.swift; sourceTree = "<group>"; };
|
||||
20A67AB12374813600CB56A1 /* AuthCredentialResponse.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AuthCredentialResponse.swift; sourceTree = "<group>"; };
|
||||
20A67AB22374813600CB56A1 /* AuthCredentialPresentation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AuthCredentialPresentation.swift; sourceTree = "<group>"; };
|
||||
20A67AB62374814A00CB56A1 /* ClientZkProfileOperations.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ClientZkProfileOperations.swift; sourceTree = "<group>"; };
|
||||
20A67AB72374814A00CB56A1 /* ChangeSignature.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChangeSignature.swift; sourceTree = "<group>"; };
|
||||
20A67AB82374814A00CB56A1 /* ClientZkGroupCipher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ClientZkGroupCipher.swift; sourceTree = "<group>"; };
|
||||
20A67AB92374814A00CB56A1 /* ClientZkAuthOperations.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ClientZkAuthOperations.swift; sourceTree = "<group>"; };
|
||||
20A67ABE2374819000CB56A1 /* GroupMasterKey.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GroupMasterKey.swift; sourceTree = "<group>"; };
|
||||
20A67ABF2374819000CB56A1 /* GroupIdentifier.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GroupIdentifier.swift; sourceTree = "<group>"; };
|
||||
20A67AC02374819000CB56A1 /* GroupPublicParams.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GroupPublicParams.swift; sourceTree = "<group>"; };
|
||||
20A67AC4237481AC00CB56A1 /* ServerZkProfileOperations.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ServerZkProfileOperations.swift; sourceTree = "<group>"; };
|
||||
20A67AC5237481AC00CB56A1 /* Native.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Native.swift; sourceTree = "<group>"; };
|
||||
20A67AC6237481AC00CB56A1 /* UuidCiphertext.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UuidCiphertext.swift; sourceTree = "<group>"; };
|
||||
20A67AC7237481AC00CB56A1 /* ProfileKeyCredentialRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProfileKeyCredentialRequest.swift; sourceTree = "<group>"; };
|
||||
20A67AC8237481AC00CB56A1 /* Uuid.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Uuid.swift; sourceTree = "<group>"; };
|
||||
20A67AC9237481AC00CB56A1 /* ServerZkAuthOperations.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ServerZkAuthOperations.swift; sourceTree = "<group>"; };
|
||||
20A67ACA237481AC00CB56A1 /* ProfileKeyCredentialResponse.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProfileKeyCredentialResponse.swift; sourceTree = "<group>"; };
|
||||
20A67ACB237481AC00CB56A1 /* ServerPublicParams.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ServerPublicParams.swift; sourceTree = "<group>"; };
|
||||
20A67ACC237481AC00CB56A1 /* ServerSecretParams.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ServerSecretParams.swift; sourceTree = "<group>"; };
|
||||
20A67ACD237481AC00CB56A1 /* ProfileKey.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProfileKey.swift; sourceTree = "<group>"; };
|
||||
20A67ACE237481AC00CB56A1 /* ProfileKeyCommitment.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProfileKeyCommitment.swift; sourceTree = "<group>"; };
|
||||
20A67ACF237481AC00CB56A1 /* ProfileKeyCredential.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProfileKeyCredential.swift; sourceTree = "<group>"; };
|
||||
20A67AD0237481AC00CB56A1 /* ProfileKeyCiphertext.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProfileKeyCiphertext.swift; sourceTree = "<group>"; };
|
||||
20A67AD1237481AC00CB56A1 /* NotarySignature.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NotarySignature.swift; sourceTree = "<group>"; };
|
||||
20A67AD2237481AC00CB56A1 /* ProfileKeyCredentialPresentation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProfileKeyCredentialPresentation.swift; sourceTree = "<group>"; };
|
||||
20A67AD3237481AC00CB56A1 /* ProfileKeyVersion.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProfileKeyVersion.swift; sourceTree = "<group>"; };
|
||||
20A67AD4237481AD00CB56A1 /* ProfileKeyCredentialRequestContext.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProfileKeyCredentialRequestContext.swift; sourceTree = "<group>"; };
|
||||
4C6814E0229EFF00006FC282 /* ZKGroup.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ZKGroup.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
4C6814E3229EFF00006FC282 /* ZKGroup.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZKGroup.h; sourceTree = "<group>"; };
|
||||
4C6814E4229EFF00006FC282 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
4C6814E9229EFF00006FC282 /* ZKGroupTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ZKGroupTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
4C6814EE229EFF00006FC282 /* ZKGroupTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZKGroupTests.swift; sourceTree = "<group>"; };
|
||||
4C6814F0229EFF00006FC282 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
4CD24E77229F0D3B00BF655D /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
|
||||
4CD24E78229F0D3B00BF655D /* zkgroup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = zkgroup.h; sourceTree = "<group>"; };
|
||||
4CD24E79229F0D3B00BF655D /* libzkgroup_ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libzkgroup_ios.a; sourceTree = "<group>"; };
|
||||
4CD24E7A229F0D3B00BF655D /* module.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
4C6814DD229EFF00006FC282 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4CD24E7F229F122800BF655D /* libzkgroup_ios.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
4C6814E6229EFF00006FC282 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4C6814EA229EFF00006FC282 /* ZKGroup.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
4C6814D6229EFF00006FC282 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4C6814E2229EFF00006FC282 /* ZKGroup */,
|
||||
4C6814ED229EFF00006FC282 /* ZKGroupTests */,
|
||||
4C6814E1229EFF00006FC282 /* Products */,
|
||||
4CD24E7E229F122800BF655D /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4C6814E1229EFF00006FC282 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4C6814E0229EFF00006FC282 /* ZKGroup.framework */,
|
||||
4C6814E9229EFF00006FC282 /* ZKGroupTests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4C6814E2229EFF00006FC282 /* ZKGroup */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
20A67AC5237481AC00CB56A1 /* Native.swift */,
|
||||
20A67AD1237481AC00CB56A1 /* NotarySignature.swift */,
|
||||
20A67ACD237481AC00CB56A1 /* ProfileKey.swift */,
|
||||
20A67AD0237481AC00CB56A1 /* ProfileKeyCiphertext.swift */,
|
||||
20A67ACE237481AC00CB56A1 /* ProfileKeyCommitment.swift */,
|
||||
20A67ACF237481AC00CB56A1 /* ProfileKeyCredential.swift */,
|
||||
20A67AD2237481AC00CB56A1 /* ProfileKeyCredentialPresentation.swift */,
|
||||
20A67AC7237481AC00CB56A1 /* ProfileKeyCredentialRequest.swift */,
|
||||
20A67AD4237481AD00CB56A1 /* ProfileKeyCredentialRequestContext.swift */,
|
||||
20A67ACA237481AC00CB56A1 /* ProfileKeyCredentialResponse.swift */,
|
||||
20A67AD3237481AC00CB56A1 /* ProfileKeyVersion.swift */,
|
||||
20A67ACB237481AC00CB56A1 /* ServerPublicParams.swift */,
|
||||
20A67ACC237481AC00CB56A1 /* ServerSecretParams.swift */,
|
||||
20A67AC9237481AC00CB56A1 /* ServerZkAuthOperations.swift */,
|
||||
20A67AC4237481AC00CB56A1 /* ServerZkProfileOperations.swift */,
|
||||
20A67AC8237481AC00CB56A1 /* Uuid.swift */,
|
||||
20A67AC6237481AC00CB56A1 /* UuidCiphertext.swift */,
|
||||
20A67ABF2374819000CB56A1 /* GroupIdentifier.swift */,
|
||||
20A67ABE2374819000CB56A1 /* GroupMasterKey.swift */,
|
||||
20A67AC02374819000CB56A1 /* GroupPublicParams.swift */,
|
||||
20A67AB72374814A00CB56A1 /* ChangeSignature.swift */,
|
||||
20A67AB92374814A00CB56A1 /* ClientZkAuthOperations.swift */,
|
||||
20A67AB82374814A00CB56A1 /* ClientZkGroupCipher.swift */,
|
||||
20A67AB62374814A00CB56A1 /* ClientZkProfileOperations.swift */,
|
||||
20A67AB02374813600CB56A1 /* AuthCredential.swift */,
|
||||
20A67AB22374813600CB56A1 /* AuthCredentialPresentation.swift */,
|
||||
20A67AB12374813600CB56A1 /* AuthCredentialResponse.swift */,
|
||||
20118B9E237101A6004584B6 /* ByteArray.swift */,
|
||||
20118B9F237101A6004584B6 /* Errors.swift */,
|
||||
20118B9D237101A6004584B6 /* GroupSecretParams.swift */,
|
||||
4CD24E76229F0D3B00BF655D /* libzkgroup */,
|
||||
4C6814E3229EFF00006FC282 /* ZKGroup.h */,
|
||||
4C6814E4229EFF00006FC282 /* Info.plist */,
|
||||
);
|
||||
path = ZKGroup;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4C6814ED229EFF00006FC282 /* ZKGroupTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4C6814EE229EFF00006FC282 /* ZKGroupTests.swift */,
|
||||
4C6814F0229EFF00006FC282 /* Info.plist */,
|
||||
);
|
||||
path = ZKGroupTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4CD24E76229F0D3B00BF655D /* libzkgroup */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4CD24E77229F0D3B00BF655D /* Makefile */,
|
||||
4CD24E78229F0D3B00BF655D /* zkgroup.h */,
|
||||
4CD24E79229F0D3B00BF655D /* libzkgroup_ios.a */,
|
||||
4CD24E7A229F0D3B00BF655D /* module.modulemap */,
|
||||
);
|
||||
path = libzkgroup;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4CD24E7E229F122800BF655D /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
4C6814DB229EFF00006FC282 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4C6814F1229EFF00006FC282 /* ZKGroup.h in Headers */,
|
||||
4CD24E80229F122F00BF655D /* zkgroup.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
4C6814DF229EFF00006FC282 /* ZKGroup */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 4C6814F4229EFF00006FC282 /* Build configuration list for PBXNativeTarget "ZKGroup" */;
|
||||
buildPhases = (
|
||||
4C6814DB229EFF00006FC282 /* Headers */,
|
||||
4C6814DC229EFF00006FC282 /* Sources */,
|
||||
4C6814DD229EFF00006FC282 /* Frameworks */,
|
||||
4C6814DE229EFF00006FC282 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = ZKGroup;
|
||||
productName = ZKGroup;
|
||||
productReference = 4C6814E0229EFF00006FC282 /* ZKGroup.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
4C6814E8229EFF00006FC282 /* ZKGroupTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 4C6814F7229EFF00006FC282 /* Build configuration list for PBXNativeTarget "ZKGroupTests" */;
|
||||
buildPhases = (
|
||||
4C6814E5229EFF00006FC282 /* Sources */,
|
||||
4C6814E6229EFF00006FC282 /* Frameworks */,
|
||||
4C6814E7229EFF00006FC282 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
4C6814EC229EFF00006FC282 /* PBXTargetDependency */,
|
||||
);
|
||||
name = ZKGroupTests;
|
||||
productName = ZKGroupTests;
|
||||
productReference = 4C6814E9229EFF00006FC282 /* ZKGroupTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
4C6814D7229EFF00006FC282 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 1020;
|
||||
LastUpgradeCheck = 1020;
|
||||
ORGANIZATIONNAME = "Signal Messenger";
|
||||
TargetAttributes = {
|
||||
4C6814DF229EFF00006FC282 = {
|
||||
CreatedOnToolsVersion = 10.2;
|
||||
LastSwiftMigration = 1020;
|
||||
};
|
||||
4C6814E8229EFF00006FC282 = {
|
||||
CreatedOnToolsVersion = 10.2;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 4C6814DA229EFF00006FC282 /* Build configuration list for PBXProject "ZKGroup" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = 4C6814D6229EFF00006FC282;
|
||||
productRefGroup = 4C6814E1229EFF00006FC282 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
4C6814DF229EFF00006FC282 /* ZKGroup */,
|
||||
4C6814E8229EFF00006FC282 /* ZKGroupTests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
4C6814DE229EFF00006FC282 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
4C6814E7229EFF00006FC282 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
4C6814DC229EFF00006FC282 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
20A67ADE237481AD00CB56A1 /* ProfileKey.swift in Sources */,
|
||||
20A67AD6237481AD00CB56A1 /* Native.swift in Sources */,
|
||||
20A67AE5237481AD00CB56A1 /* ProfileKeyCredentialRequestContext.swift in Sources */,
|
||||
20A67ADC237481AD00CB56A1 /* ServerPublicParams.swift in Sources */,
|
||||
20A67ABB2374814A00CB56A1 /* ChangeSignature.swift in Sources */,
|
||||
20A67AB32374813600CB56A1 /* AuthCredential.swift in Sources */,
|
||||
20A67ABA2374814A00CB56A1 /* ClientZkProfileOperations.swift in Sources */,
|
||||
20A67AD5237481AD00CB56A1 /* ServerZkProfileOperations.swift in Sources */,
|
||||
20118BA2237101A6004584B6 /* Errors.swift in Sources */,
|
||||
20A67AD7237481AD00CB56A1 /* UuidCiphertext.swift in Sources */,
|
||||
20A67AC22374819000CB56A1 /* GroupIdentifier.swift in Sources */,
|
||||
20A67AD9237481AD00CB56A1 /* Uuid.swift in Sources */,
|
||||
20A67AC12374819000CB56A1 /* GroupMasterKey.swift in Sources */,
|
||||
20A67AB52374813600CB56A1 /* AuthCredentialPresentation.swift in Sources */,
|
||||
20A67AE0237481AD00CB56A1 /* ProfileKeyCredential.swift in Sources */,
|
||||
20A67AE3237481AD00CB56A1 /* ProfileKeyCredentialPresentation.swift in Sources */,
|
||||
20A67ABD2374814A00CB56A1 /* ClientZkAuthOperations.swift in Sources */,
|
||||
20A67AE2237481AD00CB56A1 /* NotarySignature.swift in Sources */,
|
||||
20A67AB42374813600CB56A1 /* AuthCredentialResponse.swift in Sources */,
|
||||
20A67ADB237481AD00CB56A1 /* ProfileKeyCredentialResponse.swift in Sources */,
|
||||
20118BA0237101A6004584B6 /* GroupSecretParams.swift in Sources */,
|
||||
20A67ADD237481AD00CB56A1 /* ServerSecretParams.swift in Sources */,
|
||||
20A67ADA237481AD00CB56A1 /* ServerZkAuthOperations.swift in Sources */,
|
||||
20A67AE4237481AD00CB56A1 /* ProfileKeyVersion.swift in Sources */,
|
||||
20A67ABC2374814A00CB56A1 /* ClientZkGroupCipher.swift in Sources */,
|
||||
20A67AE1237481AD00CB56A1 /* ProfileKeyCiphertext.swift in Sources */,
|
||||
20A67ADF237481AD00CB56A1 /* ProfileKeyCommitment.swift in Sources */,
|
||||
20A67AC32374819000CB56A1 /* GroupPublicParams.swift in Sources */,
|
||||
20118BA1237101A6004584B6 /* ByteArray.swift in Sources */,
|
||||
20A67AD8237481AD00CB56A1 /* ProfileKeyCredentialRequest.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
4C6814E5229EFF00006FC282 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4C6814EF229EFF00006FC282 /* ZKGroupTests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
4C6814EC229EFF00006FC282 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 4C6814DF229EFF00006FC282 /* ZKGroup */;
|
||||
targetProxy = 4C6814EB229EFF00006FC282 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
4C6814F2229EFF00006FC282 /* 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++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
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_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;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_BITCODE = NO;
|
||||
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 = 12.2;
|
||||
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";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
4C6814F3229EFF00006FC282 /* 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++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
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_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;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_BITCODE = NO;
|
||||
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 = 12.2;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
4C6814F5229EFF00006FC282 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = U68MSDN6DR;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = ZKGroup/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/ZKGroup/libzkgroup",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.whispersystems.ZKGroup;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_INCLUDE_PATHS = "$(PROJECT_DIR)/ZKGroup/libzkgroup";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
4C6814F6229EFF00006FC282 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = U68MSDN6DR;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = ZKGroup/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/ZKGroup/libzkgroup",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.whispersystems.ZKGroup;
|
||||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_INCLUDE_PATHS = "$(PROJECT_DIR)/ZKGroup/libzkgroup";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
4C6814F8229EFF00006FC282 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = U68MSDN6DR;
|
||||
INFOPLIST_FILE = ZKGroupTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.whispersystems.ZKGroupTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
4C6814F9229EFF00006FC282 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = U68MSDN6DR;
|
||||
INFOPLIST_FILE = ZKGroupTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.whispersystems.ZKGroupTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
4C6814DA229EFF00006FC282 /* Build configuration list for PBXProject "ZKGroup" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
4C6814F2229EFF00006FC282 /* Debug */,
|
||||
4C6814F3229EFF00006FC282 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
4C6814F4229EFF00006FC282 /* Build configuration list for PBXNativeTarget "ZKGroup" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
4C6814F5229EFF00006FC282 /* Debug */,
|
||||
4C6814F6229EFF00006FC282 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
4C6814F7229EFF00006FC282 /* Build configuration list for PBXNativeTarget "ZKGroupTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
4C6814F8229EFF00006FC282 /* Debug */,
|
||||
4C6814F9229EFF00006FC282 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 4C6814D7229EFF00006FC282 /* Project object */;
|
||||
}
|
||||
@ -1,13 +1,31 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (C) 2020 Signal Messenger, LLC.
|
||||
// All rights reserved.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
//
|
||||
// Generated by zkgroup/codegen/codegen.py - do not edit
|
||||
|
||||
import Foundation
|
||||
import libzkgroup
|
||||
|
||||
public class AuthCredential: ByteArray {
|
||||
public class AuthCredential : ByteArray {
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
fatalError("Not implemented.")
|
||||
public static let SIZE: Int = 404
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
try super.init(newContents: contents, expectedLength: AuthCredential.SIZE)
|
||||
|
||||
|
||||
let ffi_return = FFI_AuthCredential_checkValidContents(self.contents, UInt64(self.contents.count))
|
||||
|
||||
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
|
||||
throw ZkGroupException.InvalidInput
|
||||
}
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
}
|
||||
|
||||
public func serialize() -> [UInt8] {
|
||||
|
||||
@ -1,21 +1,62 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (C) 2020 Signal Messenger, LLC.
|
||||
// All rights reserved.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
//
|
||||
// Generated by zkgroup/codegen/codegen.py - do not edit
|
||||
|
||||
import Foundation
|
||||
import libzkgroup
|
||||
|
||||
public class AuthCredentialPresentation: ByteArray {
|
||||
public class AuthCredentialPresentation : ByteArray {
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
fatalError("Not implemented.")
|
||||
public static let SIZE: Int = 620
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
try super.init(newContents: contents, expectedLength: AuthCredentialPresentation.SIZE)
|
||||
|
||||
|
||||
let ffi_return = FFI_AuthCredentialPresentation_checkValidContents(self.contents, UInt64(self.contents.count))
|
||||
|
||||
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
|
||||
throw ZkGroupException.InvalidInput
|
||||
}
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
}
|
||||
|
||||
public func getUuidCiphertext() throws -> UuidCiphertext {
|
||||
fatalError("Not implemented.")
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: UuidCiphertext.SIZE)
|
||||
|
||||
let ffi_return = FFI_AuthCredentialPresentation_getUuidCiphertext(self.contents, UInt64(self.contents.count), &newContents, UInt64(newContents.count))
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
do {
|
||||
return try UuidCiphertext(contents: newContents)
|
||||
} catch ZkGroupException.InvalidInput {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public func getRedemptionTime() throws -> UInt32 {
|
||||
fatalError("Not implemented.")
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: Int(4))
|
||||
|
||||
let ffi_return = FFI_AuthCredentialPresentation_getRedemptionTime(self.contents, UInt64(self.contents.count), &newContents, UInt64(newContents.count))
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
let data = Data(bytes: newContents)
|
||||
let value = UInt32(bigEndian: data.withUnsafeBytes { $0.pointee })
|
||||
return value
|
||||
}
|
||||
|
||||
public func serialize() -> [UInt8] {
|
||||
|
||||
@ -1,13 +1,31 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (C) 2020 Signal Messenger, LLC.
|
||||
// All rights reserved.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
//
|
||||
// Generated by zkgroup/codegen/codegen.py - do not edit
|
||||
|
||||
import Foundation
|
||||
import libzkgroup
|
||||
|
||||
public class AuthCredentialResponse: ByteArray {
|
||||
public class AuthCredentialResponse : ByteArray {
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
fatalError("Not implemented.")
|
||||
public static let SIZE: Int = 392
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
try super.init(newContents: contents, expectedLength: AuthCredentialResponse.SIZE)
|
||||
|
||||
|
||||
let ffi_return = FFI_AuthCredentialResponse_checkValidContents(self.contents, UInt64(self.contents.count))
|
||||
|
||||
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
|
||||
throw ZkGroupException.InvalidInput
|
||||
}
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
}
|
||||
|
||||
public func serialize() -> [UInt8] {
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import libzkgroup
|
||||
|
||||
public class ByteArray {
|
||||
let contents: [UInt8]
|
||||
@ -13,4 +14,10 @@ public class ByteArray {
|
||||
}
|
||||
contents = newContents
|
||||
}
|
||||
|
||||
func getInternalContentsForFFI() -> [UInt8] {
|
||||
return contents
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1,11 +1,20 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (C) 2020 Signal Messenger, LLC.
|
||||
// All rights reserved.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
//
|
||||
// Generated by zkgroup/codegen/codegen.py - do not edit
|
||||
|
||||
public class ChangeSignature: ByteArray {
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
fatalError("Not implemented.")
|
||||
|
||||
public class ChangeSignature : ByteArray {
|
||||
|
||||
public static let SIZE: Int = 64
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
try super.init(newContents: contents, expectedLength: ChangeSignature.SIZE)
|
||||
|
||||
}
|
||||
|
||||
public func serialize() -> [UInt8] {
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
// Generated by zkgroup/codegen/codegen.py - do not edit
|
||||
|
||||
import Foundation
|
||||
import libzkgroup
|
||||
|
||||
public class ClientZkAuthOperations {
|
||||
|
||||
@ -13,17 +12,50 @@ public class ClientZkAuthOperations {
|
||||
}
|
||||
|
||||
public func receiveAuthCredential(uuid: ZKGUuid, redemptionTime: UInt32, authCredentialResponse: AuthCredentialResponse) throws -> AuthCredential {
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: AuthCredential.SIZE)
|
||||
|
||||
let ffi_return = FFI_ServerPublicParams_receiveAuthCredential(serverPublicParams.getInternalContentsForFFI(), UInt64(serverPublicParams.getInternalContentsForFFI().count), uuid.getInternalContentsForFFI(), UInt64(uuid.getInternalContentsForFFI().count), redemptionTime, authCredentialResponse.getInternalContentsForFFI(), UInt64(authCredentialResponse.getInternalContentsForFFI().count), &newContents, UInt64(newContents.count))
|
||||
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
|
||||
throw ZkGroupException.VerificationFailed
|
||||
}
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
do {
|
||||
return try AuthCredential(contents: newContents)
|
||||
} catch ZkGroupException.InvalidInput {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
fatalError("Not implemented.")
|
||||
}
|
||||
|
||||
public func createAuthCredentialPresentation(groupSecretParams: GroupSecretParams, authCredential: AuthCredential) throws -> AuthCredentialPresentation {
|
||||
var randomness: [UInt8] = Array(repeating: 0, count: Int(32))
|
||||
let result = SecRandomCopyBytes(kSecRandomDefault, randomness.count, &randomness)
|
||||
guard result == errSecSuccess else {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
fatalError("Not implemented.")
|
||||
return try createAuthCredentialPresentation(randomness: randomness, groupSecretParams: groupSecretParams, authCredential: authCredential)
|
||||
}
|
||||
|
||||
public func createAuthCredentialPresentation(randomness: [UInt8], groupSecretParams: GroupSecretParams, authCredential: AuthCredential) throws -> AuthCredentialPresentation {
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: AuthCredentialPresentation.SIZE)
|
||||
|
||||
let ffi_return = FFI_ServerPublicParams_createAuthCredentialPresentationDeterministic(serverPublicParams.getInternalContentsForFFI(), UInt64(serverPublicParams.getInternalContentsForFFI().count), randomness, UInt64(randomness.count), groupSecretParams.getInternalContentsForFFI(), UInt64(groupSecretParams.getInternalContentsForFFI().count), authCredential.getInternalContentsForFFI(), UInt64(authCredential.getInternalContentsForFFI().count), &newContents, UInt64(newContents.count))
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
do {
|
||||
return try AuthCredentialPresentation(contents: newContents)
|
||||
} catch ZkGroupException.InvalidInput {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
fatalError("Not implemented.")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
// Generated by zkgroup/codegen/codegen.py - do not edit
|
||||
|
||||
import Foundation
|
||||
import libzkgroup
|
||||
|
||||
public class ClientZkGroupCipher {
|
||||
|
||||
@ -13,31 +12,127 @@ public class ClientZkGroupCipher {
|
||||
}
|
||||
|
||||
public func encryptUuid(uuid: ZKGUuid) throws -> UuidCiphertext {
|
||||
fatalError("Not implemented.")
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: UuidCiphertext.SIZE)
|
||||
|
||||
let ffi_return = FFI_GroupSecretParams_encryptUuid(groupSecretParams.getInternalContentsForFFI(), UInt64(groupSecretParams.getInternalContentsForFFI().count), uuid.getInternalContentsForFFI(), UInt64(uuid.getInternalContentsForFFI().count), &newContents, UInt64(newContents.count))
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
do {
|
||||
return try UuidCiphertext(contents: newContents)
|
||||
} catch ZkGroupException.InvalidInput {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public func decryptUuid(uuidCiphertext: UuidCiphertext) throws -> ZKGUuid {
|
||||
fatalError("Not implemented.")
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: ZKGUuid.SIZE)
|
||||
|
||||
let ffi_return = FFI_GroupSecretParams_decryptUuid(groupSecretParams.getInternalContentsForFFI(), UInt64(groupSecretParams.getInternalContentsForFFI().count), uuidCiphertext.getInternalContentsForFFI(), UInt64(uuidCiphertext.getInternalContentsForFFI().count), &newContents, UInt64(newContents.count))
|
||||
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
|
||||
throw ZkGroupException.VerificationFailed
|
||||
}
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
do {
|
||||
return try ZKGUuid(contents: newContents)
|
||||
} catch ZkGroupException.InvalidInput {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public func encryptProfileKey(profileKey: ProfileKey) throws -> ProfileKeyCiphertext {
|
||||
fatalError("Not implemented.")
|
||||
public func encryptProfileKey(profileKey: ProfileKey, uuid: ZKGUuid) throws -> ProfileKeyCiphertext {
|
||||
var randomness: [UInt8] = Array(repeating: 0, count: Int(32))
|
||||
let result = SecRandomCopyBytes(kSecRandomDefault, randomness.count, &randomness)
|
||||
guard result == errSecSuccess else {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
return try encryptProfileKey(randomness: randomness, profileKey: profileKey, uuid: uuid)
|
||||
}
|
||||
|
||||
public func encryptProfileKey(randomness: [UInt8], profileKey: ProfileKey) throws -> ProfileKeyCiphertext {
|
||||
fatalError("Not implemented.")
|
||||
public func encryptProfileKey(randomness: [UInt8], profileKey: ProfileKey, uuid: ZKGUuid) throws -> ProfileKeyCiphertext {
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: ProfileKeyCiphertext.SIZE)
|
||||
|
||||
let ffi_return = FFI_GroupSecretParams_encryptProfileKeyDeterministic(groupSecretParams.getInternalContentsForFFI(), UInt64(groupSecretParams.getInternalContentsForFFI().count), randomness, UInt64(randomness.count), profileKey.getInternalContentsForFFI(), UInt64(profileKey.getInternalContentsForFFI().count), uuid.getInternalContentsForFFI(), UInt64(uuid.getInternalContentsForFFI().count), &newContents, UInt64(newContents.count))
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
do {
|
||||
return try ProfileKeyCiphertext(contents: newContents)
|
||||
} catch ZkGroupException.InvalidInput {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public func decryptProfileKey(profileKeyCiphertext: ProfileKeyCiphertext) throws -> ProfileKey {
|
||||
fatalError("Not implemented.")
|
||||
public func decryptProfileKey(profileKeyCiphertext: ProfileKeyCiphertext, uuid: ZKGUuid) throws -> ProfileKey {
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: ProfileKey.SIZE)
|
||||
|
||||
let ffi_return = FFI_GroupSecretParams_decryptProfileKey(groupSecretParams.getInternalContentsForFFI(), UInt64(groupSecretParams.getInternalContentsForFFI().count), profileKeyCiphertext.getInternalContentsForFFI(), UInt64(profileKeyCiphertext.getInternalContentsForFFI().count), uuid.getInternalContentsForFFI(), UInt64(uuid.getInternalContentsForFFI().count), &newContents, UInt64(newContents.count))
|
||||
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
|
||||
throw ZkGroupException.VerificationFailed
|
||||
}
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
do {
|
||||
return try ProfileKey(contents: newContents)
|
||||
} catch ZkGroupException.InvalidInput {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public func encryptBlob(plaintext: [UInt8]) throws -> [UInt8] {
|
||||
fatalError("Not implemented.")
|
||||
var randomness: [UInt8] = Array(repeating: 0, count: Int(32))
|
||||
let result = SecRandomCopyBytes(kSecRandomDefault, randomness.count, &randomness)
|
||||
guard result == errSecSuccess else {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
return try encryptBlob(randomness: randomness, plaintext: plaintext)
|
||||
}
|
||||
|
||||
public func encryptBlob(randomness: [UInt8], plaintext: [UInt8]) throws -> [UInt8] {
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: Int(plaintext.count+28))
|
||||
|
||||
let ffi_return = FFI_GroupSecretParams_encryptBlobDeterministic(groupSecretParams.getInternalContentsForFFI(), UInt64(groupSecretParams.getInternalContentsForFFI().count), randomness, UInt64(randomness.count), plaintext, UInt64(plaintext.count), &newContents, UInt64(newContents.count))
|
||||
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
|
||||
throw ZkGroupException.VerificationFailed
|
||||
}
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
return newContents
|
||||
}
|
||||
|
||||
public func decryptBlob(blobCiphertext: [UInt8]) throws -> [UInt8] {
|
||||
fatalError("Not implemented.")
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: Int(blobCiphertext.count-28))
|
||||
|
||||
let ffi_return = FFI_GroupSecretParams_decryptBlob(groupSecretParams.getInternalContentsForFFI(), UInt64(groupSecretParams.getInternalContentsForFFI().count), blobCiphertext, UInt64(blobCiphertext.count), &newContents, UInt64(newContents.count))
|
||||
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
|
||||
throw ZkGroupException.VerificationFailed
|
||||
}
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
return newContents
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
// Generated by zkgroup/codegen/codegen.py - do not edit
|
||||
|
||||
import Foundation
|
||||
import libzkgroup
|
||||
|
||||
public class ClientZkProfileOperations {
|
||||
|
||||
@ -13,22 +12,77 @@ public class ClientZkProfileOperations {
|
||||
}
|
||||
|
||||
public func createProfileKeyCredentialRequestContext(uuid: ZKGUuid, profileKey: ProfileKey) throws -> ProfileKeyCredentialRequestContext {
|
||||
fatalError("Not implemented.")
|
||||
var randomness: [UInt8] = Array(repeating: 0, count: Int(32))
|
||||
let result = SecRandomCopyBytes(kSecRandomDefault, randomness.count, &randomness)
|
||||
guard result == errSecSuccess else {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
return try createProfileKeyCredentialRequestContext(randomness: randomness, uuid: uuid, profileKey: profileKey)
|
||||
}
|
||||
|
||||
public func createProfileKeyCredentialRequestContext(randomness: [UInt8], uuid: ZKGUuid, profileKey: ProfileKey) throws -> ProfileKeyCredentialRequestContext {
|
||||
fatalError("Not implemented.")
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: ProfileKeyCredentialRequestContext.SIZE)
|
||||
|
||||
let ffi_return = FFI_ServerPublicParams_createProfileKeyCredentialRequestContextDeterministic(serverPublicParams.getInternalContentsForFFI(), UInt64(serverPublicParams.getInternalContentsForFFI().count), randomness, UInt64(randomness.count), uuid.getInternalContentsForFFI(), UInt64(uuid.getInternalContentsForFFI().count), profileKey.getInternalContentsForFFI(), UInt64(profileKey.getInternalContentsForFFI().count), &newContents, UInt64(newContents.count))
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
do {
|
||||
return try ProfileKeyCredentialRequestContext(contents: newContents)
|
||||
} catch ZkGroupException.InvalidInput {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public func receiveProfileKeyCredential(profileKeyCredentialRequestContext: ProfileKeyCredentialRequestContext, profileKeyCredentialResponse: ProfileKeyCredentialResponse) throws -> ProfileKeyCredential {
|
||||
fatalError("Not implemented.")
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: ProfileKeyCredential.SIZE)
|
||||
|
||||
let ffi_return = FFI_ServerPublicParams_receiveProfileKeyCredential(serverPublicParams.getInternalContentsForFFI(), UInt64(serverPublicParams.getInternalContentsForFFI().count), profileKeyCredentialRequestContext.getInternalContentsForFFI(), UInt64(profileKeyCredentialRequestContext.getInternalContentsForFFI().count), profileKeyCredentialResponse.getInternalContentsForFFI(), UInt64(profileKeyCredentialResponse.getInternalContentsForFFI().count), &newContents, UInt64(newContents.count))
|
||||
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
|
||||
throw ZkGroupException.VerificationFailed
|
||||
}
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
do {
|
||||
return try ProfileKeyCredential(contents: newContents)
|
||||
} catch ZkGroupException.InvalidInput {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public func createProfileKeyCredentialPresentation(groupSecretParams: GroupSecretParams, profileKeyCredential: ProfileKeyCredential) throws -> ProfileKeyCredentialPresentation {
|
||||
fatalError("Not implemented.")
|
||||
var randomness: [UInt8] = Array(repeating: 0, count: Int(32))
|
||||
let result = SecRandomCopyBytes(kSecRandomDefault, randomness.count, &randomness)
|
||||
guard result == errSecSuccess else {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
return try createProfileKeyCredentialPresentation(randomness: randomness, groupSecretParams: groupSecretParams, profileKeyCredential: profileKeyCredential)
|
||||
}
|
||||
|
||||
public func createProfileKeyCredentialPresentation(randomness: [UInt8], groupSecretParams: GroupSecretParams, profileKeyCredential: ProfileKeyCredential) throws -> ProfileKeyCredentialPresentation {
|
||||
fatalError("Not implemented.")
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: ProfileKeyCredentialPresentation.SIZE)
|
||||
|
||||
let ffi_return = FFI_ServerPublicParams_createProfileKeyCredentialPresentationDeterministic(serverPublicParams.getInternalContentsForFFI(), UInt64(serverPublicParams.getInternalContentsForFFI().count), randomness, UInt64(randomness.count), groupSecretParams.getInternalContentsForFFI(), UInt64(groupSecretParams.getInternalContentsForFFI().count), profileKeyCredential.getInternalContentsForFFI(), UInt64(profileKeyCredential.getInternalContentsForFFI().count), &newContents, UInt64(newContents.count))
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
do {
|
||||
return try ProfileKeyCredentialPresentation(contents: newContents)
|
||||
} catch ZkGroupException.InvalidInput {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -3,8 +3,9 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import libzkgroup
|
||||
|
||||
public enum ZkGroupException: Error {
|
||||
public enum ZkGroupException : Error {
|
||||
case InvalidInput
|
||||
case VerificationFailed
|
||||
case ZkGroupError
|
||||
|
||||
@ -1,11 +1,20 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (C) 2020 Signal Messenger, LLC.
|
||||
// All rights reserved.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
//
|
||||
// Generated by zkgroup/codegen/codegen.py - do not edit
|
||||
|
||||
public class GroupIdentifier: ByteArray {
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
fatalError("Not implemented.")
|
||||
|
||||
public class GroupIdentifier : ByteArray {
|
||||
|
||||
public static let SIZE: Int = 32
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
try super.init(newContents: contents, expectedLength: GroupIdentifier.SIZE)
|
||||
|
||||
}
|
||||
|
||||
public func serialize() -> [UInt8] {
|
||||
|
||||
@ -1,11 +1,20 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (C) 2020 Signal Messenger, LLC.
|
||||
// All rights reserved.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
//
|
||||
// Generated by zkgroup/codegen/codegen.py - do not edit
|
||||
|
||||
public class GroupMasterKey: ByteArray {
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
fatalError("Not implemented.")
|
||||
|
||||
public class GroupMasterKey : ByteArray {
|
||||
|
||||
public static let SIZE: Int = 32
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
try super.init(newContents: contents, expectedLength: GroupMasterKey.SIZE)
|
||||
|
||||
}
|
||||
|
||||
public func serialize() -> [UInt8] {
|
||||
|
||||
@ -1,24 +1,63 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (C) 2020 Signal Messenger, LLC.
|
||||
// All rights reserved.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
//
|
||||
// Generated by zkgroup/codegen/codegen.py - do not edit
|
||||
|
||||
import Foundation
|
||||
import libzkgroup
|
||||
|
||||
public class GroupPublicParams: ByteArray {
|
||||
public class GroupPublicParams : ByteArray {
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
fatalError("Not implemented.")
|
||||
public static let SIZE: Int = 128
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
try super.init(newContents: contents, expectedLength: GroupPublicParams.SIZE)
|
||||
|
||||
|
||||
let ffi_return = FFI_GroupPublicParams_checkValidContents(self.contents, UInt64(self.contents.count))
|
||||
|
||||
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
|
||||
throw ZkGroupException.InvalidInput
|
||||
}
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
}
|
||||
|
||||
public func getGroupIdentifier() throws -> GroupIdentifier {
|
||||
fatalError("Not implemented.")
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: GroupIdentifier.SIZE)
|
||||
|
||||
let ffi_return = FFI_GroupPublicParams_getGroupIdentifier(self.contents, UInt64(self.contents.count), &newContents, UInt64(newContents.count))
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
do {
|
||||
return try GroupIdentifier(contents: newContents)
|
||||
} catch ZkGroupException.InvalidInput {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public func verifySignature(message: [UInt8], changeSignature: ChangeSignature) throws {
|
||||
fatalError("Not implemented.")
|
||||
let ffi_return = FFI_GroupPublicParams_verifySignature(self.contents, UInt64(self.contents.count), message, UInt64(message.count), changeSignature.getInternalContentsForFFI(), UInt64(changeSignature.getInternalContentsForFFI().count))
|
||||
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
|
||||
throw ZkGroupException.VerificationFailed
|
||||
}
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
}
|
||||
|
||||
public func serialize() -> [UInt8] {
|
||||
return contents
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,44 +1,138 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (C) 2020 Signal Messenger, LLC.
|
||||
// All rights reserved.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
//
|
||||
// Generated by zkgroup/codegen/codegen.py - do not edit
|
||||
|
||||
import Foundation
|
||||
import libzkgroup
|
||||
|
||||
public class GroupSecretParams: ByteArray {
|
||||
public class GroupSecretParams : ByteArray {
|
||||
|
||||
public static let SIZE: Int = 384
|
||||
|
||||
public static func generate() throws -> GroupSecretParams {
|
||||
fatalError("Not implemented.")
|
||||
var randomness: [UInt8] = Array(repeating: 0, count: Int(32))
|
||||
let result = SecRandomCopyBytes(kSecRandomDefault, randomness.count, &randomness)
|
||||
guard result == errSecSuccess else {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
return try generate(randomness: randomness)
|
||||
}
|
||||
|
||||
public static func generate(randomness: [UInt8]) throws -> GroupSecretParams {
|
||||
fatalError("Not implemented.")
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: GroupSecretParams.SIZE)
|
||||
|
||||
let ffi_return = FFI_GroupSecretParams_generateDeterministic(randomness, UInt64(randomness.count), &newContents, UInt64(newContents.count))
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
do {
|
||||
return try GroupSecretParams(contents: newContents)
|
||||
} catch ZkGroupException.IllegalArgument {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
}
|
||||
|
||||
public static func deriveFromMasterKey(groupMasterKey: GroupMasterKey) throws -> GroupSecretParams {
|
||||
fatalError("Not implemented.")
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: GroupSecretParams.SIZE)
|
||||
|
||||
let ffi_return = FFI_GroupSecretParams_deriveFromMasterKey(groupMasterKey.getInternalContentsForFFI(), UInt64(groupMasterKey.getInternalContentsForFFI().count), &newContents, UInt64(newContents.count))
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
do {
|
||||
return try GroupSecretParams(contents: newContents)
|
||||
} catch ZkGroupException.IllegalArgument {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
}
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
fatalError("Not implemented.")
|
||||
public init(contents: [UInt8]) throws {
|
||||
try super.init(newContents: contents, expectedLength: GroupSecretParams.SIZE, unrecoverable: true)
|
||||
|
||||
|
||||
let ffi_return = FFI_GroupSecretParams_checkValidContents(self.contents, UInt64(self.contents.count))
|
||||
|
||||
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
|
||||
throw ZkGroupException.IllegalArgument
|
||||
}
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
}
|
||||
|
||||
public func getMasterKey() throws -> GroupMasterKey {
|
||||
fatalError("Not implemented.")
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: GroupMasterKey.SIZE)
|
||||
|
||||
let ffi_return = FFI_GroupSecretParams_getMasterKey(self.contents, UInt64(self.contents.count), &newContents, UInt64(newContents.count))
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
do {
|
||||
return try GroupMasterKey(contents: newContents)
|
||||
} catch ZkGroupException.InvalidInput {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public func getPublicParams() throws -> GroupPublicParams {
|
||||
fatalError("Not implemented.")
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: GroupPublicParams.SIZE)
|
||||
|
||||
let ffi_return = FFI_GroupSecretParams_getPublicParams(self.contents, UInt64(self.contents.count), &newContents, UInt64(newContents.count))
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
do {
|
||||
return try GroupPublicParams(contents: newContents)
|
||||
} catch ZkGroupException.InvalidInput {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public func sign(message: [UInt8]) throws -> ChangeSignature {
|
||||
fatalError("Not implemented.")
|
||||
var randomness: [UInt8] = Array(repeating: 0, count: Int(32))
|
||||
let result = SecRandomCopyBytes(kSecRandomDefault, randomness.count, &randomness)
|
||||
guard result == errSecSuccess else {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
return try sign(randomness: randomness, message: message)
|
||||
}
|
||||
|
||||
public func sign(randomness: [UInt8], message: [UInt8]) throws -> ChangeSignature {
|
||||
fatalError("Not implemented.")
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: ChangeSignature.SIZE)
|
||||
|
||||
let ffi_return = FFI_GroupSecretParams_signDeterministic(self.contents, UInt64(self.contents.count), randomness, UInt64(randomness.count), message, UInt64(message.count), &newContents, UInt64(newContents.count))
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
do {
|
||||
return try ChangeSignature(contents: newContents)
|
||||
} catch ZkGroupException.InvalidInput {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public func serialize() -> [UInt8] {
|
||||
return contents
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -3,3 +3,11 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import libzkgroup
|
||||
|
||||
public class Native {
|
||||
static let FFI_RETURN_OK = 0;
|
||||
static let FFI_RETURN_INTERNAL_ERROR = 1; // ZkGroupError
|
||||
static let FFI_RETURN_INPUT_ERROR = 2;
|
||||
static let RANDOM_LENGTH = 32;
|
||||
}
|
||||
|
||||
@ -1,11 +1,20 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (C) 2020 Signal Messenger, LLC.
|
||||
// All rights reserved.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
//
|
||||
// Generated by zkgroup/codegen/codegen.py - do not edit
|
||||
|
||||
public class NotarySignature: ByteArray {
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
fatalError("Not implemented.")
|
||||
|
||||
public class NotarySignature : ByteArray {
|
||||
|
||||
public static let SIZE: Int = 64
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
try super.init(newContents: contents, expectedLength: NotarySignature.SIZE)
|
||||
|
||||
}
|
||||
|
||||
public func serialize() -> [UInt8] {
|
||||
|
||||
@ -1,24 +1,65 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (C) 2020 Signal Messenger, LLC.
|
||||
// All rights reserved.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
//
|
||||
// Generated by zkgroup/codegen/codegen.py - do not edit
|
||||
|
||||
import Foundation
|
||||
import libzkgroup
|
||||
|
||||
public class ProfileKey: ByteArray {
|
||||
|
||||
public static let SIZE: Int = 32
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
fatalError("Not implemented.")
|
||||
try super.init(newContents: contents, expectedLength: ProfileKey.SIZE)
|
||||
|
||||
}
|
||||
|
||||
public func getCommitment() throws -> ProfileKeyCommitment {
|
||||
fatalError("Not implemented.")
|
||||
public func getCommitment(uuid: ZKGUuid) throws -> ProfileKeyCommitment {
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: ProfileKeyCommitment.SIZE)
|
||||
|
||||
let ffi_return = FFI_ProfileKey_getCommitment(self.contents, UInt64(self.contents.count), uuid.getInternalContentsForFFI(), UInt64(uuid.getInternalContentsForFFI().count), &newContents, UInt64(newContents.count))
|
||||
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
|
||||
throw ZkGroupException.VerificationFailed
|
||||
}
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
do {
|
||||
return try ProfileKeyCommitment(contents: newContents)
|
||||
} catch ZkGroupException.InvalidInput {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public func getProfileKeyVersion() throws -> ProfileKeyVersion {
|
||||
fatalError("Not implemented.")
|
||||
public func getProfileKeyVersion(uuid: ZKGUuid) throws -> ProfileKeyVersion {
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: ProfileKeyVersion.SIZE)
|
||||
|
||||
let ffi_return = FFI_ProfileKey_getProfileKeyVersion(self.contents, UInt64(self.contents.count), uuid.getInternalContentsForFFI(), UInt64(uuid.getInternalContentsForFFI().count), &newContents, UInt64(newContents.count))
|
||||
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
|
||||
throw ZkGroupException.VerificationFailed
|
||||
}
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
do {
|
||||
return try ProfileKeyVersion(contents: newContents)
|
||||
} catch ZkGroupException.InvalidInput {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public func serialize() -> [UInt8] {
|
||||
return contents
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,13 +1,31 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (C) 2020 Signal Messenger, LLC.
|
||||
// All rights reserved.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
//
|
||||
// Generated by zkgroup/codegen/codegen.py - do not edit
|
||||
|
||||
import Foundation
|
||||
import libzkgroup
|
||||
|
||||
public class ProfileKeyCiphertext: ByteArray {
|
||||
public class ProfileKeyCiphertext : ByteArray {
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
fatalError("Not implemented.")
|
||||
public static let SIZE: Int = 64
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
try super.init(newContents: contents, expectedLength: ProfileKeyCiphertext.SIZE)
|
||||
|
||||
|
||||
let ffi_return = FFI_ProfileKeyCiphertext_checkValidContents(self.contents, UInt64(self.contents.count))
|
||||
|
||||
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
|
||||
throw ZkGroupException.InvalidInput
|
||||
}
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
}
|
||||
|
||||
public func serialize() -> [UInt8] {
|
||||
|
||||
@ -1,20 +1,52 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (C) 2020 Signal Messenger, LLC.
|
||||
// All rights reserved.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
//
|
||||
// Generated by zkgroup/codegen/codegen.py - do not edit
|
||||
|
||||
import Foundation
|
||||
import libzkgroup
|
||||
|
||||
public class ProfileKeyCommitment: ByteArray {
|
||||
public class ProfileKeyCommitment : ByteArray {
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
fatalError("Not implemented.")
|
||||
public static let SIZE: Int = 96
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
try super.init(newContents: contents, expectedLength: ProfileKeyCommitment.SIZE)
|
||||
|
||||
|
||||
let ffi_return = FFI_ProfileKeyCommitment_checkValidContents(self.contents, UInt64(self.contents.count))
|
||||
|
||||
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
|
||||
throw ZkGroupException.InvalidInput
|
||||
}
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
}
|
||||
|
||||
public func getProfileKeyVersion() throws -> ProfileKeyVersion {
|
||||
fatalError("Not implemented.")
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: ProfileKeyVersion.SIZE)
|
||||
|
||||
let ffi_return = FFI_ProfileKeyCommitment_getProfileKeyVersion(self.contents, UInt64(self.contents.count), &newContents, UInt64(newContents.count))
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
do {
|
||||
return try ProfileKeyVersion(contents: newContents)
|
||||
} catch ZkGroupException.InvalidInput {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public func serialize() -> [UInt8] {
|
||||
return contents
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,13 +1,31 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (C) 2020 Signal Messenger, LLC.
|
||||
// All rights reserved.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
//
|
||||
// Generated by zkgroup/codegen/codegen.py - do not edit
|
||||
|
||||
import Foundation
|
||||
import libzkgroup
|
||||
|
||||
public class ProfileKeyCredential: ByteArray {
|
||||
public class ProfileKeyCredential : ByteArray {
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
fatalError("Not implemented.")
|
||||
public static let SIZE: Int = 144
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
try super.init(newContents: contents, expectedLength: ProfileKeyCredential.SIZE)
|
||||
|
||||
|
||||
let ffi_return = FFI_ProfileKeyCredential_checkValidContents(self.contents, UInt64(self.contents.count))
|
||||
|
||||
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
|
||||
throw ZkGroupException.InvalidInput
|
||||
}
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
}
|
||||
|
||||
public func serialize() -> [UInt8] {
|
||||
|
||||
@ -1,24 +1,69 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (C) 2020 Signal Messenger, LLC.
|
||||
// All rights reserved.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
//
|
||||
// Generated by zkgroup/codegen/codegen.py - do not edit
|
||||
|
||||
import Foundation
|
||||
import libzkgroup
|
||||
|
||||
public class ProfileKeyCredentialPresentation: ByteArray {
|
||||
public class ProfileKeyCredentialPresentation : ByteArray {
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
fatalError("Not implemented.")
|
||||
public static let SIZE: Int = 936
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
try super.init(newContents: contents, expectedLength: ProfileKeyCredentialPresentation.SIZE)
|
||||
|
||||
|
||||
let ffi_return = FFI_ProfileKeyCredentialPresentation_checkValidContents(self.contents, UInt64(self.contents.count))
|
||||
|
||||
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
|
||||
throw ZkGroupException.InvalidInput
|
||||
}
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
}
|
||||
|
||||
public func getUuidCiphertext() throws -> UuidCiphertext {
|
||||
fatalError("Not implemented.")
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: UuidCiphertext.SIZE)
|
||||
|
||||
let ffi_return = FFI_ProfileKeyCredentialPresentation_getUuidCiphertext(self.contents, UInt64(self.contents.count), &newContents, UInt64(newContents.count))
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
do {
|
||||
return try UuidCiphertext(contents: newContents)
|
||||
} catch ZkGroupException.InvalidInput {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public func getProfileKeyCiphertext() throws -> ProfileKeyCiphertext {
|
||||
fatalError("Not implemented.")
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: ProfileKeyCiphertext.SIZE)
|
||||
|
||||
let ffi_return = FFI_ProfileKeyCredentialPresentation_getProfileKeyCiphertext(self.contents, UInt64(self.contents.count), &newContents, UInt64(newContents.count))
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
do {
|
||||
return try ProfileKeyCiphertext(contents: newContents)
|
||||
} catch ZkGroupException.InvalidInput {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public func serialize() -> [UInt8] {
|
||||
return contents
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,16 +1,35 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (C) 2020 Signal Messenger, LLC.
|
||||
// All rights reserved.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
//
|
||||
// Generated by zkgroup/codegen/codegen.py - do not edit
|
||||
|
||||
import Foundation
|
||||
import libzkgroup
|
||||
|
||||
public class ProfileKeyCredentialRequest: ByteArray {
|
||||
public class ProfileKeyCredentialRequest : ByteArray {
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
fatalError("Not implemented.")
|
||||
public static let SIZE: Int = 424
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
try super.init(newContents: contents, expectedLength: ProfileKeyCredentialRequest.SIZE)
|
||||
|
||||
|
||||
let ffi_return = FFI_ProfileKeyCredentialRequest_checkValidContents(self.contents, UInt64(self.contents.count))
|
||||
|
||||
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
|
||||
throw ZkGroupException.InvalidInput
|
||||
}
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
}
|
||||
|
||||
public func serialize() -> [UInt8] {
|
||||
return contents
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,20 +1,52 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (C) 2020 Signal Messenger, LLC.
|
||||
// All rights reserved.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
//
|
||||
// Generated by zkgroup/codegen/codegen.py - do not edit
|
||||
|
||||
import Foundation
|
||||
import libzkgroup
|
||||
|
||||
public class ProfileKeyCredentialRequestContext: ByteArray {
|
||||
public class ProfileKeyCredentialRequestContext : ByteArray {
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
fatalError("Not implemented.")
|
||||
public static let SIZE: Int = 600
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
try super.init(newContents: contents, expectedLength: ProfileKeyCredentialRequestContext.SIZE)
|
||||
|
||||
|
||||
let ffi_return = FFI_ProfileKeyCredentialRequestContext_checkValidContents(self.contents, UInt64(self.contents.count))
|
||||
|
||||
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
|
||||
throw ZkGroupException.InvalidInput
|
||||
}
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
}
|
||||
|
||||
public func getRequest() throws -> ProfileKeyCredentialRequest {
|
||||
fatalError("Not implemented.")
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: ProfileKeyCredentialRequest.SIZE)
|
||||
|
||||
let ffi_return = FFI_ProfileKeyCredentialRequestContext_getRequest(self.contents, UInt64(self.contents.count), &newContents, UInt64(newContents.count))
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
do {
|
||||
return try ProfileKeyCredentialRequest(contents: newContents)
|
||||
} catch ZkGroupException.InvalidInput {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public func serialize() -> [UInt8] {
|
||||
return contents
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,13 +1,31 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (C) 2020 Signal Messenger, LLC.
|
||||
// All rights reserved.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
//
|
||||
// Generated by zkgroup/codegen/codegen.py - do not edit
|
||||
|
||||
import Foundation
|
||||
import libzkgroup
|
||||
|
||||
public class ProfileKeyCredentialResponse: ByteArray {
|
||||
public class ProfileKeyCredentialResponse : ByteArray {
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
fatalError("Not implemented.")
|
||||
public static let SIZE: Int = 520
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
try super.init(newContents: contents, expectedLength: ProfileKeyCredentialResponse.SIZE)
|
||||
|
||||
|
||||
let ffi_return = FFI_ProfileKeyCredentialResponse_checkValidContents(self.contents, UInt64(self.contents.count))
|
||||
|
||||
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
|
||||
throw ZkGroupException.InvalidInput
|
||||
}
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
}
|
||||
|
||||
public func serialize() -> [UInt8] {
|
||||
|
||||
@ -1,11 +1,20 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (C) 2020 Signal Messenger, LLC.
|
||||
// All rights reserved.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
//
|
||||
// Generated by zkgroup/codegen/codegen.py - do not edit
|
||||
|
||||
public class ProfileKeyVersion: ByteArray {
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
fatalError("Not implemented.")
|
||||
|
||||
public class ProfileKeyVersion : ByteArray {
|
||||
|
||||
public static let SIZE: Int = 64
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
try super.init(newContents: contents, expectedLength: ProfileKeyVersion.SIZE)
|
||||
|
||||
}
|
||||
|
||||
public func serialize() -> [UInt8] {
|
||||
|
||||
@ -1,17 +1,42 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (C) 2020 Signal Messenger, LLC.
|
||||
// All rights reserved.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
//
|
||||
// Generated by zkgroup/codegen/codegen.py - do not edit
|
||||
|
||||
import Foundation
|
||||
import libzkgroup
|
||||
|
||||
public class ServerPublicParams: ByteArray {
|
||||
public class ServerPublicParams : ByteArray {
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
fatalError("Not implemented.")
|
||||
public static let SIZE: Int = 160
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
try super.init(newContents: contents, expectedLength: ServerPublicParams.SIZE, unrecoverable: true)
|
||||
|
||||
|
||||
let ffi_return = FFI_ServerPublicParams_checkValidContents(self.contents, UInt64(self.contents.count))
|
||||
|
||||
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
|
||||
throw ZkGroupException.IllegalArgument
|
||||
}
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
}
|
||||
|
||||
public func verifySignature(message: [UInt8], notarySignature: NotarySignature) throws {
|
||||
fatalError("Not implemented.")
|
||||
let ffi_return = FFI_ServerPublicParams_verifySignature(self.contents, UInt64(self.contents.count), message, UInt64(message.count), notarySignature.getInternalContentsForFFI(), UInt64(notarySignature.getInternalContentsForFFI().count))
|
||||
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
|
||||
throw ZkGroupException.VerificationFailed
|
||||
}
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
}
|
||||
|
||||
public func serialize() -> [UInt8] {
|
||||
|
||||
@ -1,33 +1,96 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (C) 2020 Signal Messenger, LLC.
|
||||
// All rights reserved.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
//
|
||||
// Generated by zkgroup/codegen/codegen.py - do not edit
|
||||
|
||||
import Foundation
|
||||
import libzkgroup
|
||||
|
||||
public class ServerSecretParams: ByteArray {
|
||||
public class ServerSecretParams : ByteArray {
|
||||
|
||||
public static let SIZE: Int = 896
|
||||
|
||||
public static func generate() throws -> ServerSecretParams {
|
||||
fatalError("Not implemented.")
|
||||
var randomness: [UInt8] = Array(repeating: 0, count: Int(32))
|
||||
let result = SecRandomCopyBytes(kSecRandomDefault, randomness.count, &randomness)
|
||||
guard result == errSecSuccess else {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
return try generate(randomness: randomness)
|
||||
}
|
||||
|
||||
public static func generate(randomness: [UInt8]) throws -> ServerSecretParams {
|
||||
fatalError("Not implemented.")
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: ServerSecretParams.SIZE)
|
||||
|
||||
let ffi_return = FFI_ServerSecretParams_generateDeterministic(randomness, UInt64(randomness.count), &newContents, UInt64(newContents.count))
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
do {
|
||||
return try ServerSecretParams(contents: newContents)
|
||||
} catch ZkGroupException.IllegalArgument {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
}
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
fatalError("Not implemented.")
|
||||
public init(contents: [UInt8]) throws {
|
||||
try super.init(newContents: contents, expectedLength: ServerSecretParams.SIZE, unrecoverable: true)
|
||||
|
||||
|
||||
let ffi_return = FFI_ServerSecretParams_checkValidContents(self.contents, UInt64(self.contents.count))
|
||||
|
||||
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
|
||||
throw ZkGroupException.IllegalArgument
|
||||
}
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
}
|
||||
|
||||
public func getPublicParams() throws -> ServerPublicParams {
|
||||
fatalError("Not implemented.")
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: Int(ServerPublicParams.SIZE))
|
||||
|
||||
let ffi_return = FFI_ServerSecretParams_getPublicParams(self.contents, UInt64(self.contents.count), &newContents, UInt64(newContents.count))
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
return try ServerPublicParams(contents: newContents)
|
||||
}
|
||||
|
||||
public func sign(message: [UInt8]) throws -> NotarySignature {
|
||||
fatalError("Not implemented.")
|
||||
var randomness: [UInt8] = Array(repeating: 0, count: Int(32))
|
||||
let result = SecRandomCopyBytes(kSecRandomDefault, randomness.count, &randomness)
|
||||
guard result == errSecSuccess else {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
return try sign(randomness: randomness, message: message)
|
||||
}
|
||||
|
||||
public func sign(randomness: [UInt8], message: [UInt8]) throws -> NotarySignature {
|
||||
fatalError("Not implemented.")
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: NotarySignature.SIZE)
|
||||
|
||||
let ffi_return = FFI_ServerSecretParams_signDeterministic(self.contents, UInt64(self.contents.count), randomness, UInt64(randomness.count), message, UInt64(message.count), &newContents, UInt64(newContents.count))
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
do {
|
||||
return try NotarySignature(contents: newContents)
|
||||
} catch ZkGroupException.InvalidInput {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public func serialize() -> [UInt8] {
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
// Generated by zkgroup/codegen/codegen.py - do not edit
|
||||
|
||||
import Foundation
|
||||
import libzkgroup
|
||||
|
||||
public class ServerZkAuthOperations {
|
||||
|
||||
@ -13,14 +12,41 @@ public class ServerZkAuthOperations {
|
||||
}
|
||||
|
||||
public func issueAuthCredential(uuid: ZKGUuid, redemptionTime: UInt32) throws -> AuthCredentialResponse {
|
||||
fatalError("Not implemented.")
|
||||
var randomness: [UInt8] = Array(repeating: 0, count: Int(32))
|
||||
let result = SecRandomCopyBytes(kSecRandomDefault, randomness.count, &randomness)
|
||||
guard result == errSecSuccess else {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
return try issueAuthCredential(randomness: randomness, uuid: uuid, redemptionTime: redemptionTime)
|
||||
}
|
||||
|
||||
public func issueAuthCredential(randomness: [UInt8], uuid: ZKGUuid, redemptionTime: UInt32) throws -> AuthCredentialResponse {
|
||||
fatalError("Not implemented.")
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: AuthCredentialResponse.SIZE)
|
||||
|
||||
let ffi_return = FFI_ServerSecretParams_issueAuthCredentialDeterministic(serverSecretParams.getInternalContentsForFFI(), UInt64(serverSecretParams.getInternalContentsForFFI().count), randomness, UInt64(randomness.count), uuid.getInternalContentsForFFI(), UInt64(uuid.getInternalContentsForFFI().count), redemptionTime, &newContents, UInt64(newContents.count))
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
do {
|
||||
return try AuthCredentialResponse(contents: newContents)
|
||||
} catch ZkGroupException.InvalidInput {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public func verifyAuthCredentialPresentation(groupPublicParams: GroupPublicParams, authCredentialPresentation: AuthCredentialPresentation) throws {
|
||||
fatalError("Not implemented.")
|
||||
let ffi_return = FFI_ServerSecretParams_verifyAuthCredentialPresentation(serverSecretParams.getInternalContentsForFFI(), UInt64(serverSecretParams.getInternalContentsForFFI().count), groupPublicParams.getInternalContentsForFFI(), UInt64(groupPublicParams.getInternalContentsForFFI().count), authCredentialPresentation.getInternalContentsForFFI(), UInt64(authCredentialPresentation.getInternalContentsForFFI().count))
|
||||
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
|
||||
throw ZkGroupException.VerificationFailed
|
||||
}
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
// Generated by zkgroup/codegen/codegen.py - do not edit
|
||||
|
||||
import Foundation
|
||||
import libzkgroup
|
||||
|
||||
public class ServerZkProfileOperations {
|
||||
|
||||
@ -13,15 +12,44 @@ public class ServerZkProfileOperations {
|
||||
}
|
||||
|
||||
public func issueProfileKeyCredential(profileKeyCredentialRequest: ProfileKeyCredentialRequest, uuid: ZKGUuid, profileKeyCommitment: ProfileKeyCommitment) throws -> ProfileKeyCredentialResponse {
|
||||
fatalError("Not implemented.")
|
||||
var randomness: [UInt8] = Array(repeating: 0, count: Int(32))
|
||||
let result = SecRandomCopyBytes(kSecRandomDefault, randomness.count, &randomness)
|
||||
guard result == errSecSuccess else {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
return try issueProfileKeyCredential(randomness: randomness, profileKeyCredentialRequest: profileKeyCredentialRequest, uuid: uuid, profileKeyCommitment: profileKeyCommitment)
|
||||
}
|
||||
|
||||
public func issueProfileKeyCredential(randomness: [UInt8], profileKeyCredentialRequest: ProfileKeyCredentialRequest, uuid: ZKGUuid, profileKeyCommitment: ProfileKeyCommitment) throws -> ProfileKeyCredentialResponse {
|
||||
fatalError("Not implemented.")
|
||||
var newContents: [UInt8] = Array(repeating: 0, count: ProfileKeyCredentialResponse.SIZE)
|
||||
|
||||
let ffi_return = FFI_ServerSecretParams_issueProfileKeyCredentialDeterministic(serverSecretParams.getInternalContentsForFFI(), UInt64(serverSecretParams.getInternalContentsForFFI().count), randomness, UInt64(randomness.count), profileKeyCredentialRequest.getInternalContentsForFFI(), UInt64(profileKeyCredentialRequest.getInternalContentsForFFI().count), uuid.getInternalContentsForFFI(), UInt64(uuid.getInternalContentsForFFI().count), profileKeyCommitment.getInternalContentsForFFI(), UInt64(profileKeyCommitment.getInternalContentsForFFI().count), &newContents, UInt64(newContents.count))
|
||||
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
|
||||
throw ZkGroupException.VerificationFailed
|
||||
}
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
|
||||
do {
|
||||
return try ProfileKeyCredentialResponse(contents: newContents)
|
||||
} catch ZkGroupException.InvalidInput {
|
||||
throw ZkGroupException.AssertionError
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public func verifyProfileKeyCredentialPresentation(groupPublicParams: GroupPublicParams, profileKeyCredentialPresentation: ProfileKeyCredentialPresentation) throws {
|
||||
fatalError("Not implemented.")
|
||||
let ffi_return = FFI_ServerSecretParams_verifyProfileKeyCredentialPresentation(serverSecretParams.getInternalContentsForFFI(), UInt64(serverSecretParams.getInternalContentsForFFI().count), groupPublicParams.getInternalContentsForFFI(), UInt64(groupPublicParams.getInternalContentsForFFI().count), profileKeyCredentialPresentation.getInternalContentsForFFI(), UInt64(profileKeyCredentialPresentation.getInternalContentsForFFI().count))
|
||||
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
|
||||
throw ZkGroupException.VerificationFailed
|
||||
}
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,13 +1,10 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
public class ZKGUuid: ByteArray {
|
||||
public class ZKGUuid : ByteArray {
|
||||
|
||||
static let SIZE: Int = 16
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
fatalError("Not implemented.")
|
||||
public init(contents: [UInt8]) throws {
|
||||
try super.init(newContents: contents, expectedLength: ZKGUuid.SIZE)
|
||||
}
|
||||
|
||||
public func serialize() -> [UInt8] {
|
||||
|
||||
@ -1,13 +1,31 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (C) 2020 Signal Messenger, LLC.
|
||||
// All rights reserved.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
//
|
||||
// Generated by zkgroup/codegen/codegen.py - do not edit
|
||||
|
||||
import Foundation
|
||||
import libzkgroup
|
||||
|
||||
public class UuidCiphertext: ByteArray {
|
||||
public class UuidCiphertext : ByteArray {
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
fatalError("Not implemented.")
|
||||
public static let SIZE: Int = 64
|
||||
|
||||
public init(contents: [UInt8]) throws {
|
||||
try super.init(newContents: contents, expectedLength: UuidCiphertext.SIZE)
|
||||
|
||||
|
||||
let ffi_return = FFI_UuidCiphertext_checkValidContents(self.contents, UInt64(self.contents.count))
|
||||
|
||||
if (ffi_return == Native.FFI_RETURN_INPUT_ERROR) {
|
||||
throw ZkGroupException.InvalidInput
|
||||
}
|
||||
|
||||
if (ffi_return != Native.FFI_RETURN_OK) {
|
||||
throw ZkGroupException.ZkGroupError
|
||||
}
|
||||
}
|
||||
|
||||
public func serialize() -> [UInt8] {
|
||||
|
||||
@ -11,3 +11,5 @@ FOUNDATION_EXPORT double ZKGroupVersionNumber;
|
||||
FOUNDATION_EXPORT const unsigned char ZKGroupVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <ZKGroup/PublicHeader.h>
|
||||
|
||||
|
||||
|
||||
BIN
ZKGroup/libzkgroup/libzkgroup_ios.a
Normal file
BIN
ZKGroup/libzkgroup/libzkgroup_ios.a
Normal file
Binary file not shown.
4
ZKGroup/libzkgroup/module.modulemap
Normal file
4
ZKGroup/libzkgroup/module.modulemap
Normal file
@ -0,0 +1,4 @@
|
||||
module libzkgroup {
|
||||
header "zkgroup.h"
|
||||
export *
|
||||
}
|
||||
361
ZKGroup/libzkgroup/zkgroup.h
Normal file
361
ZKGroup/libzkgroup/zkgroup.h
Normal file
@ -0,0 +1,361 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define AUTH_CREDENTIAL_LEN 404
|
||||
|
||||
#define AUTH_CREDENTIAL_PRESENTATION_LEN 620
|
||||
|
||||
#define AUTH_CREDENTIAL_RESPONSE_LEN 392
|
||||
|
||||
#define CLIENT_CREDENTIAL_MANAGER_LEN 256
|
||||
|
||||
#define FFI_RETURN_INPUT_ERROR 2
|
||||
|
||||
#define FFI_RETURN_INTERNAL_ERROR 1
|
||||
|
||||
#define FFI_RETURN_OK 0
|
||||
|
||||
#define GROUP_IDENTIFIER_LEN 32
|
||||
|
||||
#define GROUP_MASTER_KEY_LEN 32
|
||||
|
||||
#define GROUP_PUBLIC_PARAMS_LEN 128
|
||||
|
||||
#define GROUP_SECRET_PARAMS_LEN 384
|
||||
|
||||
#define NUM_AUTH_CRED_ATTRIBUTES 4
|
||||
|
||||
#define NUM_PROFILE_KEY_CRED_ATTRIBUTES 6
|
||||
|
||||
#define PROFILE_KEY_CIPHERTEXT_LEN 64
|
||||
|
||||
#define PROFILE_KEY_COMMITMENT_LEN 96
|
||||
|
||||
#define PROFILE_KEY_CREDENTIAL_LEN 144
|
||||
|
||||
#define PROFILE_KEY_CREDENTIAL_PRESENTATION_LEN 936
|
||||
|
||||
#define PROFILE_KEY_CREDENTIAL_REQUEST_CONTEXT_LEN 600
|
||||
|
||||
#define PROFILE_KEY_CREDENTIAL_REQUEST_LEN 424
|
||||
|
||||
#define PROFILE_KEY_CREDENTIAL_RESPONSE_LEN 520
|
||||
|
||||
#define PROFILE_KEY_LEN 32
|
||||
|
||||
#define PROFILE_KEY_VERSION_ENCODED_LEN 64
|
||||
|
||||
#define PROFILE_KEY_VERSION_LEN 32
|
||||
|
||||
#define RANDOMNESS_LEN 32
|
||||
|
||||
#define SERVER_PUBLIC_PARAMS_LEN 160
|
||||
|
||||
#define SERVER_SECRET_PARAMS_LEN 896
|
||||
|
||||
#define SIGNATURE_LEN 64
|
||||
|
||||
#define UUID_CIPHERTEXT_LEN 64
|
||||
|
||||
#define UUID_LEN 16
|
||||
|
||||
int32_t FFI_AuthCredentialPresentation_checkValidContents(const uint8_t *authCredentialPresentation,
|
||||
uint64_t authCredentialPresentationLen);
|
||||
|
||||
int32_t FFI_AuthCredentialPresentation_getRedemptionTime(const uint8_t *authCredentialPresentation,
|
||||
uint64_t authCredentialPresentationLen,
|
||||
uint8_t *redemptionTimeOut,
|
||||
uint64_t redemptionTimeLen);
|
||||
|
||||
int32_t FFI_AuthCredentialPresentation_getUuidCiphertext(const uint8_t *authCredentialPresentation,
|
||||
uint64_t authCredentialPresentationLen,
|
||||
uint8_t *uuidCiphertextOut,
|
||||
uint64_t uuidCiphertextLen);
|
||||
|
||||
int32_t FFI_AuthCredentialResponse_checkValidContents(const uint8_t *authCredentialResponse,
|
||||
uint64_t authCredentialResponseLen);
|
||||
|
||||
int32_t FFI_AuthCredential_checkValidContents(const uint8_t *authCredential,
|
||||
uint64_t authCredentialLen);
|
||||
|
||||
int32_t FFI_GroupPublicParams_checkValidContents(const uint8_t *groupPublicParams,
|
||||
uint64_t groupPublicParamsLen);
|
||||
|
||||
int32_t FFI_GroupPublicParams_getGroupIdentifier(const uint8_t *groupPublicParams,
|
||||
uint64_t groupPublicParamsLen,
|
||||
uint8_t *groupIdentifierOut,
|
||||
uint64_t groupIdentifierLen);
|
||||
|
||||
int32_t FFI_GroupPublicParams_verifySignature(const uint8_t *groupPublicParams,
|
||||
uint64_t groupPublicParamsLen,
|
||||
const uint8_t *message,
|
||||
uint64_t messageLen,
|
||||
const uint8_t *changeSignature,
|
||||
uint64_t changeSignatureLen);
|
||||
|
||||
int32_t FFI_GroupSecretParams_checkValidContents(const uint8_t *groupSecretParams,
|
||||
uint64_t groupSecretParamsLen);
|
||||
|
||||
int32_t FFI_GroupSecretParams_decryptBlob(const uint8_t *groupSecretParams,
|
||||
uint64_t groupSecretParamsLen,
|
||||
const uint8_t *blobCiphertext,
|
||||
uint64_t blobCiphertextLen,
|
||||
uint8_t *plaintextOut,
|
||||
uint64_t plaintextLen);
|
||||
|
||||
int32_t FFI_GroupSecretParams_decryptProfileKey(const uint8_t *groupSecretParams,
|
||||
uint64_t groupSecretParamsLen,
|
||||
const uint8_t *profileKeyCiphertext,
|
||||
uint64_t profileKeyCiphertextLen,
|
||||
const uint8_t *uuid,
|
||||
uint64_t uuidLen,
|
||||
uint8_t *profileKeyOut,
|
||||
uint64_t profileKeyLen);
|
||||
|
||||
int32_t FFI_GroupSecretParams_decryptUuid(const uint8_t *groupSecretParams,
|
||||
uint64_t groupSecretParamsLen,
|
||||
const uint8_t *uuidCiphertext,
|
||||
uint64_t uuidCiphertextLen,
|
||||
uint8_t *uuidOut,
|
||||
uint64_t uuidLen);
|
||||
|
||||
int32_t FFI_GroupSecretParams_deriveFromMasterKey(const uint8_t *groupMasterKey,
|
||||
uint64_t groupMasterKeyLen,
|
||||
uint8_t *groupSecretParamsOut,
|
||||
uint64_t groupSecretParamsLen);
|
||||
|
||||
int32_t FFI_GroupSecretParams_encryptBlobDeterministic(const uint8_t *groupSecretParams,
|
||||
uint64_t groupSecretParamsLen,
|
||||
const uint8_t *randomness,
|
||||
uint64_t randomnessLen,
|
||||
const uint8_t *plaintext,
|
||||
uint64_t plaintextLen,
|
||||
uint8_t *blobCiphertextOut,
|
||||
uint64_t blobCiphertextLen);
|
||||
|
||||
int32_t FFI_GroupSecretParams_encryptProfileKeyDeterministic(const uint8_t *groupSecretParams,
|
||||
uint64_t groupSecretParamsLen,
|
||||
const uint8_t *randomness,
|
||||
uint64_t randomnessLen,
|
||||
const uint8_t *profileKey,
|
||||
uint64_t profileKeyLen,
|
||||
const uint8_t *uuid,
|
||||
uint64_t uuidLen,
|
||||
uint8_t *profileKeyCiphertextOut,
|
||||
uint64_t profileKeyCiphertextLen);
|
||||
|
||||
int32_t FFI_GroupSecretParams_encryptUuid(const uint8_t *groupSecretParams,
|
||||
uint64_t groupSecretParamsLen,
|
||||
const uint8_t *uuid,
|
||||
uint64_t uuidLen,
|
||||
uint8_t *uuidCiphertextOut,
|
||||
uint64_t uuidCiphertextLen);
|
||||
|
||||
int32_t FFI_GroupSecretParams_generateDeterministic(const uint8_t *randomness,
|
||||
uint64_t randomnessLen,
|
||||
uint8_t *groupSecretParamsOut,
|
||||
uint64_t groupSecretParamsLen);
|
||||
|
||||
int32_t FFI_GroupSecretParams_getMasterKey(const uint8_t *groupSecretParams,
|
||||
uint64_t groupSecretParamsLen,
|
||||
uint8_t *groupMasterKeyOut,
|
||||
uint64_t groupMasterKeyLen);
|
||||
|
||||
int32_t FFI_GroupSecretParams_getPublicParams(const uint8_t *groupSecretParams,
|
||||
uint64_t groupSecretParamsLen,
|
||||
uint8_t *groupPublicParamsOut,
|
||||
uint64_t groupPublicParamsLen);
|
||||
|
||||
int32_t FFI_GroupSecretParams_signDeterministic(const uint8_t *groupSecretParams,
|
||||
uint64_t groupSecretParamsLen,
|
||||
const uint8_t *randomness,
|
||||
uint64_t randomnessLen,
|
||||
const uint8_t *message,
|
||||
uint64_t messageLen,
|
||||
uint8_t *changeSignatureOut,
|
||||
uint64_t changeSignatureLen);
|
||||
|
||||
int32_t FFI_ProfileKeyCiphertext_checkValidContents(const uint8_t *profileKeyCiphertext,
|
||||
uint64_t profileKeyCiphertextLen);
|
||||
|
||||
int32_t FFI_ProfileKeyCommitment_checkValidContents(const uint8_t *profileKeyCommitment,
|
||||
uint64_t profileKeyCommitmentLen);
|
||||
|
||||
int32_t FFI_ProfileKeyCommitment_getProfileKeyVersion(const uint8_t *profileKeyCommitment,
|
||||
uint64_t profileKeyCommitmentLen,
|
||||
uint8_t *profileKeyVersionOut,
|
||||
uint64_t profileKeyVersionLen);
|
||||
|
||||
int32_t FFI_ProfileKeyCredentialPresentation_checkValidContents(const uint8_t *profileKeyCredentialPresentation,
|
||||
uint64_t profileKeyCredentialPresentationLen);
|
||||
|
||||
int32_t FFI_ProfileKeyCredentialPresentation_getProfileKeyCiphertext(const uint8_t *profileKeyCredentialPresentation,
|
||||
uint64_t profileKeyCredentialPresentationLen,
|
||||
uint8_t *profileKeyCiphertextOut,
|
||||
uint64_t profileKeyCiphertextLen);
|
||||
|
||||
int32_t FFI_ProfileKeyCredentialPresentation_getUuidCiphertext(const uint8_t *profileKeyCredentialPresentation,
|
||||
uint64_t profileKeyCredentialPresentationLen,
|
||||
uint8_t *uuidCiphertextOut,
|
||||
uint64_t uuidCiphertextLen);
|
||||
|
||||
int32_t FFI_ProfileKeyCredentialRequestContext_checkValidContents(const uint8_t *profileKeyCredentialRequestContext,
|
||||
uint64_t profileKeyCredentialRequestContextLen);
|
||||
|
||||
int32_t FFI_ProfileKeyCredentialRequestContext_getRequest(const uint8_t *profileKeyCredentialRequestContext,
|
||||
uint64_t profileKeyCredentialRequestContextLen,
|
||||
uint8_t *profileKeyCredentialRequestOut,
|
||||
uint64_t profileKeyCredentialRequestLen);
|
||||
|
||||
int32_t FFI_ProfileKeyCredentialRequest_checkValidContents(const uint8_t *profileKeyCredentialRequest,
|
||||
uint64_t profileKeyCredentialRequestLen);
|
||||
|
||||
int32_t FFI_ProfileKeyCredentialResponse_checkValidContents(const uint8_t *profileKeyCredentialResponse,
|
||||
uint64_t profileKeyCredentialResponseLen);
|
||||
|
||||
int32_t FFI_ProfileKeyCredential_checkValidContents(const uint8_t *profileKeyCredential,
|
||||
uint64_t profileKeyCredentialLen);
|
||||
|
||||
int32_t FFI_ProfileKey_getCommitment(const uint8_t *profileKey,
|
||||
uint64_t profileKeyLen,
|
||||
const uint8_t *uuid,
|
||||
uint64_t uuidLen,
|
||||
uint8_t *profileKeyCommitmentOut,
|
||||
uint64_t profileKeyCommitmentLen);
|
||||
|
||||
int32_t FFI_ProfileKey_getProfileKeyVersion(const uint8_t *profileKey,
|
||||
uint64_t profileKeyLen,
|
||||
const uint8_t *uuid,
|
||||
uint64_t uuidLen,
|
||||
uint8_t *profileKeyVersionOut,
|
||||
uint64_t profileKeyVersionLen);
|
||||
|
||||
int32_t FFI_Randomness_checkValidContents(const uint8_t *randomness, uint64_t randomnessLen);
|
||||
|
||||
int32_t FFI_ServerPublicParams_checkValidContents(const uint8_t *serverPublicParams,
|
||||
uint64_t serverPublicParamsLen);
|
||||
|
||||
int32_t FFI_ServerPublicParams_createAuthCredentialPresentationDeterministic(const uint8_t *serverPublicParams,
|
||||
uint64_t serverPublicParamsLen,
|
||||
const uint8_t *randomness,
|
||||
uint64_t randomnessLen,
|
||||
const uint8_t *groupSecretParams,
|
||||
uint64_t groupSecretParamsLen,
|
||||
const uint8_t *authCredential,
|
||||
uint64_t authCredentialLen,
|
||||
uint8_t *authCredentialPresentationOut,
|
||||
uint64_t authCredentialPresentationLen);
|
||||
|
||||
int32_t FFI_ServerPublicParams_createProfileKeyCredentialPresentationDeterministic(const uint8_t *serverPublicParams,
|
||||
uint64_t serverPublicParamsLen,
|
||||
const uint8_t *randomness,
|
||||
uint64_t randomnessLen,
|
||||
const uint8_t *groupSecretParams,
|
||||
uint64_t groupSecretParamsLen,
|
||||
const uint8_t *profileKeyCredential,
|
||||
uint64_t profileKeyCredentialLen,
|
||||
uint8_t *profileKeyCredentialPresentationOut,
|
||||
uint64_t profileKeyCredentialPresentationLen);
|
||||
|
||||
int32_t FFI_ServerPublicParams_createProfileKeyCredentialRequestContextDeterministic(const uint8_t *serverPublicParams,
|
||||
uint64_t serverPublicParamsLen,
|
||||
const uint8_t *randomness,
|
||||
uint64_t randomnessLen,
|
||||
const uint8_t *uuid,
|
||||
uint64_t uuidLen,
|
||||
const uint8_t *profileKey,
|
||||
uint64_t profileKeyLen,
|
||||
uint8_t *profileKeyCredentialRequestContextOut,
|
||||
uint64_t profileKeyCredentialRequestContextLen);
|
||||
|
||||
int32_t FFI_ServerPublicParams_receiveAuthCredential(const uint8_t *serverPublicParams,
|
||||
uint64_t serverPublicParamsLen,
|
||||
const uint8_t *uuid,
|
||||
uint64_t uuidLen,
|
||||
uint32_t redemptionTime,
|
||||
const uint8_t *authCredentialResponse,
|
||||
uint64_t authCredentialResponseLen,
|
||||
uint8_t *authCredentialOut,
|
||||
uint64_t authCredentialLen);
|
||||
|
||||
int32_t FFI_ServerPublicParams_receiveProfileKeyCredential(const uint8_t *serverPublicParams,
|
||||
uint64_t serverPublicParamsLen,
|
||||
const uint8_t *profileKeyCredentialRequestContext,
|
||||
uint64_t profileKeyCredentialRequestContextLen,
|
||||
const uint8_t *profileKeyCredentialResponse,
|
||||
uint64_t profileKeyCredentialResponseLen,
|
||||
uint8_t *profileKeyCredentialOut,
|
||||
uint64_t profileKeyCredentialLen);
|
||||
|
||||
int32_t FFI_ServerPublicParams_verifySignature(const uint8_t *serverPublicParams,
|
||||
uint64_t serverPublicParamsLen,
|
||||
const uint8_t *message,
|
||||
uint64_t messageLen,
|
||||
const uint8_t *notarySignature,
|
||||
uint64_t notarySignatureLen);
|
||||
|
||||
int32_t FFI_ServerSecretParams_checkValidContents(const uint8_t *serverSecretParams,
|
||||
uint64_t serverSecretParamsLen);
|
||||
|
||||
int32_t FFI_ServerSecretParams_generateDeterministic(const uint8_t *randomness,
|
||||
uint64_t randomnessLen,
|
||||
uint8_t *serverSecretParamsOut,
|
||||
uint64_t serverSecretParamsLen);
|
||||
|
||||
int32_t FFI_ServerSecretParams_getPublicParams(const uint8_t *serverSecretParams,
|
||||
uint64_t serverSecretParamsLen,
|
||||
uint8_t *serverPublicParamsOut,
|
||||
uint64_t serverPublicParamsLen);
|
||||
|
||||
int32_t FFI_ServerSecretParams_issueAuthCredentialDeterministic(const uint8_t *serverSecretParams,
|
||||
uint64_t serverSecretParamsLen,
|
||||
const uint8_t *randomness,
|
||||
uint64_t randomnessLen,
|
||||
const uint8_t *uuid,
|
||||
uint64_t uuidLen,
|
||||
uint32_t redemptionTime,
|
||||
uint8_t *authCredentialResponseOut,
|
||||
uint64_t authCredentialResponseLen);
|
||||
|
||||
int32_t FFI_ServerSecretParams_issueProfileKeyCredentialDeterministic(const uint8_t *serverSecretParams,
|
||||
uint64_t serverSecretParamsLen,
|
||||
const uint8_t *randomness,
|
||||
uint64_t randomnessLen,
|
||||
const uint8_t *profileKeyCredentialRequest,
|
||||
uint64_t profileKeyCredentialRequestLen,
|
||||
const uint8_t *uuid,
|
||||
uint64_t uuidLen,
|
||||
const uint8_t *profileKeyCommitment,
|
||||
uint64_t profileKeyCommitmentLen,
|
||||
uint8_t *profileKeyCredentialResponseOut,
|
||||
uint64_t profileKeyCredentialResponseLen);
|
||||
|
||||
int32_t FFI_ServerSecretParams_signDeterministic(const uint8_t *serverSecretParams,
|
||||
uint64_t serverSecretParamsLen,
|
||||
const uint8_t *randomness,
|
||||
uint64_t randomnessLen,
|
||||
const uint8_t *message,
|
||||
uint64_t messageLen,
|
||||
uint8_t *notarySignatureOut,
|
||||
uint64_t notarySignatureLen);
|
||||
|
||||
int32_t FFI_ServerSecretParams_verifyAuthCredentialPresentation(const uint8_t *serverSecretParams,
|
||||
uint64_t serverSecretParamsLen,
|
||||
const uint8_t *groupPublicParams,
|
||||
uint64_t groupPublicParamsLen,
|
||||
const uint8_t *authCredentialPresentation,
|
||||
uint64_t authCredentialPresentationLen);
|
||||
|
||||
int32_t FFI_ServerSecretParams_verifyProfileKeyCredentialPresentation(const uint8_t *serverSecretParams,
|
||||
uint64_t serverSecretParamsLen,
|
||||
const uint8_t *groupPublicParams,
|
||||
uint64_t groupPublicParamsLen,
|
||||
const uint8_t *profileKeyCredentialPresentation,
|
||||
uint64_t profileKeyCredentialPresentationLen);
|
||||
|
||||
int32_t FFI_UuidCiphertext_checkValidContents(const uint8_t *uuidCiphertext,
|
||||
uint64_t uuidCiphertextLen);
|
||||
|
||||
int32_t FFI_Uuid_checkValidContents(const uint8_t *uuid, uint64_t uuidLen);
|
||||
@ -1,5 +1,5 @@
|
||||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (c) 2020 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
@ -7,4 +7,303 @@ import XCTest
|
||||
|
||||
class ZKGroupTests: XCTestCase {
|
||||
|
||||
let TEST_ARRAY_16: [UInt8] = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f]
|
||||
|
||||
let TEST_ARRAY_32: [UInt8] = [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f]
|
||||
|
||||
let TEST_ARRAY_32_1: [UInt8] = [0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73,
|
||||
0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83]
|
||||
|
||||
let TEST_ARRAY_32_2: [UInt8] = [0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
|
||||
0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7]
|
||||
|
||||
let TEST_ARRAY_32_3: [UInt8] = [1, 2, 3, 4, 5, 6, 7, 8, 9,
|
||||
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
|
||||
28, 29, 30, 31, 32]
|
||||
|
||||
let TEST_ARRAY_32_4: [UInt8] = [
|
||||
2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
|
||||
28, 29, 30, 31, 32, 33]
|
||||
|
||||
let TEST_ARRAY_32_5: [UInt8] = [0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12,
|
||||
0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22]
|
||||
|
||||
let authPresentationResult: [UInt8] = [
|
||||
0xc0, 0x51, 0xa9, 0xc1, 0x4d, 0xd9, 0x80, 0xbb, 0xc6, 0x6f, 0x30, 0x98, 0x0f, 0xb9, 0x95, 0x74,
|
||||
0x09, 0x38, 0x30, 0xba, 0x52, 0x65, 0xf7, 0x87, 0x1f, 0x57, 0x23, 0xa6, 0x87, 0xdc, 0x75, 0x35,
|
||||
0xca, 0x44, 0x2d, 0x45, 0xf9, 0xf4, 0x39, 0xc9, 0x32, 0x76, 0x46, 0x13, 0x95, 0x52, 0x75, 0xd8,
|
||||
0x22, 0xbd, 0x3a, 0xb1, 0xf2, 0x91, 0x04, 0xc0, 0x35, 0x8d, 0xa2, 0x9f, 0x83, 0x15, 0x05, 0x2d,
|
||||
0x7c, 0x5f, 0x9f, 0x31, 0x95, 0xe5, 0xed, 0x27, 0xfc, 0xaf, 0x25, 0x56, 0x4e, 0xb3, 0xc4, 0x19,
|
||||
0xda, 0x5b, 0x0d, 0x7e, 0x2f, 0x4f, 0x4b, 0xaa, 0x70, 0xc1, 0x2d, 0xc1, 0x21, 0x74, 0xe3, 0x7d,
|
||||
0x50, 0xc2, 0xa9, 0x3b, 0x80, 0x3d, 0x8c, 0x97, 0x2f, 0x12, 0xaf, 0x02, 0x6a, 0xb6, 0x0d, 0x91,
|
||||
0xa4, 0xc4, 0xba, 0x54, 0x84, 0x2e, 0x73, 0x07, 0x3c, 0x0b, 0x52, 0x0f, 0x25, 0x13, 0x10, 0x5a,
|
||||
0x6e, 0x72, 0x35, 0x02, 0x04, 0xc1, 0x8d, 0x68, 0x66, 0x45, 0xca, 0x49, 0x91, 0xac, 0x56, 0xa5,
|
||||
0x57, 0xf1, 0xe0, 0x5f, 0x77, 0x16, 0x97, 0xfb, 0x6a, 0xef, 0x6d, 0x1d, 0xb7, 0x2e, 0x63, 0x25,
|
||||
0xe0, 0xd3, 0x97, 0xfb, 0x79, 0x51, 0xfd, 0xfa, 0x1e, 0x3a, 0xe3, 0x28, 0x24, 0x42, 0x63, 0xd4,
|
||||
0x8b, 0x4a, 0x74, 0xde, 0x88, 0xe5, 0x4f, 0xc8, 0xb8, 0x42, 0x7b, 0xf5, 0x69, 0x11, 0xf0, 0x4b,
|
||||
0xf2, 0x8f, 0x0a, 0xc8, 0x7f, 0x54, 0x9b, 0x33, 0xc3, 0x24, 0xb0, 0x06, 0x39, 0x13, 0x19, 0x16,
|
||||
0x86, 0xb7, 0xbb, 0xc8, 0x72, 0x46, 0x36, 0xd9, 0x1b, 0x56, 0x7c, 0xb7, 0x54, 0x3c, 0x66, 0x39,
|
||||
0x48, 0x56, 0xa7, 0x0e, 0xbc, 0x0f, 0x09, 0xdb, 0x48, 0x92, 0x49, 0x9c, 0xe6, 0x25, 0xbd, 0xd3,
|
||||
0xfe, 0x42, 0xe3, 0xd8, 0xd8, 0x01, 0x2c, 0xc5, 0x0f, 0xcf, 0x76, 0xf5, 0x8a, 0xb5, 0xfc, 0x39,
|
||||
0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x05, 0xbf, 0xfd, 0x51, 0xb8, 0x46, 0x43,
|
||||
0x39, 0xda, 0x56, 0x2b, 0xb0, 0x0e, 0xfb, 0xe2, 0xfd, 0xf2, 0xa3, 0x9f, 0xaa, 0xc8, 0x90, 0xb7,
|
||||
0xcc, 0xf2, 0xa8, 0xf7, 0x8e, 0xe3, 0x92, 0x03, 0x47, 0x57, 0x4f, 0x11, 0xf0, 0xce, 0x50, 0x37,
|
||||
0x0e, 0x85, 0x46, 0x60, 0x94, 0x3f, 0x28, 0x47, 0x4e, 0xae, 0x61, 0xc0, 0x89, 0xb2, 0x4d, 0xed,
|
||||
0xa5, 0xd2, 0x72, 0xb6, 0x61, 0x5a, 0x75, 0x00, 0x75, 0x3a, 0x3b, 0x54, 0xc7, 0xd1, 0x47, 0x00,
|
||||
0x5b, 0x6b, 0xf8, 0x94, 0x6e, 0x2a, 0x24, 0x26, 0xe6, 0xff, 0x22, 0xd2, 0x7f, 0x5e, 0x8d, 0x01,
|
||||
0x1b, 0x5a, 0x22, 0x6d, 0xd8, 0xa4, 0x3c, 0x0b, 0x94, 0xf9, 0x13, 0x14, 0xfe, 0x0b, 0x29, 0xa1,
|
||||
0xc8, 0x85, 0xd9, 0x20, 0x25, 0x1b, 0xb4, 0xfb, 0x72, 0xce, 0xb0, 0x2a, 0x31, 0x98, 0xc2, 0x0f,
|
||||
0xdb, 0x7c, 0xe3, 0x87, 0xdf, 0x2f, 0x27, 0x0a, 0xc7, 0x7f, 0x81, 0x61, 0x11, 0xda, 0x46, 0xa6,
|
||||
0xdf, 0x6d, 0xb0, 0x5e, 0xaa, 0xed, 0x02, 0x6e, 0x73, 0xf8, 0x0d, 0x5b, 0xf0, 0x93, 0x60, 0xb8,
|
||||
0x57, 0x49, 0x7f, 0xe2, 0xc2, 0x59, 0x54, 0x05, 0x8b, 0x54, 0x6c, 0xa9, 0x76, 0x6f, 0x39, 0xc5,
|
||||
0xda, 0xfe, 0x92, 0x70, 0x9a, 0x11, 0x50, 0x97, 0x27, 0x1b, 0x8d, 0xc1, 0x66, 0x03, 0x3b, 0x0d,
|
||||
0x1d, 0xc4, 0x35, 0xb6, 0x2a, 0xfc, 0x50, 0x00, 0x7b, 0x6c, 0xc6, 0xc1, 0xdb, 0xe2, 0x10, 0x13,
|
||||
0x16, 0x4e, 0x36, 0x2c, 0x14, 0xf5, 0x09, 0x21, 0xca, 0x2c, 0x5b, 0x59, 0xa1, 0xfd, 0xf1, 0xea,
|
||||
0x72, 0x21, 0x44, 0xa9, 0xb5, 0x7f, 0xfc, 0x09, 0x80, 0xad, 0xf5, 0x8c, 0x47, 0x1a, 0xfb, 0xb2,
|
||||
0xf9, 0xce, 0xee, 0x8b, 0x17, 0x11, 0x0a, 0x39, 0x22, 0x40, 0x01, 0xdb, 0x90, 0x9e, 0x1a, 0xe5,
|
||||
0x2b, 0x89, 0xf5, 0xb6, 0x91, 0x1d, 0x39, 0x02, 0xfe, 0xe7, 0x7c, 0x0c, 0x13, 0xa6, 0x0f, 0xb2,
|
||||
0x26, 0x5e, 0x3f, 0x09, 0x55, 0xa6, 0xce, 0xb1, 0x43, 0xf5, 0x31, 0xa9, 0xbc, 0x75, 0x22, 0x8d,
|
||||
0xb4, 0x20, 0xbb, 0xd9, 0x53, 0x5f, 0x99, 0x0a, 0x20, 0x47, 0xff, 0xdb, 0x43, 0xa7, 0xb8, 0x02,
|
||||
0x03, 0x0e, 0x20, 0xc5, 0x00, 0x51, 0xed, 0xcf, 0x0f, 0xb9, 0x21, 0x78, 0xe0, 0x87, 0xfa, 0x5e,
|
||||
0x5d, 0x1e, 0x04, 0x5b, 0x38, 0xa0, 0x1b, 0x3a, 0xf4, 0x4c, 0x19, 0x2e, 0x9e, 0xa2, 0x95, 0x81,
|
||||
0xe9, 0xc3, 0xbe, 0xfd, 0x1a, 0x10, 0xaa, 0xb2, 0x0c, 0xcd, 0x19, 0xa6, 0xde, 0xc3, 0xca, 0x06,
|
||||
0x68, 0xd8, 0x87, 0xe8, 0xf1, 0x86, 0x85, 0x1e, 0x40, 0xe2, 0x01, 0x00]
|
||||
|
||||
let profileKeyPresentationResult: [UInt8] = [
|
||||
0x30, 0xc7, 0xb1, 0xe8, 0x50, 0x9d, 0xe1, 0x65, 0xc1, 0x7e, 0x48, 0x58, 0x32, 0xa2, 0xbb, 0xde,
|
||||
0xe5, 0x2c, 0x56, 0x46, 0xe4, 0x38, 0x0a, 0x9e, 0x09, 0x90, 0x93, 0x43, 0xe4, 0xab, 0xcf, 0x52,
|
||||
0x70, 0xad, 0x9b, 0xa7, 0x19, 0x49, 0x65, 0xfd, 0x62, 0x9f, 0x47, 0x3c, 0x8b, 0x56, 0xbf, 0x28,
|
||||
0xd2, 0xcf, 0xc4, 0x6c, 0x8a, 0x32, 0xc4, 0xd3, 0x91, 0xb8, 0xb1, 0x95, 0xfe, 0x8b, 0x64, 0x41,
|
||||
0xa6, 0x04, 0x35, 0x23, 0x7e, 0x98, 0x7f, 0x46, 0xd0, 0x17, 0x83, 0x25, 0x28, 0xd7, 0x0b, 0x5d,
|
||||
0x67, 0x5a, 0x49, 0xed, 0x17, 0x00, 0x29, 0xb7, 0xd7, 0x8a, 0xdd, 0xff, 0xe7, 0xd8, 0x73, 0x3f,
|
||||
0x90, 0xef, 0xce, 0x84, 0x0c, 0x49, 0x8f, 0x30, 0xe3, 0xd6, 0x3d, 0xb3, 0x8c, 0xd3, 0xe9, 0xa6,
|
||||
0x3e, 0x7c, 0xfd, 0xfc, 0x92, 0x23, 0xff, 0x9a, 0xbd, 0x46, 0xab, 0x49, 0x09, 0x17, 0xf9, 0x35,
|
||||
0x86, 0xc5, 0xf3, 0x34, 0x66, 0x6b, 0x37, 0xe6, 0xa6, 0xcb, 0x97, 0x0b, 0x12, 0xf8, 0xff, 0x03,
|
||||
0x13, 0x50, 0xdb, 0xf5, 0x33, 0x71, 0x09, 0x95, 0x20, 0xe7, 0xa9, 0x71, 0xa0, 0x84, 0x3e, 0x11,
|
||||
0x0a, 0xba, 0xbf, 0xf7, 0x9b, 0x27, 0x97, 0x27, 0xb0, 0xb1, 0x02, 0x4d, 0x85, 0x8d, 0xe2, 0x55,
|
||||
0x05, 0x01, 0x12, 0x13, 0x01, 0x31, 0x52, 0xcb, 0x2f, 0xc8, 0xfa, 0xce, 0xd9, 0x4e, 0xed, 0x16,
|
||||
0x68, 0x47, 0xbb, 0xce, 0xc5, 0x42, 0x6c, 0xa7, 0x41, 0x39, 0x7d, 0x77, 0x5d, 0x44, 0x30, 0x41,
|
||||
0x2d, 0xa3, 0xee, 0xfb, 0x92, 0xe8, 0x9c, 0xf0, 0xf0, 0x26, 0x41, 0x50, 0x30, 0x0e, 0x1f, 0x03,
|
||||
0xb4, 0x2c, 0xf4, 0x5e, 0x71, 0xe7, 0xe5, 0x09, 0x4d, 0xfb, 0x4e, 0x1d, 0xc4, 0xa1, 0x9f, 0xb7,
|
||||
0x68, 0xaa, 0xec, 0x38, 0x46, 0x67, 0xed, 0xa9, 0x14, 0xcd, 0x9c, 0xf1, 0x90, 0x25, 0x88, 0x1a,
|
||||
0xa8, 0x19, 0x72, 0x30, 0xcc, 0x31, 0x12, 0xeb, 0xea, 0xac, 0x58, 0xc3, 0xa3, 0x8f, 0x5b, 0x82,
|
||||
0xe2, 0x88, 0xc0, 0x14, 0xff, 0xd4, 0x3b, 0x67, 0xae, 0x60, 0x47, 0x21, 0xfb, 0x82, 0x5a, 0x63,
|
||||
0x5a, 0x17, 0xa3, 0x2b, 0xe0, 0x84, 0x43, 0xc8, 0x91, 0x5d, 0x6a, 0xf3, 0xa2, 0xcc, 0xc6, 0x1e,
|
||||
0x95, 0x96, 0x3d, 0xb5, 0x9a, 0x6d, 0xc0, 0x85, 0xd7, 0xde, 0x37, 0x1f, 0x1f, 0xd9, 0xb9, 0x61,
|
||||
0xd4, 0x42, 0xec, 0x60, 0xbc, 0x7c, 0x0a, 0x7f, 0xaa, 0xc3, 0xe0, 0x2c, 0xee, 0x3c, 0x4f, 0xc8,
|
||||
0xa6, 0x1e, 0xd4, 0x27, 0x28, 0x8a, 0x62, 0x25, 0x47, 0x3f, 0x96, 0xd5, 0x63, 0xae, 0xa2, 0x6e,
|
||||
0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x46, 0x62, 0x1c, 0xdb, 0xe4, 0x4e, 0xf3,
|
||||
0x1b, 0x0e, 0x11, 0xe9, 0xd8, 0xf6, 0x2f, 0x55, 0x35, 0xcf, 0xfd, 0xa4, 0xc6, 0xbb, 0x17, 0xde,
|
||||
0x00, 0xdf, 0xfa, 0xee, 0xdc, 0x23, 0xaf, 0x06, 0xc1, 0x8a, 0xf2, 0xef, 0xe5, 0x2c, 0x88, 0x2e,
|
||||
0xd2, 0xf6, 0x18, 0xbb, 0x95, 0x68, 0x61, 0xab, 0x7d, 0xdd, 0x2a, 0xcd, 0x4b, 0xb9, 0xe6, 0xea,
|
||||
0x20, 0xc8, 0xf7, 0x00, 0x1c, 0x8a, 0x3a, 0x01, 0x8d, 0xa6, 0xa0, 0xda, 0x3c, 0x70, 0xa7, 0x4e,
|
||||
0xd0, 0x64, 0xaf, 0x9f, 0xf2, 0x71, 0xd5, 0x0f, 0xbe, 0x8e, 0x4c, 0xd5, 0x86, 0x61, 0x1f, 0x39,
|
||||
0x83, 0xb3, 0x76, 0x0e, 0x08, 0xa9, 0x14, 0x0e, 0xad, 0x4c, 0x3c, 0x01, 0xa5, 0x64, 0x82, 0xe3,
|
||||
0x22, 0xd3, 0x4f, 0xfe, 0xcc, 0xf5, 0x3b, 0x2b, 0x7a, 0x28, 0x43, 0x0f, 0x1c, 0x77, 0xde, 0xd4,
|
||||
0x2c, 0x52, 0x57, 0x96, 0x16, 0xc2, 0x00, 0x0f, 0xfb, 0xdf, 0x55, 0x0f, 0x4c, 0x9e, 0xe1, 0x98,
|
||||
0xb4, 0xab, 0x41, 0x99, 0xb6, 0x1a, 0x16, 0x66, 0x09, 0x63, 0x0e, 0x25, 0x69, 0x22, 0x96, 0x22,
|
||||
0x6c, 0xfd, 0xdd, 0xc7, 0x9b, 0x72, 0xe6, 0x05, 0x91, 0xcb, 0xa3, 0x08, 0xa4, 0xec, 0x42, 0x43,
|
||||
0x50, 0xe3, 0xc3, 0x68, 0xe2, 0xcc, 0x27, 0x7e, 0x36, 0x30, 0x64, 0xb6, 0xc7, 0x20, 0x56, 0xfb,
|
||||
0x9f, 0x84, 0xd3, 0x35, 0xb6, 0xf5, 0x78, 0x09, 0x5c, 0x62, 0x5a, 0x04, 0x20, 0xf6, 0x63, 0x85,
|
||||
0x28, 0xc1, 0x3b, 0xf5, 0x99, 0x5d, 0x3c, 0x0b, 0x33, 0xf4, 0x34, 0x00, 0x83, 0xb2, 0x91, 0x6c,
|
||||
0xae, 0x42, 0xbd, 0x62, 0x06, 0xd7, 0xa2, 0x08, 0xfc, 0xdb, 0x56, 0x31, 0x0b, 0xcf, 0x11, 0x6e,
|
||||
0x88, 0xdc, 0x97, 0x70, 0x6e, 0x15, 0x3f, 0x0e, 0xc1, 0x5e, 0xb4, 0x06, 0x3d, 0xe7, 0x78, 0x33,
|
||||
0xd9, 0x56, 0x0a, 0xf4, 0xbb, 0x94, 0x6e, 0x05, 0xb3, 0xcc, 0x13, 0xff, 0xd1, 0x47, 0xa6, 0x16,
|
||||
0xd3, 0xe5, 0xe9, 0x78, 0xa4, 0x1e, 0xcc, 0xe0, 0x14, 0x42, 0xa3, 0x9f, 0xd0, 0x49, 0x28, 0x18,
|
||||
0xf1, 0x4a, 0xa9, 0x68, 0x68, 0xc2, 0xb7, 0x00, 0x8a, 0xaa, 0x44, 0xcf, 0x79, 0x4b, 0x66, 0x8e,
|
||||
0xdc, 0xe2, 0x1b, 0x1c, 0xd5, 0xe6, 0x98, 0x90, 0xc0, 0x1e, 0x17, 0x81, 0x22, 0x16, 0x1b, 0xb4,
|
||||
0xaf, 0x7c, 0x10, 0x40, 0x3e, 0x30, 0xda, 0x0e, 0x45, 0xec, 0xfd, 0x99, 0x28, 0x85, 0xb4, 0xef,
|
||||
0x52, 0x9c, 0x8c, 0x52, 0x28, 0x15, 0x7e, 0x78, 0x32, 0x24, 0xf7, 0x43, 0x09, 0xd1, 0xad, 0x21,
|
||||
0x15, 0x63, 0xe6, 0x36, 0x28, 0x67, 0xa8, 0x0a, 0xc8, 0xde, 0x97, 0xaa, 0x60, 0x6f, 0x7a, 0xb7,
|
||||
0x5e, 0x03, 0xa9, 0xa1, 0xcd, 0xa6, 0x38, 0xbd, 0x77, 0x79, 0xef, 0x6f, 0xfa, 0x00, 0x8f, 0x82,
|
||||
0xae, 0x06, 0x58, 0x90, 0x26, 0x79, 0x4b, 0x00, 0x9a, 0xe1, 0xf4, 0xd7, 0xbc, 0xdc, 0x59, 0x31,
|
||||
0x3b, 0x96, 0x09, 0x91, 0xbf, 0x93, 0x6a, 0x2c, 0xc4, 0xcb, 0xdd, 0x15, 0x49, 0x3b, 0x53, 0xf4,
|
||||
0x06, 0xd1, 0x29, 0xb0, 0xbc, 0xfb, 0xcb, 0x06, 0x8f, 0x0f, 0xf9, 0x0d, 0x47, 0xd9, 0xd8, 0x42,
|
||||
0xd5, 0xc2, 0x52, 0x77, 0x8a, 0xc1, 0x26, 0x3d, 0x38, 0xf5, 0xf7, 0x38, 0x35, 0xcb, 0x58, 0xe1,
|
||||
0x09, 0x73, 0x50, 0x62, 0xf5, 0x8b, 0x99, 0x07, 0x20, 0x47, 0xff, 0xdb, 0x43, 0xa7, 0xb8, 0x02,
|
||||
0x03, 0x0e, 0x20, 0xc5, 0x00, 0x51, 0xed, 0xcf, 0x0f, 0xb9, 0x21, 0x78, 0xe0, 0x87, 0xfa, 0x5e,
|
||||
0x5d, 0x1e, 0x04, 0x5b, 0x38, 0xa0, 0x1b, 0x3a, 0xf4, 0x4c, 0x19, 0x2e, 0x9e, 0xa2, 0x95, 0x81,
|
||||
0xe9, 0xc3, 0xbe, 0xfd, 0x1a, 0x10, 0xaa, 0xb2, 0x0c, 0xcd, 0x19, 0xa6, 0xde, 0xc3, 0xca, 0x06,
|
||||
0x68, 0xd8, 0x87, 0xe8, 0xf1, 0x86, 0x85, 0x1e, 0xa6, 0x7b, 0x24, 0x02, 0xdc, 0x2b, 0xb7, 0xc1,
|
||||
0x1f, 0x26, 0x4e, 0x95, 0x10, 0xa8, 0xb8, 0xd7, 0x25, 0xbd, 0xd0, 0x43, 0xad, 0x39, 0xa8, 0x98,
|
||||
0x9d, 0x7c, 0x9d, 0x21, 0xb4, 0x06, 0x28, 0x40, 0xce, 0x36, 0x9e, 0x2f, 0x71, 0xdb, 0x94, 0xc0,
|
||||
0x4e, 0x23, 0x2b, 0x87, 0xac, 0x3f, 0x32, 0xf5, 0xc6, 0x38, 0x57, 0x8d, 0xdb, 0xcc, 0xea, 0x12,
|
||||
0x1d, 0xd9, 0xb3, 0x37, 0xdb, 0x6d, 0xd3, 0x34]
|
||||
|
||||
let serverSignatureResult: [UInt8] = [
|
||||
0x81, 0x9c, 0x59, 0xfc, 0xac, 0xa7, 0x02, 0x3b, 0x13, 0x87, 0x5e, 0xf6, 0x3e, 0xf9, 0x8d, 0xf3, 0x14, 0xde, 0x2a, 0x6a, 0x56, 0xd3, 0x14, 0xf6, 0x3c, 0xb9, 0x8c, 0x23, 0x4b, 0x55, 0xf5, 0x06, 0xaf, 0xf6, 0x47, 0x5d, 0x29, 0x57, 0x89, 0xc6, 0x6a, 0x11, 0xcd, 0xde, 0xc1, 0x60, 0x2e, 0xf1, 0xc4, 0xa2, 0x44, 0x14, 0x16, 0x8f, 0xe9, 0xba, 0x10, 0x36, 0xba, 0x28, 0x6b, 0x47, 0xea, 0x07]
|
||||
|
||||
func testAuthIntegration() throws {
|
||||
|
||||
let uuid: ZKGUuid = try ZKGUuid(contents: TEST_ARRAY_16)
|
||||
let redemptionTime: UInt32 = 123456
|
||||
|
||||
// Generate keys (client's are per-group, server's are not)
|
||||
// ---
|
||||
|
||||
// SERVER
|
||||
let serverSecretParams = try ServerSecretParams.generate(randomness: TEST_ARRAY_32)
|
||||
let serverPublicParams = try serverSecretParams.getPublicParams()
|
||||
let serverZkAuth = ServerZkAuthOperations(serverSecretParams: serverSecretParams)
|
||||
|
||||
// CLIENT
|
||||
let masterKey = try GroupMasterKey(contents: TEST_ARRAY_32_1)
|
||||
let groupSecretParams = try GroupSecretParams.deriveFromMasterKey(groupMasterKey: masterKey)
|
||||
|
||||
XCTAssertEqual((try groupSecretParams.getMasterKey()).serialize(), masterKey.serialize())
|
||||
|
||||
let groupPublicParams = try groupSecretParams.getPublicParams()
|
||||
|
||||
// SERVER
|
||||
// Issue credential
|
||||
let authCredentialResponse = try serverZkAuth.issueAuthCredential(randomness: TEST_ARRAY_32_2, uuid: uuid, redemptionTime: redemptionTime)
|
||||
|
||||
// CLIENT
|
||||
// Receive credential
|
||||
let clientZkAuthCipher = ClientZkAuthOperations(serverPublicParams: serverPublicParams)
|
||||
let clientZkGroupCipher = ClientZkGroupCipher(groupSecretParams: groupSecretParams )
|
||||
let authCredential = try clientZkAuthCipher.receiveAuthCredential(uuid: uuid, redemptionTime: redemptionTime, authCredentialResponse: authCredentialResponse)
|
||||
|
||||
// Create and decrypt user entry
|
||||
let uuidCiphertext = try clientZkGroupCipher.encryptUuid(uuid: uuid)
|
||||
let plaintext = try clientZkGroupCipher.decryptUuid(uuidCiphertext: uuidCiphertext)
|
||||
XCTAssertEqual(uuid.serialize(), plaintext.serialize())
|
||||
|
||||
// Create presentation
|
||||
let presentation = try clientZkAuthCipher.createAuthCredentialPresentation(randomness: TEST_ARRAY_32_5, groupSecretParams: groupSecretParams, authCredential: authCredential)
|
||||
|
||||
// Verify presentation
|
||||
let uuidCiphertextRecv = try presentation.getUuidCiphertext()
|
||||
XCTAssertEqual(uuidCiphertext.serialize(), uuidCiphertextRecv.serialize())
|
||||
XCTAssertEqual(try presentation.getRedemptionTime(), redemptionTime)
|
||||
try serverZkAuth.verifyAuthCredentialPresentation(groupPublicParams: groupPublicParams, authCredentialPresentation: presentation)
|
||||
|
||||
XCTAssertEqual(presentation.serialize(), authPresentationResult)
|
||||
}
|
||||
|
||||
func testProfileKeyIntegration() throws {
|
||||
|
||||
let uuid: ZKGUuid = try ZKGUuid(contents: TEST_ARRAY_16)
|
||||
|
||||
// Generate keys (client's are per-group, server's are not)
|
||||
// ---
|
||||
|
||||
// SERVER
|
||||
let serverSecretParams = try ServerSecretParams.generate(randomness: TEST_ARRAY_32)
|
||||
let serverPublicParams = try serverSecretParams.getPublicParams()
|
||||
let serverZkProfile = ServerZkProfileOperations(serverSecretParams: serverSecretParams)
|
||||
|
||||
// CLIENT
|
||||
let masterKey = try GroupMasterKey(contents: TEST_ARRAY_32_1)
|
||||
let groupSecretParams = try GroupSecretParams.deriveFromMasterKey(groupMasterKey: masterKey)
|
||||
|
||||
XCTAssertEqual(try groupSecretParams.getMasterKey().serialize(), masterKey.serialize())
|
||||
|
||||
let groupPublicParams = try groupSecretParams.getPublicParams()
|
||||
let clientZkProfileCipher = ClientZkProfileOperations(serverPublicParams: serverPublicParams)
|
||||
|
||||
let profileKey = try ProfileKey(contents: TEST_ARRAY_32_1)
|
||||
let profileKeyCommitment = try profileKey.getCommitment(uuid: uuid)
|
||||
|
||||
// Create context and request
|
||||
let context = try clientZkProfileCipher.createProfileKeyCredentialRequestContext(randomness: TEST_ARRAY_32_3, uuid: uuid, profileKey: profileKey)
|
||||
let request = try context.getRequest()
|
||||
|
||||
// SERVER
|
||||
let response = try serverZkProfile.issueProfileKeyCredential(randomness: TEST_ARRAY_32_4, profileKeyCredentialRequest: request, uuid: uuid, profileKeyCommitment: profileKeyCommitment)
|
||||
|
||||
// CLIENT
|
||||
// Gets stored profile credential
|
||||
let clientZkGroupCipher = ClientZkGroupCipher(groupSecretParams: groupSecretParams)
|
||||
let profileKeyCredential = try clientZkProfileCipher.receiveProfileKeyCredential(profileKeyCredentialRequestContext: context, profileKeyCredentialResponse: response)
|
||||
|
||||
// Create encrypted UID and profile key
|
||||
let uuidCiphertext = try clientZkGroupCipher.encryptUuid(uuid: uuid)
|
||||
let plaintext = try clientZkGroupCipher.decryptUuid(uuidCiphertext: uuidCiphertext)
|
||||
|
||||
XCTAssertEqual(plaintext.serialize(), uuid.serialize())
|
||||
|
||||
let profileKeyCiphertext = try clientZkGroupCipher.encryptProfileKey(randomness: TEST_ARRAY_32_4, profileKey: profileKey, uuid: uuid)
|
||||
let decryptedProfileKey = try clientZkGroupCipher.decryptProfileKey(profileKeyCiphertext: profileKeyCiphertext, uuid: uuid)
|
||||
XCTAssertEqual(profileKey.serialize(), decryptedProfileKey.serialize())
|
||||
|
||||
let presentation = try clientZkProfileCipher.createProfileKeyCredentialPresentation(randomness: TEST_ARRAY_32_5, groupSecretParams: groupSecretParams, profileKeyCredential: profileKeyCredential)
|
||||
|
||||
XCTAssertEqual(presentation.serialize(), profileKeyPresentationResult)
|
||||
|
||||
// Verify presentation
|
||||
try serverZkProfile.verifyProfileKeyCredentialPresentation(groupPublicParams: groupPublicParams, profileKeyCredentialPresentation: presentation)
|
||||
let uuidCiphertextRecv = try presentation.getUuidCiphertext()
|
||||
XCTAssertEqual(uuidCiphertext.serialize(), uuidCiphertextRecv.serialize())
|
||||
|
||||
let pkvA = try profileKeyCommitment.getProfileKeyVersion()
|
||||
let pkvB = try profileKey.getProfileKeyVersion(uuid: uuid)
|
||||
XCTAssertEqual(pkvA.serialize(), pkvB.serialize())
|
||||
let pkvC = try ProfileKeyVersion(contents: pkvA.serialize())
|
||||
XCTAssertEqual(pkvA.serialize(), pkvC.serialize())
|
||||
}
|
||||
|
||||
func testServerSignatures() throws {
|
||||
let serverSecretParams = try ServerSecretParams.generate(randomness: TEST_ARRAY_32)
|
||||
let serverPublicParams = try serverSecretParams.getPublicParams()
|
||||
|
||||
let message = TEST_ARRAY_32_1
|
||||
|
||||
let signature = try serverSecretParams.sign(randomness: TEST_ARRAY_32_2, message: message)
|
||||
try serverPublicParams.verifySignature(message: message, notarySignature: signature)
|
||||
|
||||
XCTAssertEqual(signature.serialize(), serverSignatureResult)
|
||||
|
||||
var alteredMessage = message
|
||||
alteredMessage[0] ^= 1
|
||||
do {
|
||||
try serverPublicParams.verifySignature(message: alteredMessage, notarySignature: signature)
|
||||
XCTAssert(false)
|
||||
} catch ZkGroupException.VerificationFailed {
|
||||
// good
|
||||
}
|
||||
}
|
||||
|
||||
func testErrors() throws {
|
||||
let ckp: [UInt8] = Array(repeating: 255, count: GroupSecretParams.SIZE)
|
||||
do {
|
||||
let groupSecretParams = try GroupSecretParams(contents: ckp)
|
||||
XCTAssert(false)
|
||||
} catch ZkGroupException.IllegalArgument {
|
||||
// good
|
||||
}
|
||||
}
|
||||
|
||||
func testBlobEncryption() throws {
|
||||
let groupSecretParams = try GroupSecretParams.generate()
|
||||
let clientZkGroupCipher = ClientZkGroupCipher(groupSecretParams: groupSecretParams)
|
||||
|
||||
let plaintext: [UInt8] = [0,1,2,3,4]
|
||||
let ciphertext = try clientZkGroupCipher.encryptBlob(plaintext: plaintext)
|
||||
let plaintext2 = try clientZkGroupCipher.decryptBlob(blobCiphertext: ciphertext)
|
||||
|
||||
XCTAssertEqual(plaintext, plaintext2)
|
||||
}
|
||||
|
||||
func testBlobEncryptionWithRandom() throws {
|
||||
let masterKey = try GroupMasterKey(contents: TEST_ARRAY_32_1)
|
||||
let groupSecretParams = try GroupSecretParams.deriveFromMasterKey(groupMasterKey: masterKey)
|
||||
let clientZkGroupCipher = ClientZkGroupCipher(groupSecretParams: groupSecretParams)
|
||||
|
||||
let plaintext: [UInt8] = [
|
||||
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
|
||||
0x18, 0x19]
|
||||
let ciphertext: [UInt8] = [
|
||||
0xc0, 0x9c, 0x16, 0x75, 0x4b, 0x32, 0x86, 0x7f, 0xd5, 0x11, 0x9d, 0x18, 0x81, 0xd6, 0x2e,
|
||||
0x7c, 0x96, 0x7f, 0x6e, 0x3a, 0x8a, 0xf5, 0xf0, 0x9a, 0xc8, 0x4f, 0x7b, 0x74, 0xfc, 0xc6,
|
||||
0xd0, 0xe4, 0xd5, 0x9c, 0x9f, 0x4a, 0x17, 0x5e, 0x0f, 0x48, 0x9c, 0x47, 0xe4, 0x81, 0xf1]
|
||||
|
||||
let ciphertext2 = try clientZkGroupCipher.encryptBlob(randomness: TEST_ARRAY_32_2, plaintext: plaintext)
|
||||
let plaintext2 = try clientZkGroupCipher.decryptBlob(blobCiphertext: ciphertext2)
|
||||
|
||||
XCTAssertEqual(plaintext, plaintext2)
|
||||
XCTAssertEqual(ciphertext, ciphertext2)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user