-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
629 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "1530" | ||
version = "1.7"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES" | ||
buildArchitectures = "Automatic"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "rapidsnark" | ||
BuildableName = "rapidsnark" | ||
BlueprintName = "rapidsnark" | ||
ReferencedContainer = "container:"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
shouldAutocreateTestPlan = "YES"> | ||
<Testables> | ||
<TestableReference | ||
skipped = "NO"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "rapidsnarkTests" | ||
BuildableName = "rapidsnarkTests" | ||
BlueprintName = "rapidsnarkTests" | ||
ReferencedContainer = "container:"> | ||
</BuildableReference> | ||
</TestableReference> | ||
</Testables> | ||
</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"> | ||
</LaunchAction> | ||
<ProfileAction | ||
buildConfiguration = "Release" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
debugDocumentVersioning = "YES"> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "rapidsnark" | ||
BuildableName = "rapidsnark" | ||
BlueprintName = "rapidsnark" | ||
ReferencedContainer = "container:"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?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>AvailableLibraries</key> | ||
<array> | ||
<dict> | ||
<key>BinaryPath</key> | ||
<string>librapidsnarkmerged.a</string> | ||
<key>HeadersPath</key> | ||
<string>Headers</string> | ||
<key>LibraryIdentifier</key> | ||
<string>ios-arm64</string> | ||
<key>LibraryPath</key> | ||
<string>librapidsnarkmerged.a</string> | ||
<key>SupportedArchitectures</key> | ||
<array> | ||
<string>arm64</string> | ||
</array> | ||
<key>SupportedPlatform</key> | ||
<string>ios</string> | ||
</dict> | ||
<dict> | ||
<key>BinaryPath</key> | ||
<string>librapidsnarkmerged.a</string> | ||
<key>HeadersPath</key> | ||
<string>Headers</string> | ||
<key>LibraryIdentifier</key> | ||
<string>ios-arm64_arm64e_x86_64-simulator</string> | ||
<key>LibraryPath</key> | ||
<string>librapidsnarkmerged.a</string> | ||
<key>SupportedArchitectures</key> | ||
<array> | ||
<string>arm64</string> | ||
<string>arm64e</string> | ||
<string>x86_64</string> | ||
</array> | ||
<key>SupportedPlatform</key> | ||
<string>ios</string> | ||
<key>SupportedPlatformVariant</key> | ||
<string>simulator</string> | ||
</dict> | ||
</array> | ||
<key>CFBundlePackageType</key> | ||
<string>XFWK</string> | ||
<key>XCFrameworkFormatVersion</key> | ||
<string>1.0</string> | ||
</dict> | ||
</plist> |
2 changes: 2 additions & 0 deletions
2
Libs/Rapidsnark.xcframework/ios-arm64/Headers/RapidsnarkFramework.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#import "verifier.h" | ||
#import "prover.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#ifndef PROVER_HPP | ||
#define PROVER_HPP | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
//Error codes returned by the functions. | ||
#define PROVER_OK 0x0 | ||
#define PROVER_ERROR 0x1 | ||
#define PROVER_ERROR_SHORT_BUFFER 0x2 | ||
#define PROVER_INVALID_WITNESS_LENGTH 0x3 | ||
|
||
/** | ||
* Calculates buffer size to output public signals as json string | ||
* @returns PROVER_OK in case of success, and the size of public buffer is written to public_size | ||
*/ | ||
int | ||
groth16_public_size_for_zkey_buf(const void *zkey_buffer, unsigned long zkey_size, | ||
size_t *public_size, | ||
char *error_msg, unsigned long error_msg_maxsize); | ||
|
||
/** | ||
* groth16_public_size_for_zkey_file calculates minimum buffer size for | ||
* JSON-formatted public signals. The calculated buffer size is written | ||
* to the public_size variable. | ||
* | ||
* @return error code: | ||
* PROVER_OK (0) - in case of success | ||
* PROVER_ERROR - in case of an error, error_msg contains the error message | ||
*/ | ||
int | ||
groth16_public_size_for_zkey_file(const char *zkey_fname, | ||
unsigned long *public_size, | ||
char *error_msg, unsigned long error_msg_maxsize); | ||
|
||
/** | ||
* groth16_prover | ||
* @return error code: | ||
* PROVER_OK - in case of success | ||
* PPOVER_ERROR - in case of an error | ||
* PROVER_ERROR_SHORT_BUFFER - in case of a short buffer error, also updates proof_size and public_size with actual proof and public sizess | ||
*/ | ||
int | ||
groth16_prover(const void *zkey_buffer, unsigned long zkey_size, | ||
const void *wtns_buffer, unsigned long wtns_size, | ||
char *proof_buffer, unsigned long *proof_size, | ||
char *public_buffer, unsigned long *public_size, | ||
char *error_msg, unsigned long error_msg_maxsize); | ||
|
||
/** | ||
* groth16_prover | ||
* @return error code: | ||
* PROVER_OK - in case of success | ||
* PPOVER_ERROR - in case of an error | ||
* PROVER_ERROR_SHORT_BUFFER - in case of a short buffer error, also updates proof_size and public_size with actual proof and public sizess | ||
*/ | ||
int | ||
groth16_prover_zkey_file(const char *zkey_file_path, | ||
const void *wtns_buffer, unsigned long wtns_size, | ||
char *proof_buffer, unsigned long *proof_size, | ||
char *public_buffer, unsigned long *public_size, | ||
char *error_msg, unsigned long error_msg_maxsize); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
|
||
#endif // PROVER_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#ifndef VERIFIER_HPP | ||
#define VERIFIER_HPP | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
//Error codes returned by the functions. | ||
#define VERIFIER_VALID_PROOF 0x0 | ||
#define VERIFIER_INVALID_PROOF 0x1 | ||
#define VERIFIER_ERROR 0x2 | ||
|
||
/** | ||
* 'proof', 'inputs' and 'verification_key' are null-terminated json strings. | ||
* | ||
* @return error code: | ||
* VERIFIER_VALID_PROOF - in case of valid 'proof'. | ||
* VERIFIER_INVALID_PROOF - in case of invalid 'proof'. | ||
VERIFIER_ERROR - in case of an error | ||
*/ | ||
|
||
int | ||
groth16_verify(const char *proof, | ||
const char *inputs, | ||
const char *verification_key, | ||
char *error_msg, | ||
unsigned long error_msg_maxsize); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
|
||
#endif // VERIFIER_HPP |
Binary file not shown.
2 changes: 2 additions & 0 deletions
2
Libs/Rapidsnark.xcframework/ios-arm64_arm64e_x86_64-simulator/Headers/RapidsnarkFramework.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#import "verifier.h" | ||
#import "prover.h" |
70 changes: 70 additions & 0 deletions
70
Libs/Rapidsnark.xcframework/ios-arm64_arm64e_x86_64-simulator/Headers/prover.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#ifndef PROVER_HPP | ||
#define PROVER_HPP | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
//Error codes returned by the functions. | ||
#define PROVER_OK 0x0 | ||
#define PROVER_ERROR 0x1 | ||
#define PROVER_ERROR_SHORT_BUFFER 0x2 | ||
#define PROVER_INVALID_WITNESS_LENGTH 0x3 | ||
|
||
/** | ||
* Calculates buffer size to output public signals as json string | ||
* @returns PROVER_OK in case of success, and the size of public buffer is written to public_size | ||
*/ | ||
int | ||
groth16_public_size_for_zkey_buf(const void *zkey_buffer, unsigned long zkey_size, | ||
size_t *public_size, | ||
char *error_msg, unsigned long error_msg_maxsize); | ||
|
||
/** | ||
* groth16_public_size_for_zkey_file calculates minimum buffer size for | ||
* JSON-formatted public signals. The calculated buffer size is written | ||
* to the public_size variable. | ||
* | ||
* @return error code: | ||
* PROVER_OK (0) - in case of success | ||
* PROVER_ERROR - in case of an error, error_msg contains the error message | ||
*/ | ||
int | ||
groth16_public_size_for_zkey_file(const char *zkey_fname, | ||
unsigned long *public_size, | ||
char *error_msg, unsigned long error_msg_maxsize); | ||
|
||
/** | ||
* groth16_prover | ||
* @return error code: | ||
* PROVER_OK - in case of success | ||
* PPOVER_ERROR - in case of an error | ||
* PROVER_ERROR_SHORT_BUFFER - in case of a short buffer error, also updates proof_size and public_size with actual proof and public sizess | ||
*/ | ||
int | ||
groth16_prover(const void *zkey_buffer, unsigned long zkey_size, | ||
const void *wtns_buffer, unsigned long wtns_size, | ||
char *proof_buffer, unsigned long *proof_size, | ||
char *public_buffer, unsigned long *public_size, | ||
char *error_msg, unsigned long error_msg_maxsize); | ||
|
||
/** | ||
* groth16_prover | ||
* @return error code: | ||
* PROVER_OK - in case of success | ||
* PPOVER_ERROR - in case of an error | ||
* PROVER_ERROR_SHORT_BUFFER - in case of a short buffer error, also updates proof_size and public_size with actual proof and public sizess | ||
*/ | ||
int | ||
groth16_prover_zkey_file(const char *zkey_file_path, | ||
const void *wtns_buffer, unsigned long wtns_size, | ||
char *proof_buffer, unsigned long *proof_size, | ||
char *public_buffer, unsigned long *public_size, | ||
char *error_msg, unsigned long error_msg_maxsize); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
|
||
#endif // PROVER_HPP |
34 changes: 34 additions & 0 deletions
34
Libs/Rapidsnark.xcframework/ios-arm64_arm64e_x86_64-simulator/Headers/verifier.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#ifndef VERIFIER_HPP | ||
#define VERIFIER_HPP | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
//Error codes returned by the functions. | ||
#define VERIFIER_VALID_PROOF 0x0 | ||
#define VERIFIER_INVALID_PROOF 0x1 | ||
#define VERIFIER_ERROR 0x2 | ||
|
||
/** | ||
* 'proof', 'inputs' and 'verification_key' are null-terminated json strings. | ||
* | ||
* @return error code: | ||
* VERIFIER_VALID_PROOF - in case of valid 'proof'. | ||
* VERIFIER_INVALID_PROOF - in case of invalid 'proof'. | ||
VERIFIER_ERROR - in case of an error | ||
*/ | ||
|
||
int | ||
groth16_verify(const char *proof, | ||
const char *inputs, | ||
const char *verification_key, | ||
char *error_msg, | ||
unsigned long error_msg_maxsize); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
|
||
#endif // VERIFIER_HPP |
Binary file added
BIN
+8.91 MB
Libs/Rapidsnark.xcframework/ios-arm64_arm64e_x86_64-simulator/librapidsnarkmerged.a
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.