Compare commits

..

39 Commits

Author SHA1 Message Date
Matthew Chen
4fc1c10e98 Merge branch 'charlesmchen/fixBrokenTests' 2019-11-07 17:17:57 -03:00
Matthew Chen
53b34e07e4 Fix SMKServerCertificateTest.testBadSignature. 2019-11-07 13:27:07 -03:00
Michael Kirk
877c48f4bc Merge branch 'mkirk/linking' 2019-10-17 10:12:41 -06:00
Michael Kirk
8b6e70b18c move helpers from SMK 2019-10-17 10:05:01 -06:00
Michael Kirk
ad808db2fa expose failable designated init for ECKeyPair 2019-10-17 10:05:01 -06:00
Nora Trapp
3d09b9480f Merge branch 'nt/deployment-target' 2019-09-23 16:48:41 -07:00
Nora Trapp
e8671e71bd Update deployment target to iOS 10 2019-09-23 10:49:18 -07:00
Michael Kirk
9b5981d7e3 Merge branch 'mkirk/nullability-warnings' 2019-06-19 10:02:01 -06:00
Michael Kirk
c8384ed4a1 address compiler warnings 2019-06-18 15:17:35 -06:00
Michael Kirk
9e5663baf4 Merge branch 'mkirk/exception-wrapping' 2018-10-30 11:13:45 -06:00
Michael Kirk
3c9725d65c Don't throw objc exceptions from Swift 2018-10-30 11:13:34 -06:00
Matthew Chen
14effe344b Merge branch 'charlesmchen/assertKeyPairInSign' 2018-10-10 17:39:21 -04:00
Matthew Chen
6926c1bea8 Assert key pair in sign. 2018-10-10 17:07:32 -04:00
Matthew Chen
9d0f5e68d5 Merge branch 'charlesmchen/sck' 2018-09-28 08:48:51 -04:00
Matthew Chen
6ab1ebcd25 Add placeholder Swift test. 2018-09-28 08:48:41 -04:00
Matthew Chen
c04f9bc017 Move Randomness to SignalCoreKit. 2018-09-28 08:48:41 -04:00
Matthew Chen
134e14edf6 Update podspec. 2018-09-28 08:48:41 -04:00
Matthew Chen
c54600abb1 Fix asserts & logging. 2018-09-28 08:48:41 -04:00
Matthew Chen
f9c774ef72 Merge branch 'charlesmchen/asserts' 2018-09-28 08:47:02 -04:00
Matthew Chen
9e25cdbca2 Refine asserts. 2018-09-28 08:46:11 -04:00
Matthew Chen
6b2c7342d8 Merge branch 'charlesmchen/convenience' 2018-09-28 08:45:28 -04:00
Matthew Chen
1da78f7317 Add convenience method. 2018-09-28 08:43:06 -04:00
Matthew Chen
a4f46bd621 Merge branch 'charlesmchen/curveTests' 2018-09-21 09:39:46 -04:00
Matthew Chen
47748b9bd1 Expose tests in podspec. 2018-09-21 09:39:25 -04:00
Matthew Chen
ff5407362f Merge branch 'charlesmchen/memoryLeak' 2018-09-20 08:56:17 -04:00
Matthew Chen
bdfd99737a Respond to CR. 2018-09-19 15:09:11 -04:00
Matthew Chen
e4efb719c8 Fix memory leak. 2018-09-19 11:02:03 -04:00
Michael Kirk
14bfa06578 Merge branch 'mkirk/overflow' 2018-09-07 13:17:01 -06:00
Michael Kirk
83311455d7 add overflow macros 2018-08-30 09:47:29 -06:00
Michael Kirk
203dca7156 Make OWSAssert terminate in production, introduce OWSAssertDebug which will not
terminate in production.

No change in behavior here since these two methods aren't yet used in CurveKit.
2018-08-30 09:47:29 -06:00
Matthew Chen
95debe15f5 Merge branch 'charlesmchen/loggingAndAsserts' 2018-08-29 16:10:44 -04:00
Matthew Chen
c7507a93e1 Respond to CR. 2018-08-28 14:57:17 -04:00
Matthew Chen
17dbf0ab5a Respond to CR. Make headers private, change prefix. 2018-08-28 14:08:06 -04:00
Matthew Chen
fa918f69b9 Logging and asserts. 2018-08-28 12:26:21 -04:00
Matthew Chen
ced1466996 Merge branch 'charlesmchen/cleanupFormatting' 2018-08-02 16:09:06 -04:00
Matthew Chen
a16d135d71 Respond to CR. 2018-08-02 16:08:39 -04:00
Matthew Chen
516d47b426 Clean up formatting. 2018-07-27 10:36:28 -04:00
Matthew Chen
337cf5dd53 Clean up formatting. 2018-07-27 10:33:26 -04:00
Matthew Chen
fddf9c9d74 Clean up formatting. 2018-07-27 10:25:28 -04:00
35 changed files with 1835 additions and 194 deletions

15
.clang-format Normal file
View File

@ -0,0 +1,15 @@
---
BasedOnStyle: WebKit
AllowShortFunctionsOnASingleLine: false
BinPackArguments: false
BinPackParameters: false
ColumnLimit: 120
IndentCaseLabels: true
MaxEmptyLinesToKeep: 2
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PointerBindsToType: false
SpacesBeforeTrailingComments: 1
TabWidth: 8
UseTab: Never
...

View File

@ -0,0 +1,796 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
B62C862A19CEEA9D00DCA580 /* compare.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C85D919CEEA9D00DCA580 /* compare.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C862B19CEEA9D00DCA580 /* curve_sigs.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C85DC19CEEA9D00DCA580 /* curve_sigs.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C862C19CEEA9D00DCA580 /* sign_modified.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C85DE19CEEA9D00DCA580 /* sign_modified.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C862D19CEEA9D00DCA580 /* zeroize.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C85DF19CEEA9D00DCA580 /* zeroize.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C862E19CEEA9D00DCA580 /* fe_0.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C85E719CEEA9D00DCA580 /* fe_0.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C862F19CEEA9D00DCA580 /* fe_1.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C85E819CEEA9D00DCA580 /* fe_1.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C863019CEEA9D00DCA580 /* fe_add.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C85E919CEEA9D00DCA580 /* fe_add.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C863119CEEA9D00DCA580 /* fe_cmov.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C85EA19CEEA9D00DCA580 /* fe_cmov.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C863219CEEA9D00DCA580 /* fe_copy.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C85EB19CEEA9D00DCA580 /* fe_copy.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C863319CEEA9D00DCA580 /* fe_frombytes.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C85EC19CEEA9D00DCA580 /* fe_frombytes.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C863419CEEA9D00DCA580 /* fe_invert.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C85ED19CEEA9D00DCA580 /* fe_invert.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C863519CEEA9D00DCA580 /* fe_isnegative.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C85EE19CEEA9D00DCA580 /* fe_isnegative.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C863619CEEA9D00DCA580 /* fe_isnonzero.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C85EF19CEEA9D00DCA580 /* fe_isnonzero.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C863719CEEA9D00DCA580 /* fe_mul.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C85F019CEEA9D00DCA580 /* fe_mul.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C863819CEEA9D00DCA580 /* fe_neg.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C85F119CEEA9D00DCA580 /* fe_neg.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C863919CEEA9D00DCA580 /* fe_pow22523.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C85F219CEEA9D00DCA580 /* fe_pow22523.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C863A19CEEA9D00DCA580 /* fe_sq.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C85F319CEEA9D00DCA580 /* fe_sq.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C863B19CEEA9D00DCA580 /* fe_sq2.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C85F419CEEA9D00DCA580 /* fe_sq2.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C863C19CEEA9D00DCA580 /* fe_sub.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C85F519CEEA9D00DCA580 /* fe_sub.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C863D19CEEA9D00DCA580 /* fe_tobytes.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C85F619CEEA9D00DCA580 /* fe_tobytes.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C863E19CEEA9D00DCA580 /* ge_add.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C85F819CEEA9D00DCA580 /* ge_add.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C863F19CEEA9D00DCA580 /* ge_double_scalarmult.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C85FA19CEEA9D00DCA580 /* ge_double_scalarmult.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C864019CEEA9D00DCA580 /* ge_frombytes.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C85FB19CEEA9D00DCA580 /* ge_frombytes.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C864119CEEA9D00DCA580 /* ge_madd.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C85FC19CEEA9D00DCA580 /* ge_madd.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C864219CEEA9D00DCA580 /* ge_msub.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C85FE19CEEA9D00DCA580 /* ge_msub.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C864319CEEA9D00DCA580 /* ge_p1p1_to_p2.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C860019CEEA9D00DCA580 /* ge_p1p1_to_p2.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C864419CEEA9D00DCA580 /* ge_p1p1_to_p3.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C860119CEEA9D00DCA580 /* ge_p1p1_to_p3.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C864519CEEA9D00DCA580 /* ge_p2_0.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C860219CEEA9D00DCA580 /* ge_p2_0.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C864619CEEA9D00DCA580 /* ge_p2_dbl.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C860319CEEA9D00DCA580 /* ge_p2_dbl.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C864719CEEA9D00DCA580 /* ge_p3_0.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C860519CEEA9D00DCA580 /* ge_p3_0.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C864819CEEA9D00DCA580 /* ge_p3_dbl.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C860619CEEA9D00DCA580 /* ge_p3_dbl.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C864919CEEA9D00DCA580 /* ge_p3_to_cached.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C860719CEEA9D00DCA580 /* ge_p3_to_cached.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C864A19CEEA9D00DCA580 /* ge_p3_to_p2.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C860819CEEA9D00DCA580 /* ge_p3_to_p2.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C864B19CEEA9D00DCA580 /* ge_p3_tobytes.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C860919CEEA9D00DCA580 /* ge_p3_tobytes.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C864C19CEEA9D00DCA580 /* ge_precomp_0.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C860A19CEEA9D00DCA580 /* ge_precomp_0.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C864D19CEEA9D00DCA580 /* ge_scalarmult_base.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C860B19CEEA9D00DCA580 /* ge_scalarmult_base.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C864E19CEEA9D00DCA580 /* ge_sub.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C860C19CEEA9D00DCA580 /* ge_sub.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C864F19CEEA9D00DCA580 /* ge_tobytes.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C860E19CEEA9D00DCA580 /* ge_tobytes.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C865119CEEA9D00DCA580 /* blocks.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C861A19CEEA9D00DCA580 /* blocks.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C865219CEEA9D00DCA580 /* hash.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C861B19CEEA9D00DCA580 /* hash.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C865319CEEA9D00DCA580 /* open.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C861C19CEEA9D00DCA580 /* open.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C865419CEEA9D00DCA580 /* sc_muladd.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C862019CEEA9D00DCA580 /* sc_muladd.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C865519CEEA9D00DCA580 /* sc_reduce.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C862119CEEA9D00DCA580 /* sc_reduce.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B62C865619CEEA9D00DCA580 /* LICENSE.txt in Resources */ = {isa = PBXBuildFile; fileRef = B62C862319CEEA9D00DCA580 /* LICENSE.txt */; };
B62C865919CEEA9D00DCA580 /* sign.c in Sources */ = {isa = PBXBuildFile; fileRef = B62C862819CEEA9D00DCA580 /* sign.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B65F5A1219823F45004D21C8 /* SigningTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B65F5A1119823F45004D21C8 /* SigningTests.m */; };
B6EC095A197F559E0070F844 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6EC0959197F559E0070F844 /* Foundation.framework */; };
B6EC095C197F559E0070F844 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6EC095B197F559E0070F844 /* CoreGraphics.framework */; };
B6EC095E197F559E0070F844 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6EC095D197F559E0070F844 /* UIKit.framework */; };
B6EC0964197F559E0070F844 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = B6EC0962197F559E0070F844 /* InfoPlist.strings */; };
B6EC0966197F559E0070F844 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = B6EC0965197F559E0070F844 /* main.m */; };
B6EC096A197F559E0070F844 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B6EC0969197F559E0070F844 /* AppDelegate.m */; };
B6EC096C197F559E0070F844 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B6EC096B197F559E0070F844 /* Images.xcassets */; };
B6EC0973197F559E0070F844 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6EC0972197F559E0070F844 /* XCTest.framework */; };
B6EC0974197F559E0070F844 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6EC0959197F559E0070F844 /* Foundation.framework */; };
B6EC0975197F559E0070F844 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6EC095D197F559E0070F844 /* UIKit.framework */; };
B6EC097D197F559E0070F844 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = B6EC097B197F559E0070F844 /* InfoPlist.strings */; };
B6EC09DA197F55B90070F844 /* curve25519-donna.c in Sources */ = {isa = PBXBuildFile; fileRef = B6EC0989197F55B90070F844 /* curve25519-donna.c */; settings = {COMPILER_FLAGS = "-w"; }; };
B6EC0A0B197F55E70070F844 /* Curve25519.m in Sources */ = {isa = PBXBuildFile; fileRef = B6EC0A0A197F55E70070F844 /* Curve25519.m */; };
B6EC0A0E197F5B1E0070F844 /* Randomness.m in Sources */ = {isa = PBXBuildFile; fileRef = B6EC0A0D197F5B1E0070F844 /* Randomness.m */; };
B6EC0B0F197F652A0070F844 /* Ed25519.m in Sources */ = {isa = PBXBuildFile; fileRef = B6EC0B0E197F652A0070F844 /* Ed25519.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
B6EC0976197F559E0070F844 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = B6EC094E197F559E0070F844 /* Project object */;
proxyType = 1;
remoteGlobalIDString = B6EC0955197F559E0070F844;
remoteInfo = BuildTests;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
B62C85D919CEEA9D00DCA580 /* compare.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = compare.c; sourceTree = "<group>"; };
B62C85DA19CEEA9D00DCA580 /* compare.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = compare.h; sourceTree = "<group>"; };
B62C85DB19CEEA9D00DCA580 /* crypto_hash_sha512.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crypto_hash_sha512.h; sourceTree = "<group>"; };
B62C85DC19CEEA9D00DCA580 /* curve_sigs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = curve_sigs.c; sourceTree = "<group>"; };
B62C85DD19CEEA9D00DCA580 /* curve_sigs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = curve_sigs.h; sourceTree = "<group>"; };
B62C85DE19CEEA9D00DCA580 /* sign_modified.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sign_modified.c; sourceTree = "<group>"; };
B62C85DF19CEEA9D00DCA580 /* zeroize.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = zeroize.c; sourceTree = "<group>"; };
B62C85E019CEEA9D00DCA580 /* zeroize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = zeroize.h; sourceTree = "<group>"; };
B62C85E119CEEA9D00DCA580 /* api.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = api.h; sourceTree = "<group>"; };
B62C85E219CEEA9D00DCA580 /* base.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = base.h; sourceTree = "<group>"; };
B62C85E319CEEA9D00DCA580 /* base2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = base2.h; sourceTree = "<group>"; };
B62C85E419CEEA9D00DCA580 /* d.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = d.h; sourceTree = "<group>"; };
B62C85E519CEEA9D00DCA580 /* d2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = d2.h; sourceTree = "<group>"; };
B62C85E619CEEA9D00DCA580 /* fe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fe.h; sourceTree = "<group>"; };
B62C85E719CEEA9D00DCA580 /* fe_0.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fe_0.c; sourceTree = "<group>"; };
B62C85E819CEEA9D00DCA580 /* fe_1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fe_1.c; sourceTree = "<group>"; };
B62C85E919CEEA9D00DCA580 /* fe_add.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fe_add.c; sourceTree = "<group>"; };
B62C85EA19CEEA9D00DCA580 /* fe_cmov.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fe_cmov.c; sourceTree = "<group>"; };
B62C85EB19CEEA9D00DCA580 /* fe_copy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fe_copy.c; sourceTree = "<group>"; };
B62C85EC19CEEA9D00DCA580 /* fe_frombytes.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fe_frombytes.c; sourceTree = "<group>"; };
B62C85ED19CEEA9D00DCA580 /* fe_invert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fe_invert.c; sourceTree = "<group>"; };
B62C85EE19CEEA9D00DCA580 /* fe_isnegative.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fe_isnegative.c; sourceTree = "<group>"; };
B62C85EF19CEEA9D00DCA580 /* fe_isnonzero.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fe_isnonzero.c; sourceTree = "<group>"; };
B62C85F019CEEA9D00DCA580 /* fe_mul.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fe_mul.c; sourceTree = "<group>"; };
B62C85F119CEEA9D00DCA580 /* fe_neg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fe_neg.c; sourceTree = "<group>"; };
B62C85F219CEEA9D00DCA580 /* fe_pow22523.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fe_pow22523.c; sourceTree = "<group>"; };
B62C85F319CEEA9D00DCA580 /* fe_sq.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fe_sq.c; sourceTree = "<group>"; };
B62C85F419CEEA9D00DCA580 /* fe_sq2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fe_sq2.c; sourceTree = "<group>"; };
B62C85F519CEEA9D00DCA580 /* fe_sub.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fe_sub.c; sourceTree = "<group>"; };
B62C85F619CEEA9D00DCA580 /* fe_tobytes.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fe_tobytes.c; sourceTree = "<group>"; };
B62C85F719CEEA9D00DCA580 /* ge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ge.h; sourceTree = "<group>"; };
B62C85F819CEEA9D00DCA580 /* ge_add.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ge_add.c; sourceTree = "<group>"; };
B62C85F919CEEA9D00DCA580 /* ge_add.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ge_add.h; sourceTree = "<group>"; };
B62C85FA19CEEA9D00DCA580 /* ge_double_scalarmult.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ge_double_scalarmult.c; sourceTree = "<group>"; };
B62C85FB19CEEA9D00DCA580 /* ge_frombytes.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ge_frombytes.c; sourceTree = "<group>"; };
B62C85FC19CEEA9D00DCA580 /* ge_madd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ge_madd.c; sourceTree = "<group>"; };
B62C85FD19CEEA9D00DCA580 /* ge_madd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ge_madd.h; sourceTree = "<group>"; };
B62C85FE19CEEA9D00DCA580 /* ge_msub.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ge_msub.c; sourceTree = "<group>"; };
B62C85FF19CEEA9D00DCA580 /* ge_msub.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ge_msub.h; sourceTree = "<group>"; };
B62C860019CEEA9D00DCA580 /* ge_p1p1_to_p2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ge_p1p1_to_p2.c; sourceTree = "<group>"; };
B62C860119CEEA9D00DCA580 /* ge_p1p1_to_p3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ge_p1p1_to_p3.c; sourceTree = "<group>"; };
B62C860219CEEA9D00DCA580 /* ge_p2_0.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ge_p2_0.c; sourceTree = "<group>"; };
B62C860319CEEA9D00DCA580 /* ge_p2_dbl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ge_p2_dbl.c; sourceTree = "<group>"; };
B62C860419CEEA9D00DCA580 /* ge_p2_dbl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ge_p2_dbl.h; sourceTree = "<group>"; };
B62C860519CEEA9D00DCA580 /* ge_p3_0.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ge_p3_0.c; sourceTree = "<group>"; };
B62C860619CEEA9D00DCA580 /* ge_p3_dbl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ge_p3_dbl.c; sourceTree = "<group>"; };
B62C860719CEEA9D00DCA580 /* ge_p3_to_cached.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ge_p3_to_cached.c; sourceTree = "<group>"; };
B62C860819CEEA9D00DCA580 /* ge_p3_to_p2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ge_p3_to_p2.c; sourceTree = "<group>"; };
B62C860919CEEA9D00DCA580 /* ge_p3_tobytes.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ge_p3_tobytes.c; sourceTree = "<group>"; };
B62C860A19CEEA9D00DCA580 /* ge_precomp_0.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ge_precomp_0.c; sourceTree = "<group>"; };
B62C860B19CEEA9D00DCA580 /* ge_scalarmult_base.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ge_scalarmult_base.c; sourceTree = "<group>"; };
B62C860C19CEEA9D00DCA580 /* ge_sub.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ge_sub.c; sourceTree = "<group>"; };
B62C860D19CEEA9D00DCA580 /* ge_sub.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ge_sub.h; sourceTree = "<group>"; };
B62C860E19CEEA9D00DCA580 /* ge_tobytes.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ge_tobytes.c; sourceTree = "<group>"; };
B62C861219CEEA9D00DCA580 /* crypto_int32.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crypto_int32.h; sourceTree = "<group>"; };
B62C861319CEEA9D00DCA580 /* crypto_int64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crypto_int64.h; sourceTree = "<group>"; };
B62C861419CEEA9D00DCA580 /* crypto_sign.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crypto_sign.h; sourceTree = "<group>"; };
B62C861519CEEA9D00DCA580 /* crypto_sign_edwards25519sha512batch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crypto_sign_edwards25519sha512batch.h; sourceTree = "<group>"; };
B62C861619CEEA9D00DCA580 /* crypto_uint32.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crypto_uint32.h; sourceTree = "<group>"; };
B62C861719CEEA9D00DCA580 /* crypto_uint64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crypto_uint64.h; sourceTree = "<group>"; };
B62C861819CEEA9D00DCA580 /* crypto_verify_32.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crypto_verify_32.h; sourceTree = "<group>"; };
B62C861A19CEEA9D00DCA580 /* blocks.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = blocks.c; sourceTree = "<group>"; };
B62C861B19CEEA9D00DCA580 /* hash.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = hash.c; sourceTree = "<group>"; };
B62C861C19CEEA9D00DCA580 /* open.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = open.c; sourceTree = "<group>"; };
B62C861D19CEEA9D00DCA580 /* pow22523.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pow22523.h; sourceTree = "<group>"; };
B62C861E19CEEA9D00DCA580 /* pow225521.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pow225521.h; sourceTree = "<group>"; };
B62C861F19CEEA9D00DCA580 /* sc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sc.h; sourceTree = "<group>"; };
B62C862019CEEA9D00DCA580 /* sc_muladd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sc_muladd.c; sourceTree = "<group>"; };
B62C862119CEEA9D00DCA580 /* sc_reduce.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sc_reduce.c; sourceTree = "<group>"; };
B62C862319CEEA9D00DCA580 /* LICENSE.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE.txt; sourceTree = "<group>"; };
B62C862419CEEA9D00DCA580 /* md_helper.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = md_helper.c; sourceTree = "<group>"; };
B62C862519CEEA9D00DCA580 /* sha2big.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sha2big.c; sourceTree = "<group>"; };
B62C862619CEEA9D00DCA580 /* sph_sha2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sph_sha2.h; sourceTree = "<group>"; };
B62C862719CEEA9D00DCA580 /* sph_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sph_types.h; sourceTree = "<group>"; };
B62C862819CEEA9D00DCA580 /* sign.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sign.c; sourceTree = "<group>"; };
B62C862919CEEA9D00DCA580 /* sqrtm1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqrtm1.h; sourceTree = "<group>"; };
B65F5A1119823F45004D21C8 /* SigningTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SigningTests.m; sourceTree = "<group>"; };
B6EC0956197F559E0070F844 /* BuildTests.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BuildTests.app; sourceTree = BUILT_PRODUCTS_DIR; };
B6EC0959197F559E0070F844 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
B6EC095B197F559E0070F844 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
B6EC095D197F559E0070F844 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
B6EC0961197F559E0070F844 /* BuildTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "BuildTests-Info.plist"; sourceTree = "<group>"; };
B6EC0963197F559E0070F844 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
B6EC0965197F559E0070F844 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
B6EC0967197F559E0070F844 /* BuildTests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BuildTests-Prefix.pch"; sourceTree = "<group>"; };
B6EC0968197F559E0070F844 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
B6EC0969197F559E0070F844 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
B6EC096B197F559E0070F844 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
B6EC0971197F559E0070F844 /* BuildTestsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BuildTestsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
B6EC0972197F559E0070F844 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
B6EC097A197F559E0070F844 /* BuildTestsTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "BuildTestsTests-Info.plist"; sourceTree = "<group>"; };
B6EC097C197F559E0070F844 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
B6EC0989197F55B90070F844 /* curve25519-donna.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "curve25519-donna.c"; sourceTree = "<group>"; };
B6EC0A09197F55E70070F844 /* Curve25519.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Curve25519.h; path = ../../Classes/Curve25519.h; sourceTree = "<group>"; };
B6EC0A0A197F55E70070F844 /* Curve25519.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Curve25519.m; path = ../../Classes/Curve25519.m; sourceTree = "<group>"; };
B6EC0A0C197F5B1E0070F844 /* Randomness.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Randomness.h; path = ../../Classes/Randomness.h; sourceTree = "<group>"; };
B6EC0A0D197F5B1E0070F844 /* Randomness.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Randomness.m; path = ../../Classes/Randomness.m; sourceTree = "<group>"; };
B6EC0B0D197F652A0070F844 /* Ed25519.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Ed25519.h; path = ../../Classes/Ed25519.h; sourceTree = "<group>"; };
B6EC0B0E197F652A0070F844 /* Ed25519.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Ed25519.m; path = ../../Classes/Ed25519.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
B6EC0953197F559E0070F844 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
B6EC095C197F559E0070F844 /* CoreGraphics.framework in Frameworks */,
B6EC095E197F559E0070F844 /* UIKit.framework in Frameworks */,
B6EC095A197F559E0070F844 /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
B6EC096E197F559E0070F844 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
B6EC0973197F559E0070F844 /* XCTest.framework in Frameworks */,
B6EC0975197F559E0070F844 /* UIKit.framework in Frameworks */,
B6EC0974197F559E0070F844 /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
B62C85D719CEEA9D00DCA580 /* ed25519 */ = {
isa = PBXGroup;
children = (
B62C85D819CEEA9D00DCA580 /* additions */,
B62C85E119CEEA9D00DCA580 /* api.h */,
B62C85E219CEEA9D00DCA580 /* base.h */,
B62C85E319CEEA9D00DCA580 /* base2.h */,
B62C85E419CEEA9D00DCA580 /* d.h */,
B62C85E519CEEA9D00DCA580 /* d2.h */,
B62C85E619CEEA9D00DCA580 /* fe.h */,
B62C85E719CEEA9D00DCA580 /* fe_0.c */,
B62C85E819CEEA9D00DCA580 /* fe_1.c */,
B62C85E919CEEA9D00DCA580 /* fe_add.c */,
B62C85EA19CEEA9D00DCA580 /* fe_cmov.c */,
B62C85EB19CEEA9D00DCA580 /* fe_copy.c */,
B62C85EC19CEEA9D00DCA580 /* fe_frombytes.c */,
B62C85ED19CEEA9D00DCA580 /* fe_invert.c */,
B62C85EE19CEEA9D00DCA580 /* fe_isnegative.c */,
B62C85EF19CEEA9D00DCA580 /* fe_isnonzero.c */,
B62C85F019CEEA9D00DCA580 /* fe_mul.c */,
B62C85F119CEEA9D00DCA580 /* fe_neg.c */,
B62C85F219CEEA9D00DCA580 /* fe_pow22523.c */,
B62C85F319CEEA9D00DCA580 /* fe_sq.c */,
B62C85F419CEEA9D00DCA580 /* fe_sq2.c */,
B62C85F519CEEA9D00DCA580 /* fe_sub.c */,
B62C85F619CEEA9D00DCA580 /* fe_tobytes.c */,
B62C85F719CEEA9D00DCA580 /* ge.h */,
B62C85F819CEEA9D00DCA580 /* ge_add.c */,
B62C85F919CEEA9D00DCA580 /* ge_add.h */,
B62C85FA19CEEA9D00DCA580 /* ge_double_scalarmult.c */,
B62C85FB19CEEA9D00DCA580 /* ge_frombytes.c */,
B62C85FC19CEEA9D00DCA580 /* ge_madd.c */,
B62C85FD19CEEA9D00DCA580 /* ge_madd.h */,
B62C85FE19CEEA9D00DCA580 /* ge_msub.c */,
B62C85FF19CEEA9D00DCA580 /* ge_msub.h */,
B62C860019CEEA9D00DCA580 /* ge_p1p1_to_p2.c */,
B62C860119CEEA9D00DCA580 /* ge_p1p1_to_p3.c */,
B62C860219CEEA9D00DCA580 /* ge_p2_0.c */,
B62C860319CEEA9D00DCA580 /* ge_p2_dbl.c */,
B62C860419CEEA9D00DCA580 /* ge_p2_dbl.h */,
B62C860519CEEA9D00DCA580 /* ge_p3_0.c */,
B62C860619CEEA9D00DCA580 /* ge_p3_dbl.c */,
B62C860719CEEA9D00DCA580 /* ge_p3_to_cached.c */,
B62C860819CEEA9D00DCA580 /* ge_p3_to_p2.c */,
B62C860919CEEA9D00DCA580 /* ge_p3_tobytes.c */,
B62C860A19CEEA9D00DCA580 /* ge_precomp_0.c */,
B62C860B19CEEA9D00DCA580 /* ge_scalarmult_base.c */,
B62C860C19CEEA9D00DCA580 /* ge_sub.c */,
B62C860D19CEEA9D00DCA580 /* ge_sub.h */,
B62C860E19CEEA9D00DCA580 /* ge_tobytes.c */,
B62C861119CEEA9D00DCA580 /* nacl_includes */,
B62C861919CEEA9D00DCA580 /* nacl_sha512 */,
B62C861C19CEEA9D00DCA580 /* open.c */,
B62C861D19CEEA9D00DCA580 /* pow22523.h */,
B62C861E19CEEA9D00DCA580 /* pow225521.h */,
B62C861F19CEEA9D00DCA580 /* sc.h */,
B62C862019CEEA9D00DCA580 /* sc_muladd.c */,
B62C862119CEEA9D00DCA580 /* sc_reduce.c */,
B62C862219CEEA9D00DCA580 /* sha512 */,
B62C862819CEEA9D00DCA580 /* sign.c */,
B62C862919CEEA9D00DCA580 /* sqrtm1.h */,
);
name = ed25519;
path = ../../Sources/ed25519;
sourceTree = "<group>";
};
B62C85D819CEEA9D00DCA580 /* additions */ = {
isa = PBXGroup;
children = (
B62C85D919CEEA9D00DCA580 /* compare.c */,
B62C85DA19CEEA9D00DCA580 /* compare.h */,
B62C85DB19CEEA9D00DCA580 /* crypto_hash_sha512.h */,
B62C85DC19CEEA9D00DCA580 /* curve_sigs.c */,
B62C85DD19CEEA9D00DCA580 /* curve_sigs.h */,
B62C85DE19CEEA9D00DCA580 /* sign_modified.c */,
B62C85DF19CEEA9D00DCA580 /* zeroize.c */,
B62C85E019CEEA9D00DCA580 /* zeroize.h */,
);
path = additions;
sourceTree = "<group>";
};
B62C861119CEEA9D00DCA580 /* nacl_includes */ = {
isa = PBXGroup;
children = (
B62C861219CEEA9D00DCA580 /* crypto_int32.h */,
B62C861319CEEA9D00DCA580 /* crypto_int64.h */,
B62C861419CEEA9D00DCA580 /* crypto_sign.h */,
B62C861519CEEA9D00DCA580 /* crypto_sign_edwards25519sha512batch.h */,
B62C861619CEEA9D00DCA580 /* crypto_uint32.h */,
B62C861719CEEA9D00DCA580 /* crypto_uint64.h */,
B62C861819CEEA9D00DCA580 /* crypto_verify_32.h */,
);
path = nacl_includes;
sourceTree = "<group>";
};
B62C861919CEEA9D00DCA580 /* nacl_sha512 */ = {
isa = PBXGroup;
children = (
B62C861A19CEEA9D00DCA580 /* blocks.c */,
B62C861B19CEEA9D00DCA580 /* hash.c */,
);
path = nacl_sha512;
sourceTree = "<group>";
};
B62C862219CEEA9D00DCA580 /* sha512 */ = {
isa = PBXGroup;
children = (
B62C862319CEEA9D00DCA580 /* LICENSE.txt */,
B62C862419CEEA9D00DCA580 /* md_helper.c */,
B62C862519CEEA9D00DCA580 /* sha2big.c */,
B62C862619CEEA9D00DCA580 /* sph_sha2.h */,
B62C862719CEEA9D00DCA580 /* sph_types.h */,
);
path = sha512;
sourceTree = "<group>";
};
B6EC094D197F559E0070F844 = {
isa = PBXGroup;
children = (
B6EC095F197F559E0070F844 /* BuildTests */,
B6EC0978197F559E0070F844 /* BuildTestsTests */,
B6EC0958197F559E0070F844 /* Frameworks */,
B6EC0957197F559E0070F844 /* Products */,
);
sourceTree = "<group>";
};
B6EC0957197F559E0070F844 /* Products */ = {
isa = PBXGroup;
children = (
B6EC0956197F559E0070F844 /* BuildTests.app */,
B6EC0971197F559E0070F844 /* BuildTestsTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
B6EC0958197F559E0070F844 /* Frameworks */ = {
isa = PBXGroup;
children = (
B6EC0959197F559E0070F844 /* Foundation.framework */,
B6EC095B197F559E0070F844 /* CoreGraphics.framework */,
B6EC095D197F559E0070F844 /* UIKit.framework */,
B6EC0972197F559E0070F844 /* XCTest.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
B6EC095F197F559E0070F844 /* BuildTests */ = {
isa = PBXGroup;
children = (
B6EC0A10197F5D090070F844 /* Classes */,
B6EC0A0F197F5CFE0070F844 /* Source */,
B6EC0968197F559E0070F844 /* AppDelegate.h */,
B6EC0969197F559E0070F844 /* AppDelegate.m */,
B6EC096B197F559E0070F844 /* Images.xcassets */,
B6EC0960197F559E0070F844 /* Supporting Files */,
);
path = BuildTests;
sourceTree = "<group>";
};
B6EC0960197F559E0070F844 /* Supporting Files */ = {
isa = PBXGroup;
children = (
B6EC0961197F559E0070F844 /* BuildTests-Info.plist */,
B6EC0962197F559E0070F844 /* InfoPlist.strings */,
B6EC0965197F559E0070F844 /* main.m */,
B6EC0967197F559E0070F844 /* BuildTests-Prefix.pch */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
B6EC0978197F559E0070F844 /* BuildTestsTests */ = {
isa = PBXGroup;
children = (
B65F5A1119823F45004D21C8 /* SigningTests.m */,
B6EC0979197F559E0070F844 /* Supporting Files */,
);
path = BuildTestsTests;
sourceTree = "<group>";
};
B6EC0979197F559E0070F844 /* Supporting Files */ = {
isa = PBXGroup;
children = (
B6EC097A197F559E0070F844 /* BuildTestsTests-Info.plist */,
B6EC097B197F559E0070F844 /* InfoPlist.strings */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
B6EC0988197F55B90070F844 /* Curve25519 */ = {
isa = PBXGroup;
children = (
B6EC0989197F55B90070F844 /* curve25519-donna.c */,
);
name = Curve25519;
path = ../../Sources/Curve25519;
sourceTree = "<group>";
};
B6EC0A0F197F5CFE0070F844 /* Source */ = {
isa = PBXGroup;
children = (
B62C85D719CEEA9D00DCA580 /* ed25519 */,
B6EC0988197F55B90070F844 /* Curve25519 */,
);
name = Source;
sourceTree = "<group>";
};
B6EC0A10197F5D090070F844 /* Classes */ = {
isa = PBXGroup;
children = (
B6EC0A09197F55E70070F844 /* Curve25519.h */,
B6EC0A0A197F55E70070F844 /* Curve25519.m */,
B6EC0B0D197F652A0070F844 /* Ed25519.h */,
B6EC0B0E197F652A0070F844 /* Ed25519.m */,
B6EC0A0C197F5B1E0070F844 /* Randomness.h */,
B6EC0A0D197F5B1E0070F844 /* Randomness.m */,
);
name = Classes;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
B6EC0955197F559E0070F844 /* BuildTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = B6EC0982197F559E0070F844 /* Build configuration list for PBXNativeTarget "BuildTests" */;
buildPhases = (
B6EC0952197F559E0070F844 /* Sources */,
B6EC0953197F559E0070F844 /* Frameworks */,
B6EC0954197F559E0070F844 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = BuildTests;
productName = BuildTests;
productReference = B6EC0956197F559E0070F844 /* BuildTests.app */;
productType = "com.apple.product-type.application";
};
B6EC0970197F559E0070F844 /* BuildTestsTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = B6EC0985197F559E0070F844 /* Build configuration list for PBXNativeTarget "BuildTestsTests" */;
buildPhases = (
B6EC096D197F559E0070F844 /* Sources */,
B6EC096E197F559E0070F844 /* Frameworks */,
B6EC096F197F559E0070F844 /* Resources */,
);
buildRules = (
);
dependencies = (
B6EC0977197F559E0070F844 /* PBXTargetDependency */,
);
name = BuildTestsTests;
productName = BuildTestsTests;
productReference = B6EC0971197F559E0070F844 /* BuildTestsTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
B6EC094E197F559E0070F844 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0510;
ORGANIZATIONNAME = "Open Whisper Systems";
TargetAttributes = {
B6EC0970197F559E0070F844 = {
TestTargetID = B6EC0955197F559E0070F844;
};
};
};
buildConfigurationList = B6EC0951197F559E0070F844 /* Build configuration list for PBXProject "BuildTests" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = B6EC094D197F559E0070F844;
productRefGroup = B6EC0957197F559E0070F844 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
B6EC0955197F559E0070F844 /* BuildTests */,
B6EC0970197F559E0070F844 /* BuildTestsTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
B6EC0954197F559E0070F844 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B62C865619CEEA9D00DCA580 /* LICENSE.txt in Resources */,
B6EC0964197F559E0070F844 /* InfoPlist.strings in Resources */,
B6EC096C197F559E0070F844 /* Images.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
B6EC096F197F559E0070F844 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B6EC097D197F559E0070F844 /* InfoPlist.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
B6EC0952197F559E0070F844 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B62C864019CEEA9D00DCA580 /* ge_frombytes.c in Sources */,
B62C863F19CEEA9D00DCA580 /* ge_double_scalarmult.c in Sources */,
B62C863219CEEA9D00DCA580 /* fe_copy.c in Sources */,
B62C863719CEEA9D00DCA580 /* fe_mul.c in Sources */,
B6EC0A0E197F5B1E0070F844 /* Randomness.m in Sources */,
B6EC096A197F559E0070F844 /* AppDelegate.m in Sources */,
B62C865519CEEA9D00DCA580 /* sc_reduce.c in Sources */,
B6EC0966197F559E0070F844 /* main.m in Sources */,
B62C863319CEEA9D00DCA580 /* fe_frombytes.c in Sources */,
B62C865319CEEA9D00DCA580 /* open.c in Sources */,
B62C863519CEEA9D00DCA580 /* fe_isnegative.c in Sources */,
B6EC09DA197F55B90070F844 /* curve25519-donna.c in Sources */,
B62C864519CEEA9D00DCA580 /* ge_p2_0.c in Sources */,
B62C862A19CEEA9D00DCA580 /* compare.c in Sources */,
B62C864619CEEA9D00DCA580 /* ge_p2_dbl.c in Sources */,
B62C863819CEEA9D00DCA580 /* fe_neg.c in Sources */,
B62C864C19CEEA9D00DCA580 /* ge_precomp_0.c in Sources */,
B62C863419CEEA9D00DCA580 /* fe_invert.c in Sources */,
B6EC0B0F197F652A0070F844 /* Ed25519.m in Sources */,
B62C862F19CEEA9D00DCA580 /* fe_1.c in Sources */,
B62C863019CEEA9D00DCA580 /* fe_add.c in Sources */,
B62C864A19CEEA9D00DCA580 /* ge_p3_to_p2.c in Sources */,
B62C865919CEEA9D00DCA580 /* sign.c in Sources */,
B62C864319CEEA9D00DCA580 /* ge_p1p1_to_p2.c in Sources */,
B62C864919CEEA9D00DCA580 /* ge_p3_to_cached.c in Sources */,
B62C865419CEEA9D00DCA580 /* sc_muladd.c in Sources */,
B62C864719CEEA9D00DCA580 /* ge_p3_0.c in Sources */,
B62C863619CEEA9D00DCA580 /* fe_isnonzero.c in Sources */,
B6EC0A0B197F55E70070F844 /* Curve25519.m in Sources */,
B62C864819CEEA9D00DCA580 /* ge_p3_dbl.c in Sources */,
B62C863919CEEA9D00DCA580 /* fe_pow22523.c in Sources */,
B62C864219CEEA9D00DCA580 /* ge_msub.c in Sources */,
B62C863B19CEEA9D00DCA580 /* fe_sq2.c in Sources */,
B62C862E19CEEA9D00DCA580 /* fe_0.c in Sources */,
B62C865219CEEA9D00DCA580 /* hash.c in Sources */,
B62C864F19CEEA9D00DCA580 /* ge_tobytes.c in Sources */,
B62C862C19CEEA9D00DCA580 /* sign_modified.c in Sources */,
B62C864E19CEEA9D00DCA580 /* ge_sub.c in Sources */,
B62C864419CEEA9D00DCA580 /* ge_p1p1_to_p3.c in Sources */,
B62C862D19CEEA9D00DCA580 /* zeroize.c in Sources */,
B62C863D19CEEA9D00DCA580 /* fe_tobytes.c in Sources */,
B62C864D19CEEA9D00DCA580 /* ge_scalarmult_base.c in Sources */,
B62C863C19CEEA9D00DCA580 /* fe_sub.c in Sources */,
B62C865119CEEA9D00DCA580 /* blocks.c in Sources */,
B62C864119CEEA9D00DCA580 /* ge_madd.c in Sources */,
B62C863E19CEEA9D00DCA580 /* ge_add.c in Sources */,
B62C862B19CEEA9D00DCA580 /* curve_sigs.c in Sources */,
B62C863A19CEEA9D00DCA580 /* fe_sq.c in Sources */,
B62C863119CEEA9D00DCA580 /* fe_cmov.c in Sources */,
B62C864B19CEEA9D00DCA580 /* ge_p3_tobytes.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
B6EC096D197F559E0070F844 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B65F5A1219823F45004D21C8 /* SigningTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
B6EC0977197F559E0070F844 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = B6EC0955197F559E0070F844 /* BuildTests */;
targetProxy = B6EC0976197F559E0070F844 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
B6EC0962197F559E0070F844 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
B6EC0963197F559E0070F844 /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
B6EC097B197F559E0070F844 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
B6EC097C197F559E0070F844 /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
B6EC0980197F559E0070F844 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
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 = 7.1;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = (
"-Ied25519/sha512",
"-Ied25519",
"-Ied25519/nacl_includes",
);
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
B6EC0981197F559E0070F844 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
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 = 7.1;
OTHER_CFLAGS = (
"-Ied25519/sha512",
"-Ied25519",
"-Ied25519/nacl_includes",
);
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
B6EC0983197F559E0070F844 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "BuildTests/BuildTests-Prefix.pch";
INFOPLIST_FILE = "BuildTests/BuildTests-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
name = Debug;
};
B6EC0984197F559E0070F844 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "BuildTests/BuildTests-Prefix.pch";
INFOPLIST_FILE = "BuildTests/BuildTests-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
name = Release;
};
B6EC0986197F559E0070F844 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/BuildTests.app/BuildTests";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
"$(DEVELOPER_FRAMEWORKS_DIR)",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "BuildTests/BuildTests-Prefix.pch";
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = "BuildTestsTests/BuildTestsTests-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = xctest;
};
name = Debug;
};
B6EC0987197F559E0070F844 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/BuildTests.app/BuildTests";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
"$(DEVELOPER_FRAMEWORKS_DIR)",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "BuildTests/BuildTests-Prefix.pch";
INFOPLIST_FILE = "BuildTestsTests/BuildTestsTests-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = xctest;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
B6EC0951197F559E0070F844 /* Build configuration list for PBXProject "BuildTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
B6EC0980197F559E0070F844 /* Debug */,
B6EC0981197F559E0070F844 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
B6EC0982197F559E0070F844 /* Build configuration list for PBXNativeTarget "BuildTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
B6EC0983197F559E0070F844 /* Debug */,
B6EC0984197F559E0070F844 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
B6EC0985197F559E0070F844 /* Build configuration list for PBXNativeTarget "BuildTestsTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
B6EC0986197F559E0070F844 /* Debug */,
B6EC0987197F559E0070F844 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = B6EC094E197F559E0070F844 /* Project object */;
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:BuildTests.xcodeproj">
</FileRef>
</Workspace>

View File

@ -0,0 +1,41 @@
<?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>IDESourceControlProjectFavoriteDictionaryKey</key>
<false/>
<key>IDESourceControlProjectIdentifier</key>
<string>586899B5-2FE6-4EE5-8339-CD899C18F971</string>
<key>IDESourceControlProjectName</key>
<string>BuildTests</string>
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>F50345634CF41CB6DA6FF41C2CFAA70E8FA1CCF2</key>
<string>https://github.com/FredericJacobs/25519.git</string>
</dict>
<key>IDESourceControlProjectPath</key>
<string>BuildTests/BuildTests.xcodeproj</string>
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>F50345634CF41CB6DA6FF41C2CFAA70E8FA1CCF2</key>
<string>../../..</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>https://github.com/FredericJacobs/25519.git</string>
<key>IDESourceControlProjectVersion</key>
<integer>111</integer>
<key>IDESourceControlProjectWCCIdentifier</key>
<string>F50345634CF41CB6DA6FF41C2CFAA70E8FA1CCF2</string>
<key>IDESourceControlProjectWCConfigurations</key>
<array>
<dict>
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
<string>public.vcs.git</string>
<key>IDESourceControlWCCIdentifierKey</key>
<string>F50345634CF41CB6DA6FF41C2CFAA70E8FA1CCF2</string>
<key>IDESourceControlWCCName</key>
<string>25519</string>
</dict>
</array>
</dict>
</plist>

View File

@ -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>IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded</key>
<false/>
</dict>
</plist>

View File

@ -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>BuildLocationStyle</key>
<string>UseAppPreferences</string>
<key>CustomBuildLocationType</key>
<string>RelativeToDerivedData</string>
<key>DerivedDataLocationStyle</key>
<string>Default</string>
<key>HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges</key>
<true/>
<key>IssueFilterStyle</key>
<string>ShowActiveSchemeOnly</string>
<key>LiveSourceIssuesEnabled</key>
<true/>
<key>SnapshotAutomaticallyBeforeSignificantChanges</key>
<false/>
<key>SnapshotLocationStyle</key>
<string>Default</string>
</dict>
</plist>

View File

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B6EC0955197F559E0070F844"
BuildableName = "BuildTests.app"
BlueprintName = "BuildTests"
ReferencedContainer = "container:BuildTests.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B6EC0970197F559E0070F844"
BuildableName = "BuildTestsTests.xctest"
BlueprintName = "BuildTestsTests"
ReferencedContainer = "container:BuildTests.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B6EC0955197F559E0070F844"
BuildableName = "BuildTests.app"
BlueprintName = "BuildTests"
ReferencedContainer = "container:BuildTests.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B6EC0955197F559E0070F844"
BuildableName = "BuildTests.app"
BlueprintName = "BuildTests"
ReferencedContainer = "container:BuildTests.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B6EC0955197F559E0070F844"
BuildableName = "BuildTests.app"
BlueprintName = "BuildTests"
ReferencedContainer = "container:BuildTests.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B6EC0970197F559E0070F844"
BuildableName = "BuildTestsTests.xctest"
BlueprintName = "BuildTestsTests"
ReferencedContainer = "container:BuildTests.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B6EC0955197F559E0070F844"
BuildableName = "BuildTests.app"
BlueprintName = "BuildTests"
ReferencedContainer = "container:BuildTests.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B6EC0955197F559E0070F844"
BuildableName = "BuildTests.app"
BlueprintName = "BuildTests"
ReferencedContainer = "container:BuildTests.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
</Bucket>

View File

@ -0,0 +1,32 @@
<?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>SchemeUserState</key>
<dict>
<key>BuildTests.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>BuildTestsTests.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>B6EC0955197F559E0070F844</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>B6EC0970197F559E0070F844</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>

View File

@ -0,0 +1,15 @@
//
// AppDelegate.h
// BuildTests
//
// Created by Frederic Jacobs on 22/07/14.
// Copyright (c) 2014 Frederic Jacobs. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end

View File

@ -0,0 +1,53 @@
//
// AppDelegate.m
// BuildTests
//
// Created by Frederic Jacobs on 22/07/14.
// Copyright (c) 2014 Frederic Jacobs. All rights reserved.
//
#import "Randomness.h"
#import "Ed25519.h"
#import "Curve25519.h"
#import "AppDelegate.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application
{
// 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 throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}
- (void)applicationDidEnterBackground:(UIApplication *)application
{
// 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.
}
- (void)applicationWillEnterForeground:(UIApplication *)application
{
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}
- (void)applicationDidBecomeActive:(UIApplication *)application
{
// 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.
}
- (void)applicationWillTerminate:(UIApplication *)application
{
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
@end

View 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>en</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.fredericjacobs.${PRODUCT_NAME:rfc1034identifier}</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>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<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>

View File

@ -0,0 +1,16 @@
//
// Prefix header
//
// The contents of this file are implicitly included at the beginning of every source file.
//
#import <Availability.h>
#ifndef __IPHONE_3_0
#warning "This project uses features only available in iOS SDK 3.0 and later."
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif

View File

@ -0,0 +1,53 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"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"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

@ -0,0 +1,51 @@
{
"images" : [
{
"orientation" : "portrait",
"idiom" : "iphone",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"subtype" : "retina4",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@ -0,0 +1,18 @@
//
// main.m
// BuildTests
//
// Created by Frederic Jacobs on 22/07/14.
// Copyright (c) 2014 Frederic Jacobs. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}

View File

@ -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>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.fredericjacobs.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

View File

@ -0,0 +1,16 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
import XCTest
// Cocoapods-generated test targets (like this one)
// fail to link if:
//
// * They only contain Obj-C tests.
// * They depend on pods that use Swift.
//
// The work around is to add (this) empty swift file
// to our test target.
//
// See: https://github.com/CocoaPods/CocoaPods/issues/7170

View File

@ -1,15 +1,11 @@
//
// BuildTestsTests.m
// BuildTestsTests
//
// Created by Frederic Jacobs on 22/07/14.
// Copyright (c) 2014 Frederic Jacobs. All rights reserved.
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import <XCTest/XCTest.h>
#import "Curve25519.h"
#import "Randomness.h"
#import "Ed25519.h"
#import <SignalCoreKit/Randomness.h>
#import <XCTest/XCTest.h>
@interface SigningTests : XCTestCase
@ -35,14 +31,13 @@
ECKeyPair *key = [Curve25519 generateKeyPair];
NSData *data = [Randomness generateRandomBytes:i];
NSData *signature = [Ed25519 sign:data withKeyPair:key];
if (![Ed25519 verifySignature:signature publicKey:[key publicKey] data:data]) {
NSData *signature = [Ed25519 throws_sign:data withKeyPair:key];
if (![Ed25519 throws_verifySignature:signature publicKey:[key publicKey] data:data]) {
XCTAssert(false, @"Failed to verify signature while performing testing");
return;
}
}
}
}
@ -53,10 +48,10 @@
ECKeyPair *key = [Curve25519 generateKeyPair];
NSData *data = [Randomness generateRandomBytes:32];
NSData *signature = [Ed25519 sign:data withKeyPair:key];
if (![Ed25519 verifySignature:signature publicKey:[key publicKey] data:data]) {
NSData *signature = [Ed25519 throws_sign:data withKeyPair:key];
if (![Ed25519 throws_verifySignature:signature publicKey:[key publicKey] data:data]) {
XCTAssert(false, @"Verifying a signed 32-byte identity key failed");
return;
}

View File

@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@ -1,26 +1,42 @@
//
// Curve25519.h
//
// Created by Frederic Jacobs on 22/07/14.
// Copyright (c) 2014 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
#define ECCKeyLength 32
#define ECCSignatureLength 64
@interface ECKeyPair : NSObject <NSSecureCoding> {
uint8_t publicKey [ECCKeyLength];
uint8_t privateKey[ECCKeyLength];
}
extern NSErrorDomain const Curve25519KitErrorDomain;
typedef NS_ERROR_ENUM(Curve25519KitErrorDomain, Curve25519KitError){
Curve25519KitError_InvalidKeySize = 1
};
-(NSData*) publicKey;
@interface ECKeyPair : NSObject <NSSecureCoding>
@property (atomic, readonly) NSData *publicKey;
@property (atomic, readonly) NSData *privateKey;
- (instancetype)init NS_UNAVAILABLE;
/**
* Build a keypair from existing key data.
* If you need a *new* keypair, user `Curve25519.generateKeyPair` instead.
*/
- (nullable instancetype)initWithPublicKeyData:(NSData *)publicKeyData
privateKeyData:(NSData *)privateKeyData
error:(NSError **)error NS_DESIGNATED_INITIALIZER;
@end
#pragma mark -
@interface Curve25519 : NSObject
- (instancetype)init NS_UNAVAILABLE;
/**
* Generate a 32-byte shared secret from a public key and a key pair using curve25519.
*
@ -29,15 +45,21 @@
*
* @return 32-byte shared secret derived from ECDH with curve25519 public key and key pair.
*/
+ (NSData *)throws_generateSharedSecretFromPublicKey:(NSData *)theirPublicKey andKeyPair:(ECKeyPair *)keyPair NS_SWIFT_UNAVAILABLE("throws objc expections");
+ (NSData*)generateSharedSecretFromPublicKey:(NSData*)theirPublicKey andKeyPair:(ECKeyPair*)keyPair;
+ (NSData *)throws_generateSharedSecretFromPublicKey:(NSData *)publicKey privateKey:(NSData *)privateKey NS_SWIFT_UNAVAILABLE("throws objc expections");
+ (nullable NSData *)generateSharedSecretFromPublicKey:(NSData *)publicKey
privateKey:(NSData *)privateKey
error:(NSError **)outError;
/**
* Generate a curve25519 key pair
*
* @return curve25519 key pair.
*/
+ (ECKeyPair*)generateKeyPair;
+ (ECKeyPair *)generateKeyPair;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,124 +1,198 @@
//
// Curve25519.m
// BuildTests
//
// Created by Frederic Jacobs on 22/07/14.
// Copyright (c) 2014 Open Whisper Systems. All rights reserved.
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
#import "Curve25519.h"
#import "Randomness.h"
#import <SignalCoreKit/OWSAsserts.h>
#import <SignalCoreKit/Randomness.h>
#import <SignalCoreKit/SCKExceptionWrapper.h>
NSString * const TSECKeyPairPublicKey = @"TSECKeyPairPublicKey";
NSString * const TSECKeyPairPrivateKey = @"TSECKeyPairPrivateKey";
NSString * const TSECKeyPairPreKeyId = @"TSECKeyPairPreKeyId";
NS_ASSUME_NONNULL_BEGIN
NSErrorDomain const Curve25519KitErrorDomain = @"Curve25519KitErrorDomain";
NSString *const TSECKeyPairPublicKey = @"TSECKeyPairPublicKey";
NSString *const TSECKeyPairPrivateKey = @"TSECKeyPairPrivateKey";
NSString *const TSECKeyPairPreKeyId = @"TSECKeyPairPreKeyId";
extern void curve25519_donna(unsigned char *output, const unsigned char *a, const unsigned char *b);
extern int curve25519_sign(unsigned char* signature_out, /* 64 bytes */
const unsigned char* curve25519_privkey, /* 32 bytes */
const unsigned char* msg, const unsigned long msg_len,
const unsigned char* random); /* 64 bytes */
extern int curve25519_sign(unsigned char *signature_out, /* 64 bytes */
const unsigned char *curve25519_privkey, /* 32 bytes */
const unsigned char *msg,
const unsigned long msg_len,
const unsigned char *random); /* 64 bytes */
@implementation ECKeyPair
+ (BOOL)supportsSecureCoding{
+ (BOOL)supportsSecureCoding
{
return YES;
}
-(void)encodeWithCoder:(NSCoder *)coder {
[coder encodeBytes:self->publicKey length:ECCKeyLength forKey:TSECKeyPairPublicKey];
[coder encodeBytes:self->privateKey length:ECCKeyLength forKey:TSECKeyPairPrivateKey];
- (void)encodeWithCoder:(NSCoder *)coder
{
[coder encodeBytes:self.publicKey.bytes length:ECCKeyLength forKey:TSECKeyPairPublicKey];
[coder encodeBytes:self.privateKey.bytes length:ECCKeyLength forKey:TSECKeyPairPrivateKey];
}
-(id)initWithCoder:(NSCoder *)coder {
self = [super init];
if (self) {
NSUInteger returnedLength = 0;
const uint8_t *returnedBuffer = NULL;
// De-serialize public key
returnedBuffer = [coder decodeBytesForKey:TSECKeyPairPublicKey returnedLength:&returnedLength];
if (returnedLength != ECCKeyLength) {
- (nullable instancetype)initWithCoder:(NSCoder *)coder
{
NSUInteger returnedLength = 0;
const uint8_t *returnedBuffer = NULL;
// De-serialize public key
returnedBuffer = [coder decodeBytesForKey:TSECKeyPairPublicKey returnedLength:&returnedLength];
if (returnedLength != ECCKeyLength) {
OWSFailDebug(@"failure: wrong length for public key.");
return nil;
}
NSData *publicKeyData = [NSData dataWithBytes:returnedBuffer length:returnedLength];
// De-serialize private key
returnedBuffer = [coder decodeBytesForKey:TSECKeyPairPrivateKey returnedLength:&returnedLength];
if (returnedLength != ECCKeyLength) {
OWSFailDebug(@"failure: wrong length for private key.");
return nil;
}
NSData *privateKeyData = [NSData dataWithBytes:returnedBuffer length:returnedLength];
NSError *error;
ECKeyPair *keyPair = [self initWithPublicKeyData:publicKeyData
privateKeyData:privateKeyData
error:&error];
if (error != nil) {
OWSFailDebug(@"error: %@", error);
return nil;
}
return keyPair;
}
/**
* Build a keypair from existing key data.
* If you need a *new* keypair, user `generateKeyPair` instead.
*/
- (nullable instancetype)initWithPublicKeyData:(NSData *)publicKeyData
privateKeyData:(NSData *)privateKeyData
error:(NSError **)error
{
if (self = [super init]) {
if (publicKeyData.length != ECCKeyLength || privateKeyData.length != ECCKeyLength) {
*error = [NSError errorWithDomain:Curve25519KitErrorDomain
code:Curve25519KitError_InvalidKeySize
userInfo:nil];
return nil;
}
memcpy(self->publicKey, returnedBuffer, ECCKeyLength);
// De-serialize private key
returnedBuffer = [coder decodeBytesForKey:TSECKeyPairPrivateKey returnedLength:&returnedLength];
if (returnedLength != ECCKeyLength) {
return nil;
}
memcpy(self->privateKey, returnedBuffer, ECCKeyLength);
_publicKey = publicKeyData;
_privateKey = privateKeyData;
}
return self;
}
+ (ECKeyPair *)generateKeyPair
{
// Generate key pair as described in
// https://code.google.com/p/curve25519-donna/
NSMutableData *privateKey = [[Randomness generateRandomBytes:ECCKeyLength] mutableCopy];
uint8_t *privateKeyBytes = privateKey.mutableBytes;
privateKeyBytes[0] &= 248;
privateKeyBytes[31] &= 127;
privateKeyBytes[31] |= 64;
static const uint8_t basepoint[ECCKeyLength] = { 9 };
NSMutableData *publicKey = [NSMutableData dataWithLength:ECCKeyLength];
if (!publicKey) {
OWSFail(@"Could not allocate buffer");
}
curve25519_donna(publicKey.mutableBytes, privateKey.mutableBytes, basepoint);
ECKeyPair *keyPair = [[ECKeyPair alloc] initWithPublicKeyData:[publicKey copy]
privateKeyData:[privateKey copy]
error:nil];
OWSAssert(keyPair != nil);
+(ECKeyPair*)generateKeyPair{
ECKeyPair* keyPair =[[ECKeyPair alloc] init];
// Generate key pair as described in https://code.google.com/p/curve25519-donna/
memcpy(keyPair->privateKey, [[Randomness generateRandomBytes:32] bytes], 32);
keyPair->privateKey[0] &= 248;
keyPair->privateKey[31] &= 127;
keyPair->privateKey[31] |= 64;
static const uint8_t basepoint[ECCKeyLength] = {9};
curve25519_donna(keyPair->publicKey, keyPair->privateKey, basepoint);
return keyPair;
}
-(NSData*) publicKey {
return [NSData dataWithBytes:self->publicKey length:32];
}
- (NSData *)throws_sign:(NSData *)data
{
if (!data) {
OWSRaiseException(NSInvalidArgumentException, @"Missing data.");
}
NSMutableData *signatureData = [NSMutableData dataWithLength:ECCSignatureLength];
if (!signatureData) {
OWSFail(@"Could not allocate buffer");
}
-(NSData*) sign:(NSData*)data{
Byte signatureBuffer[ECCSignatureLength];
NSData *randomBytes = [Randomness generateRandomBytes:64];
if(curve25519_sign(signatureBuffer, self->privateKey, [data bytes], [data length], [randomBytes bytes]) == -1 ){
@throw [NSException exceptionWithName:NSInternalInconsistencyException reason:@"Message couldn't be signed." userInfo:nil];
}
NSData *signature = [NSData dataWithBytes:signatureBuffer length:ECCSignatureLength];
return signature;
}
-(NSData*) generateSharedSecretFromPublicKey:(NSData*)theirPublicKey {
unsigned char *sharedSecret = NULL;
if ([theirPublicKey length] != 32) {
@throw [NSException exceptionWithName:NSInvalidArgumentException reason:@"The supplied public key does not contain 32 bytes" userInfo:nil];
if (curve25519_sign(
signatureData.mutableBytes, self.privateKey.bytes, [data bytes], [data length], [randomBytes bytes])
== -1) {
OWSRaiseException(NSInternalInconsistencyException, @"Message couldn't be signed.");
}
sharedSecret = malloc(32);
if (sharedSecret == NULL) {
free(sharedSecret);
return nil;
}
curve25519_donna(sharedSecret,self->privateKey, [theirPublicKey bytes]);
NSData *sharedSecretData = [NSData dataWithBytes:sharedSecret length:32];
free(sharedSecret);
return sharedSecretData;
return [signatureData copy];
}
@end
#pragma mark -
@implementation Curve25519
+(ECKeyPair*)generateKeyPair{
+ (ECKeyPair *)generateKeyPair
{
return [ECKeyPair generateKeyPair];
}
+(NSData*)generateSharedSecretFromPublicKey:(NSData *)theirPublicKey andKeyPair:(ECKeyPair *)keyPair{
return [keyPair generateSharedSecretFromPublicKey:theirPublicKey];
+ (NSData *)throws_generateSharedSecretFromPublicKey:(NSData *)theirPublicKey andKeyPair:(ECKeyPair *)keyPair
{
if (!keyPair) {
OWSRaiseException(NSInvalidArgumentException, @"Missing key pair.");
}
return [self throws_generateSharedSecretFromPublicKey:theirPublicKey privateKey:keyPair.privateKey];
}
+ (nullable NSData *)generateSharedSecretFromPublicKey:(NSData *)publicKey
privateKey:(NSData *)privateKey
error:(NSError **)outError
{
@try {
return [self throws_generateSharedSecretFromPublicKey:publicKey privateKey:privateKey];
} @catch (NSException *exception) {
*outError = SCKExceptionWrapperErrorMake(exception);
return nil;
}
}
+ (NSData *)throws_generateSharedSecretFromPublicKey:(NSData *)publicKey privateKey:(NSData *)privateKey
{
if (publicKey.length != ECCKeyLength) {
OWSRaiseException(
NSInvalidArgumentException, @"Public key has unexpected length: %lu", (unsigned long)publicKey.length);
}
if (privateKey.length != ECCKeyLength) {
OWSRaiseException(
NSInvalidArgumentException, @"Private key has unexpected length: %lu", (unsigned long)privateKey.length);
}
NSMutableData *sharedSecretData = [NSMutableData dataWithLength:32];
if (!sharedSecretData) {
OWSFail(@"Could not allocate buffer");
}
curve25519_donna(sharedSecretData.mutableBytes, privateKey.bytes, publicKey.bytes);
return [sharedSecretData copy];
}
@end
NS_ASSUME_NONNULL_END

0
Classes/Curve25519Kit.h Normal file
View File

28
Classes/ECKeyPair.swift Normal file
View File

@ -0,0 +1,28 @@
//
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import Foundation
import SignalCoreKit
public extension ECKeyPair {
// TODO: Rename to publicKey(), rename existing publicKey() method to publicKeyData().
func ecPublicKey() throws -> ECPublicKey {
guard publicKey.count == ECCKeyLength else {
throw OWSAssertionError("\(logTag) public key has invalid length")
}
// NOTE: we don't use ECPublicKey(serializedKeyData:) since the
// key data should not have a type byte.
return try ECPublicKey(keyData: publicKey)
}
// TODO: Rename to privateKey(), rename existing privateKey() method to privateKeyData().
func ecPrivateKey() throws -> ECPrivateKey {
guard privateKey.count == ECCKeyLength else {
throw OWSAssertionError("\(logTag) private key has invalid length")
}
return try ECPrivateKey(keyData: privateKey)
}
}

View File

@ -0,0 +1,35 @@
//
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import Foundation
import SignalCoreKit
// See:
// https://github.com/signalapp/libsignal-protocol-java/blob/87fae0f98332e98a32bbb82515428b4edeb4181f/java/src/main/java/org/whispersystems/libsignal/ecc/ECPrivateKey.java
@objc public class ECPrivateKey: NSObject {
@objc
public let keyData: Data
@objc
public init(keyData: Data) throws {
guard keyData.count == ECCKeyLength else {
throw OWSAssertionError("\(ECPrivateKey.logTag) key has invalid length")
}
self.keyData = keyData
}
open override func isEqual(_ object: Any?) -> Bool {
if let object = object as? ECPrivateKey {
return keyData == object.keyData
} else {
return false
}
}
public override var hash: Int {
return keyData.hashValue
}
}

64
Classes/ECPublicKey.swift Normal file
View File

@ -0,0 +1,64 @@
//
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
import Foundation
import SignalCoreKit
public enum ECKeyError: Error {
case assertionError(description: String)
}
// See:
// https://github.com/signalapp/libsignal-protocol-java/blob/87fae0f98332e98a32bbb82515428b4edeb4181f/java/src/main/java/org/whispersystems/libsignal/ecc/DjbECPublicKey.java
@objc public class ECPublicKey: NSObject {
@objc
public static let keyTypeDJB: UInt8 = 0x05
@objc
public let keyData: Data
@objc
public init(keyData: Data) throws {
guard keyData.count == ECCKeyLength else {
throw ECKeyError.assertionError(description: "\(ECPublicKey.logTag) key has invalid length")
}
self.keyData = keyData
}
// https://github.com/signalapp/libsignal-protocol-java/blob/master/java/src/main/java/org/whispersystems/libsignal/ecc/Curve.java#L30
@objc
public init(serializedKeyData: Data) throws {
let parser = OWSDataParser(data: serializedKeyData)
let typeByte = try parser.nextByte(name: "type byte")
guard typeByte == ECPublicKey.keyTypeDJB else {
throw ECKeyError.assertionError(description: "\(ECPublicKey.logTag) key data has invalid type byte")
}
let keyData = try parser.remainder(name: "key data")
guard keyData.count == ECCKeyLength else {
throw ECKeyError.assertionError(description: "\(ECPublicKey.logTag) key has invalid length")
}
self.keyData = keyData
}
@objc public var serialized: Data {
return Data([ECPublicKey.keyTypeDJB] + keyData)
}
open override func isEqual(_ object: Any?) -> Bool {
if let object = object as? ECPublicKey {
return keyData == object.keyData
} else {
return false
}
}
public override var hash: Int {
return keyData.hashValue
}
}

View File

@ -1,12 +1,11 @@
//
// Ed25519.h
//
// Created by Frederic Jacobs on 22/07/14.
// Copyright (c) 2014 Open Whisper Systems. All rights reserved.
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class ECKeyPair;
@interface Ed25519 : NSObject
@ -19,19 +18,43 @@
*
* @return The ed25519 64-bytes signature.
*/
+(NSData*)sign:(NSData*)data withKeyPair:(ECKeyPair*)keyPair;
+ (NSData *)throws_sign:(NSData *)data withKeyPair:(ECKeyPair *)keyPair NS_SWIFT_UNAVAILABLE("throws objc exceptions");
+ (nullable NSData *)sign:(NSData *)data withKeyPair:(ECKeyPair *)keyPair error:(NSError **)outError;
/**
* Verify ed25519 signature with 32-bytes Curve25519 key pair. Throws an NSInvalid
*
* @param signature ed25519 64-byte signature.
* @param pubKey public key of the signer.
* @param publicKey public key of the signer.
* @param data data to be checked against the signature.
*
* @return Returns TRUE if the signature is valid, false if it's not.
*/
+ (BOOL)throws_verifySignature:(NSData *)signature
publicKey:(NSData *)publicKey
data:(NSData *)data NS_SWIFT_UNAVAILABLE("throws objc exceptions");
+(BOOL)verifySignature:(NSData*)signature publicKey:(NSData*)pubKey data:(NSData*)data;
/**
* Verify ed25519 signature with 32-bytes Curve25519 key pair. Throws an NSInvalid
*
* @param signature ed25519 64-byte signature.
* @param publicKey public key of the signer.
* @param data data to be checked against the signature.
* @param didVerify whether or not the signature was verified.
*
* @return Returns YES if no error was encountered
* Returns NO if an error was encountered while verifying signature.
*
* NOTE: In line with convention's required for Swift interop, the return value does *not* indicate
* whether or not the signature was verified - check `didVerify` for that. The return value only
* indicates whether an error was encountered.
*/
+ (BOOL)verifySignature:(NSData *)signature
publicKey:(NSData *)publicKey
data:(NSData *)data
didVerify:(BOOL *)didVerify
error:(NSError **)outError NS_REFINED_FOR_SWIFT;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,50 +1,92 @@
//
// Ed25519.m
// BuildTests
//
// Created by Frederic Jacobs on 22/07/14.
// Copyright (c) 2014 Open Whisper Systems. All rights reserved.
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "Ed25519.h"
#import "Curve25519.h"
#import <SignalCoreKit/OWSAsserts.h>
#import <SignalCoreKit/SCKExceptionWrapper.h>
NS_ASSUME_NONNULL_BEGIN
extern int curve25519_verify(const unsigned char *signature, /* 64 bytes */
const unsigned char *curve25519_pubkey, /* 32 bytes */
const unsigned char *msg,
const unsigned long msg_len);
@interface ECKeyPair ()
-(NSData*) sign:(NSData*)data;
- (NSData *)throws_sign:(NSData *)data;
@end
extern int curve25519_verify(const unsigned char* signature, /* 64 bytes */
const unsigned char* curve25519_pubkey, /* 32 bytes */
const unsigned char* msg, const unsigned long msg_len);
#pragma mark -
@implementation Ed25519
+(NSData*)sign:(NSData*)data withKeyPair:(ECKeyPair*)keyPair{
if ([data length] < 1) {
@throw [NSException exceptionWithName:NSInvalidArgumentException reason:@"Data needs to be at least one byte" userInfo:nil];
+ (nullable NSData *)sign:(NSData *)data withKeyPair:(ECKeyPair *)keyPair error:(NSError **)outError
{
@try {
return [self throws_sign:data withKeyPair:keyPair];
} @catch (NSException *exception) {
*outError = SCKExceptionWrapperErrorMake(exception);
return nil;
}
return [keyPair sign:data];
}
+(BOOL)verifySignature:(NSData*)signature publicKey:(NSData*)pubKey data:(NSData*)data{
+ (NSData *)throws_sign:(NSData *)data withKeyPair:(ECKeyPair *)keyPair
{
if ([data length] < 1) {
@throw [NSException exceptionWithName:NSInvalidArgumentException reason:@"Data needs to be at least one byte" userInfo:nil];
OWSRaiseException(NSInvalidArgumentException, @"Data needs to be at least one byte");
}
if (!keyPair) {
OWSRaiseException(NSInvalidArgumentException, @"Missing key pair.");
}
return [keyPair throws_sign:data];
}
+ (BOOL)verifySignature:(NSData *)signature
publicKey:(NSData *)publicKey
data:(NSData *)data
didVerify:(BOOL *)didVerify
error:(NSError **)outError;
{
@try {
*didVerify = [self throws_verifySignature:signature publicKey:publicKey data:data];
// TODO this seems potentially unintuitive for the caller.
// Instead of returning YES, should we remove didVerify and return an error when verification fails? (but no
// exception was thrown)
return YES;
} @catch (NSException *exception) {
*outError = SCKExceptionWrapperErrorMake(exception);
return NO;
}
}
+ (BOOL)throws_verifySignature:(NSData *)signature publicKey:(NSData *)pubKey data:(NSData *)data
{
if ([data length] < 1) {
OWSRaiseException(NSInvalidArgumentException, @"Data needs to be at least one byte");
}
if ([data length] >= ULONG_MAX) {
OWSRaiseException(NSInvalidArgumentException, @"Data is too long.");
}
if ([pubKey length] != ECCKeyLength) {
@throw [NSException exceptionWithName:NSInvalidArgumentException reason:@"Public Key isn't 32 bytes" userInfo:nil];
OWSRaiseException(
NSInvalidArgumentException, @"Public Key has unexpected length: %lu", (unsigned long)pubKey.length);
}
if ([signature length] != ECCSignatureLength) {
@throw [NSException exceptionWithName:NSInvalidArgumentException reason:@"Signature isn't 64 bytes" userInfo:nil];
OWSRaiseException(
NSInvalidArgumentException, @"Signature has unexpected length: %lu", (unsigned long)signature.length);
}
BOOL success = (curve25519_verify([signature bytes], [pubKey bytes], [data bytes], [data length]) == 0);
return success;
}
@end
NS_ASSUME_NONNULL_END

14
Classes/Ed25519.swift Normal file
View File

@ -0,0 +1,14 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
import Foundation
public extension Ed25519 {
class func verifySignature(_ signature: Data, publicKey: Data, data: Data) throws -> Bool {
var didVerify: ObjCBool = false
try __verifySignature(signature, publicKey: publicKey, data: data, didVerify: &didVerify)
return didVerify.boolValue
}
}

View File

@ -1,24 +0,0 @@
//
// Randomness.h
// AxolotlKit
//
// Created by Frederic Jacobs on 21/07/14.
// Copyright (c) 2014 Frederic Jacobs. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface Randomness : NSObject
/**
* Generates a given number of cryptographically secure bytes using SecRandomCopyBytes.
*
* @param numberBytes The number of bytes to be generated.
*
* @return Random Bytes.
*/
+(NSData*) generateRandomBytes:(int)numberBytes;
@end

View File

@ -1,24 +0,0 @@
//
// Randomness.m
// AxolotlKit
//
// Created by Frederic Jacobs on 21/07/14.
// Copyright (c) 2014 Frederic Jacobs. All rights reserved.
//
#import "Randomness.h"
@implementation Randomness
+(NSData*) generateRandomBytes:(int)numberBytes {
/* used to generate db master key, and to generate signaling key, both at install */
NSMutableData* randomBytes = [NSMutableData dataWithLength:numberBytes];
int err = 0;
err = SecRandomCopyBytes(kSecRandomDefault,numberBytes,[randomBytes mutableBytes]);
if(err != noErr && [randomBytes length] != numberBytes) {
@throw [NSException exceptionWithName:@"random problem" reason:@"problem generating the random " userInfo:nil];
}
return [NSData dataWithData:randomBytes];
}
@end

View File

@ -11,13 +11,19 @@ Pod::Spec.new do |spec|
Curve25519 is a fast and secure curve used for key agreement. Unfortunately, it does not support signing out of the box. This pod translates the point curves to do ed25519 signing with curve25519 keys.
DESC
spec.source = { :git => 'https://github.com/WhisperSystems/Curve25519Kit.git', :tag => "#{spec.version}" }
spec.source_files = 'Classes/*.{h,m}', 'Sources/Curve25519/curve25519-donna.c', 'Sources/ed25519/*.{c,h}', 'Sources/ed25519/additions/*.{c,h}', 'Sources/ed25519/nacl_sha512/*.{c,h}', 'Sources/ed25519/nacl_includes/*.{c,h}'
spec.source = { :git => 'https://github.com/signalapp/Curve25519Kit.git', :tag => "#{spec.version}" }
spec.source_files = 'Classes/*.{h,m,swift}', 'Sources/Curve25519/curve25519-donna.c', 'Sources/ed25519/*.{c,h}', 'Sources/ed25519/additions/*.{c,h}', 'Sources/ed25519/nacl_sha512/*.{c,h}', 'Sources/ed25519/nacl_includes/*.{c,h}', 'Private/*.{h,m}'
spec.public_header_files = 'Classes/**/*.h'
#spec.private_header_files = 'Sources/ed25519/nacl_includes/*.h','Sources/ed25519/additions/*.h', 'Sources/ed25519/nacl_sha512/*.h'
spec.framework = 'Security'
spec.public_header_files = "Classes/*.h"
spec.requires_arc = true
spec.ios.deployment_target = "10.0"
spec.dependency 'CocoaLumberjack'
spec.dependency 'SignalCoreKit'
spec.test_spec 'Tests' do |test_spec|
test_spec.source_files = 'Tests/**/*.{h,m,swift}'
test_spec.source_files = 'BuildTests/BuildTestsTests/**/*.{h,m,swift}'
end
end

View File

@ -63,7 +63,7 @@ int curve25519_sign(unsigned char* signature_out,
signature_out[63] &= 0x7F; /* bit should be zero already, but just in case */
signature_out[63] |= sign_bit;
//free(sigbuf);
free(sigbuf);
return 0;
}