From b63bc8e9eba39bd9012dee057be7018602c0f9f8 Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Thu, 24 Sep 2020 15:16:21 +1000 Subject: [PATCH 01/11] Add Sodium & remove GCDWebServer --- Podfile | 4 ++-- Podfile.lock | 14 ++++++-------- Signal.xcodeproj/project.pbxproj | 4 ++-- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/Podfile b/Podfile index 120bf095d..f50ed68fb 100644 --- a/Podfile +++ b/Podfile @@ -74,10 +74,10 @@ target 'Signal' do # Loki third party pods ### - pod 'GCDWebServer', '~> 3.5.2', :inhibit_warnings => true # TODO: We can probably ditch this as we're not doing P2P anymore - pod 'FeedKit', '~> 8.1', :inhibit_warnings => true pod 'CryptoSwift', '~> 1.3', :inhibit_warnings => true + pod 'FeedKit', '~> 8.1', :inhibit_warnings => true pod 'NVActivityIndicatorView', '~> 4.7', :inhibit_warnings => true + pod 'Sodium', '~> 0.8.0', :inhibit_warnings => true target 'SignalTests' do inherit! :search_paths diff --git a/Podfile.lock b/Podfile.lock index 180975b94..734cba68e 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -19,9 +19,6 @@ PODS: - CocoaLumberjack/Core (3.6.2) - CryptoSwift (1.3.1) - FeedKit (8.1.1) - - GCDWebServer (3.5.4): - - GCDWebServer/Core (= 3.5.4) - - GCDWebServer/Core (3.5.4) - GRKOpenSSLFramework (1.0.2.12) - libPhoneNumber-iOS (0.9.15) - Mantle (2.1.0): @@ -122,6 +119,7 @@ PODS: - Starscream - SwiftProtobuf (~> 1.5.0) - YapDatabase/SQLCipher + - Sodium (0.8.0) - SQLCipher (4.4.0): - SQLCipher/standard (= 4.4.0) - SQLCipher/common (4.4.0) @@ -203,7 +201,6 @@ DEPENDENCIES: - AFNetworking (~> 3.2.1) - CryptoSwift (~> 1.3) - FeedKit (~> 8.1) - - GCDWebServer (~> 3.5.2) - GRKOpenSSLFramework (from `https://github.com/signalapp/GRKOpenSSLFramework`) - Mantle (from `https://github.com/signalapp/Mantle`, branch `signal-master`) - NVActivityIndicatorView (~> 4.7) @@ -222,6 +219,7 @@ DEPENDENCIES: - SessionMetadataKit/Tests (from `https://github.com/loki-project/session-ios-metadata-kit`) - SessionServiceKit (from `.`) - SessionServiceKit/Tests (from `.`) + - Sodium (~> 0.8.0) - SQLCipher (>= 4.0.1) - SSZipArchive - Starscream (from `https://github.com/signalapp/Starscream.git`, branch `signal-release`) @@ -235,13 +233,13 @@ SPEC REPOS: - CocoaLumberjack - CryptoSwift - FeedKit - - GCDWebServer - libPhoneNumber-iOS - NVActivityIndicatorView - PromiseKit - PureLayout - Reachability - SAMKeychain + - Sodium - SQLCipher - SSZipArchive - SwiftProtobuf @@ -308,7 +306,6 @@ SPEC CHECKSUMS: CocoaLumberjack: bd155f2dd06c0e0b03f876f7a3ee55693122ec94 CryptoSwift: f12f037f6d0fcd6d48c96db0071b653de64e6c4d FeedKit: 3418eed25f0b493b205b4de1b8511ac21d413fa9 - GCDWebServer: 2c156a56c8226e2d5c0c3f208a3621ccffbe3ce4 GRKOpenSSLFramework: 8a3735ad41e7dc1daff460467bccd32ca5d6ae3e libPhoneNumber-iOS: 0a32a9525cf8744fe02c5206eb30d571e38f7d75 Mantle: 2fa750afa478cd625a94230fbf1c13462f29395b @@ -323,6 +320,7 @@ SPEC CHECKSUMS: SessionHKDFKit: b0f4e669411703ab925aba07491c5611564d1419 SessionMetadataKit: d37afdc47d20c7046faa139a92e68fa99f76c95b SessionServiceKit: b12afb3975b33a9579802111f948838861d914bb + Sodium: 63c0ca312a932e6da481689537d4b35568841bdc SQLCipher: e434ed542b24f38ea7b36468a13f9765e1b5c072 SSZipArchive: 62d4947b08730e4cda640473b0066d209ff033c9 Starscream: 8aaf1a7feb805c816d0e7d3190ef23856f6665b9 @@ -331,6 +329,6 @@ SPEC CHECKSUMS: YYImage: 1e1b62a9997399593e4b9c4ecfbbabbf1d3f3b54 ZXingObjC: fdbb269f25dd2032da343e06f10224d62f537bdb -PODFILE CHECKSUM: c26d913ac0e7de8c047412658746634a46681fed +PODFILE CHECKSUM: 128e2d9df0c3e7862c266dd4be1d512a8d88ef65 -COCOAPODS: 1.9.3 +COCOAPODS: 1.10.0.rc.1 diff --git a/Signal.xcodeproj/project.pbxproj b/Signal.xcodeproj/project.pbxproj index cb0937f75..900499eae 100644 --- a/Signal.xcodeproj/project.pbxproj +++ b/Signal.xcodeproj/project.pbxproj @@ -3423,7 +3423,6 @@ "${BUILT_PRODUCTS_DIR}/CocoaLumberjack/CocoaLumberjack.framework", "${BUILT_PRODUCTS_DIR}/CryptoSwift/CryptoSwift.framework", "${BUILT_PRODUCTS_DIR}/FeedKit/FeedKit.framework", - "${BUILT_PRODUCTS_DIR}/GCDWebServer/GCDWebServer.framework", "${PODS_ROOT}/GRKOpenSSLFramework/OpenSSL-iOS/bin/openssl.framework", "${BUILT_PRODUCTS_DIR}/Mantle/Mantle.framework", "${BUILT_PRODUCTS_DIR}/NVActivityIndicatorView/NVActivityIndicatorView.framework", @@ -3439,6 +3438,7 @@ "${BUILT_PRODUCTS_DIR}/SessionHKDFKit/SessionHKDFKit.framework", "${BUILT_PRODUCTS_DIR}/SessionMetadataKit/SessionMetadataKit.framework", "${BUILT_PRODUCTS_DIR}/SessionServiceKit/SessionServiceKit.framework", + "${BUILT_PRODUCTS_DIR}/Sodium/Sodium.framework", "${BUILT_PRODUCTS_DIR}/Starscream/Starscream.framework", "${BUILT_PRODUCTS_DIR}/SwiftProtobuf/SwiftProtobuf.framework", "${BUILT_PRODUCTS_DIR}/YYImage/YYImage.framework", @@ -3452,7 +3452,6 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CocoaLumberjack.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CryptoSwift.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FeedKit.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GCDWebServer.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/openssl.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Mantle.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/NVActivityIndicatorView.framework", @@ -3468,6 +3467,7 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SessionHKDFKit.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SessionMetadataKit.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SessionServiceKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Sodium.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Starscream.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftProtobuf.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YYImage.framework", From ca87b79fd86a076028530f480bbb6cfb0852825c Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Thu, 24 Sep 2020 15:16:44 +1000 Subject: [PATCH 02/11] Update Pods --- Pods | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pods b/Pods index 91063358f..f818a61c0 160000 --- a/Pods +++ b/Pods @@ -1 +1 @@ -Subproject commit 91063358ff177892d4809803a226e04db350d9ae +Subproject commit f818a61c04eeb78662dc4626014575bff9eb879b From 6430c3630723c27ef0b5554f387251aa45a2423e Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Thu, 24 Sep 2020 11:36:57 +1000 Subject: [PATCH 03/11] Clean --- Signal/src/Loki/View Controllers/HomeVC.swift | 26 ------------------- .../OpenGroupSuggestionSheet.swift | 5 ---- .../src/Loki/View Controllers/PNModeVC.swift | 2 -- .../src/Loki/Utilities/LKUserDefaults.swift | 5 +--- 4 files changed, 1 insertion(+), 37 deletions(-) diff --git a/Signal/src/Loki/View Controllers/HomeVC.swift b/Signal/src/Loki/View Controllers/HomeVC.swift index c12cf8891..3a742ab48 100644 --- a/Signal/src/Loki/View Controllers/HomeVC.swift +++ b/Signal/src/Loki/View Controllers/HomeVC.swift @@ -158,39 +158,13 @@ final class HomeVC : BaseVC, UITableViewDataSource, UITableViewDelegate, UIScrol DispatchQueue.global(qos: .utility).async { let _ = IP2Country.shared.populateCacheIfNeeded() } - // Preload device links to make message sending quicker - var publicKeys: Set = [] - let storage = OWSPrimaryStorage.shared() - storage.dbReadConnection.read { transaction in - TSContactThread.enumerateCollectionObjects(with: transaction) { object, _ in - guard let thread = object as? TSContactThread, thread.shouldThreadBeVisible else { return } - let publicKey = thread.contactIdentifier() - guard UserDisplayNameUtilities.getPrivateChatDisplayName(for: publicKey) != nil, - storage.getMasterHexEncodedPublicKey(for: publicKey, in: transaction) == nil else { return } - publicKeys.insert(publicKey) - } - } - let _ = FileServerAPI.getDeviceLinks(associatedWith: publicKeys) // Do initial update reload() - // Clear all data if this is a secondary device - if UserDefaults.standard[.masterHexEncodedPublicKey] != nil { - UserDefaults.standard[.wasUnlinked] = true - NotificationCenter.default.post(name: .dataNukeRequested, object: nil, userInfo: nil) - } } override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) isViewVisible = true - let hasSeenLightModeSheet = UserDefaults.standard[.hasSeenLightModeSheet] - if !hasSeenLightModeSheet { - let lightModeSheet = LightModeSheet() - lightModeSheet.modalPresentationStyle = .overFullScreen - lightModeSheet.modalTransitionStyle = .crossDissolve - present(lightModeSheet, animated: true, completion: nil) - UserDefaults.standard[.hasSeenLightModeSheet] = true - } UserDefaults.standard[.hasLaunchedOnce] = true } diff --git a/Signal/src/Loki/View Controllers/OpenGroupSuggestionSheet.swift b/Signal/src/Loki/View Controllers/OpenGroupSuggestionSheet.swift index 23f7cc5c4..bdb4d1448 100644 --- a/Signal/src/Loki/View Controllers/OpenGroupSuggestionSheet.swift +++ b/Signal/src/Loki/View Controllers/OpenGroupSuggestionSheet.swift @@ -69,9 +69,4 @@ final class OpenGroupSuggestionSheet : Sheet { } close() } - - override func close() { - UserDefaults.standard[.hasSeenOpenGroupSuggestionSheet] = true - super.close() - } } diff --git a/Signal/src/Loki/View Controllers/PNModeVC.swift b/Signal/src/Loki/View Controllers/PNModeVC.swift index 23c8b9f2f..1a84e3b09 100644 --- a/Signal/src/Loki/View Controllers/PNModeVC.swift +++ b/Signal/src/Loki/View Controllers/PNModeVC.swift @@ -89,8 +89,6 @@ final class PNModeVC : BaseVC, OptionViewDelegate { return present(alert, animated: true, completion: nil) } UserDefaults.standard[.isUsingFullAPNs] = (selectedOptionView == apnsOptionView) - UserDefaults.standard[.hasSeenMultiDeviceRemovalSheet] = true - UserDefaults.standard[.hasSeenLightModeSheet] = true TSAccountManager.sharedInstance().didRegister() let homeVC = HomeVC() navigationController!.setViewControllers([ homeVC ], animated: true) diff --git a/SignalServiceKit/src/Loki/Utilities/LKUserDefaults.swift b/SignalServiceKit/src/Loki/Utilities/LKUserDefaults.swift index 530a04a4e..0ce6bea81 100644 --- a/SignalServiceKit/src/Loki/Utilities/LKUserDefaults.swift +++ b/SignalServiceKit/src/Loki/Utilities/LKUserDefaults.swift @@ -5,13 +5,10 @@ public enum LKUserDefaults { public enum Bool : Swift.String { case hasLaunchedOnce case hasSeenGIFMetadataWarning - case hasSeenLightModeSheet - case hasSeenMultiDeviceRemovalSheet - case hasSeenOpenGroupSuggestionSheet case hasViewedSeed + case isUsingFullAPNs /// Whether the device was unlinked as a slave device (used to notify the user on the landing screen). case wasUnlinked - case isUsingFullAPNs } public enum Date : Swift.String { From 6669f6a9d13babb3935c18bc8749bdcac9fd2c3c Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Thu, 24 Sep 2020 17:47:30 +1000 Subject: [PATCH 04/11] Add X25519 conversion to Sodium --- Signal.xcodeproj/project.pbxproj | 4 ++ .../Loki/Utilities/Sodium+Conversion.swift | 41 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 Signal/src/Loki/Utilities/Sodium+Conversion.swift diff --git a/Signal.xcodeproj/project.pbxproj b/Signal.xcodeproj/project.pbxproj index 900499eae..c69446111 100644 --- a/Signal.xcodeproj/project.pbxproj +++ b/Signal.xcodeproj/project.pbxproj @@ -596,6 +596,7 @@ C3DAB3242480CB2B00725F25 /* SRCopyableLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3DAB3232480CB2A00725F25 /* SRCopyableLabel.swift */; }; C3DFFAC623E96F0D0058DAF8 /* Sheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3DFFAC523E96F0D0058DAF8 /* Sheet.swift */; }; C3DFFAC823E970080058DAF8 /* OpenGroupSuggestionSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3DFFAC723E970080058DAF8 /* OpenGroupSuggestionSheet.swift */; }; + C3E7134F251C867C009649BB /* Sodium+Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3E7134E251C867C009649BB /* Sodium+Conversion.swift */; }; CC875800737563D6891B741D /* Pods_SignalTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 748A5CAEDD7C919FC64C6807 /* Pods_SignalTests.framework */; }; D202868116DBE0E7009068E9 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2AEACDB16C426DA00C364C0 /* CFNetwork.framework */; }; D202868216DBE0F4009068E9 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2179CFD16BB0B480006F3AB /* SystemConfiguration.framework */; }; @@ -1394,6 +1395,7 @@ C3DAB3232480CB2A00725F25 /* SRCopyableLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SRCopyableLabel.swift; sourceTree = ""; }; C3DFFAC523E96F0D0058DAF8 /* Sheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Sheet.swift; sourceTree = ""; }; C3DFFAC723E970080058DAF8 /* OpenGroupSuggestionSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenGroupSuggestionSheet.swift; sourceTree = ""; }; + C3E7134E251C867C009649BB /* Sodium+Conversion.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Sodium+Conversion.swift"; sourceTree = ""; }; D17BB5C25D615AB49813100C /* Pods_Signal.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Signal.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D2179CFB16BB0B3A0006F3AB /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; }; D2179CFD16BB0B480006F3AB /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; @@ -2691,6 +2693,7 @@ C35E8AAD2485E51D00ACB629 /* IP2Country.swift */, B84664F4235022F30083A1CD /* MentionUtilities.swift */, B886B4A82398BA1500211ABE /* QRCode.swift */, + C3E7134E251C867C009649BB /* Sodium+Conversion.swift */, B8783E9D23EB948D00404FB8 /* UILabel+Interaction.swift */, B83F2B87240CB75A000A54AB /* UIImage+Scaling.swift */, C31A6C59247F214E001123EF /* UIView+Glow.swift */, @@ -3961,6 +3964,7 @@ 34D1F0831F8678AA0066283D /* ConversationInputTextView.m in Sources */, 340FC8B6204DAC8D007AEB0F /* OWSQRCodeScanningViewController.m in Sources */, 4CB5F26920F7D060004D1B42 /* MessageActions.swift in Sources */, + C3E7134F251C867C009649BB /* Sodium+Conversion.swift in Sources */, 340FC8B5204DAC8D007AEB0F /* AboutTableViewController.m in Sources */, 34BECE2B1F74C12700D7438D /* DebugUIStress.m in Sources */, 340FC8B9204DAC8D007AEB0F /* UpdateGroupViewController.m in Sources */, diff --git a/Signal/src/Loki/Utilities/Sodium+Conversion.swift b/Signal/src/Loki/Utilities/Sodium+Conversion.swift new file mode 100644 index 000000000..c522bdf92 --- /dev/null +++ b/Signal/src/Loki/Utilities/Sodium+Conversion.swift @@ -0,0 +1,41 @@ +import Clibsodium +import Sodium + +extension Sign { + + /** + Converts an Ed25519 public key to an X25519 public key. + - Parameter ed25519PublicKey: The Ed25519 public key to convert. + - Returns: The X25519 public key if conversion is successful. + */ + public func toX25519(ed25519PublicKey: PublicKey) -> PublicKey? { + var x25519PublicKey = PublicKey(repeating: 0, count: 32) + + // FIXME: It'd be nice to check the exit code here, but all the properties of the object + // returned by the call below are internal. + let _ = crypto_sign_ed25519_pk_to_curve25519 ( + &x25519PublicKey, + ed25519PublicKey + ) + + return x25519PublicKey + } + + /** + Converts an Ed25519 secret key to an X25519 secret key. + - Parameter ed25519SecretKey: The Ed25519 secret key to convert. + - Returns: The X25519 secret key if conversion is successful. + */ + public func toX25519(ed25519SecretKey: SecretKey) -> SecretKey? { + var x25519SecretKey = SecretKey(repeating: 0, count: 32) + + // FIXME: It'd be nice to check the exit code here, but all the properties of the object + // returned by the call below are internal. + let _ = crypto_sign_ed25519_sk_to_curve25519 ( + &x25519SecretKey, + ed25519SecretKey + ) + + return x25519SecretKey + } +} From 8640c65b7c63f900bab4a4e4e0ac68778907bad6 Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Thu, 24 Sep 2020 17:58:42 +1000 Subject: [PATCH 05/11] Use new build system --- Signal.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings | 2 -- 1 file changed, 2 deletions(-) diff --git a/Signal.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Signal.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings index 6b30c7459..f9b0d7c5e 100644 --- a/Signal.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ b/Signal.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -2,8 +2,6 @@ - BuildSystemType - Original PreviewsEnabled From b7ba74a3c4ee473d32cd8c69270d1b775cf38e03 Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Thu, 24 Sep 2020 18:04:36 +1000 Subject: [PATCH 06/11] Switch key pair generation mechanism --- Signal/src/Loki/View Controllers/RegisterVC.swift | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Signal/src/Loki/View Controllers/RegisterVC.swift b/Signal/src/Loki/View Controllers/RegisterVC.swift index 7af8d2f9f..83765a8e4 100644 --- a/Signal/src/Loki/View Controllers/RegisterVC.swift +++ b/Signal/src/Loki/View Controllers/RegisterVC.swift @@ -1,3 +1,4 @@ +import Sodium final class RegisterVC : BaseVC { private var seed: Data! { didSet { updateKeyPair() } } @@ -129,11 +130,15 @@ final class RegisterVC : BaseVC { // MARK: Updating private func updateSeed() { - seed = Randomness.generateRandomBytes(16) + seed = Data.getSecureRandomData(ofSize: 16)! } private func updateKeyPair() { - keyPair = Curve25519.generateKeyPair(fromSeed: seed + seed) + let padding = Data(repeating: 0, count: 16) + let ed25519KeyPair = Sodium().sign.keyPair(seed: (seed + padding).bytes)! + let x25519PublicKey = Sodium().sign.toX25519(ed25519PublicKey: ed25519KeyPair.publicKey)! + let x25519SecretKey = Sodium().sign.toX25519(ed25519SecretKey: ed25519KeyPair.secretKey)! + keyPair = ECKeyPair(publicKey: Data(x25519PublicKey), privateKey: Data(x25519SecretKey)) } private func updatePublicKeyLabel() { From 7b03f23fc8fbb785b3a344e3a177c21d11b44934 Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Fri, 25 Sep 2020 09:15:04 +1000 Subject: [PATCH 07/11] Update version number --- Signal.xcodeproj/project.pbxproj | 32 ++++++++++++++++---------------- Signal/Signal-Info.plist | 4 ++-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Signal.xcodeproj/project.pbxproj b/Signal.xcodeproj/project.pbxproj index c69446111..5a5939605 100644 --- a/Signal.xcodeproj/project.pbxproj +++ b/Signal.xcodeproj/project.pbxproj @@ -4127,7 +4127,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 115; + CURRENT_PROJECT_VERSION = 116; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = SUQ8J2PCT7; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; @@ -4141,7 +4141,7 @@ INFOPLIST_FILE = SignalShareExtension/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 1.5.3; + MARKETING_VERSION = 1.6.0; MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_BUNDLE_IDENTIFIER = "com.loki-project.loki-messenger.share-extension"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -4189,7 +4189,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 115; + CURRENT_PROJECT_VERSION = 116; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = SUQ8J2PCT7; ENABLE_NS_ASSERTIONS = NO; @@ -4208,7 +4208,7 @@ INFOPLIST_FILE = SignalShareExtension/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 1.5.3; + MARKETING_VERSION = 1.6.0; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = "com.loki-project.loki-messenger.share-extension"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -4243,7 +4243,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 115; + CURRENT_PROJECT_VERSION = 116; DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = SUQ8J2PCT7; @@ -4262,7 +4262,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MARKETING_VERSION = 1.5.3; + MARKETING_VERSION = 1.6.0; MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_BUNDLE_IDENTIFIER = "com.loki-project.loki-messenger.utilities"; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; @@ -4313,7 +4313,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 115; + CURRENT_PROJECT_VERSION = 116; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = SUQ8J2PCT7; @@ -4337,7 +4337,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MARKETING_VERSION = 1.5.3; + MARKETING_VERSION = 1.6.0; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = "com.loki-project.loki-messenger.utilities"; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; @@ -4375,7 +4375,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 115; + CURRENT_PROJECT_VERSION = 116; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = SUQ8J2PCT7; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; @@ -4387,7 +4387,7 @@ INFOPLIST_FILE = LokiPushNotificationService/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 1.5.3; + MARKETING_VERSION = 1.6.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = "com.loki-project.loki-messenger.push-notification-service"; @@ -4438,7 +4438,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 115; + CURRENT_PROJECT_VERSION = 116; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = SUQ8J2PCT7; ENABLE_NS_ASSERTIONS = NO; @@ -4455,7 +4455,7 @@ INFOPLIST_FILE = LokiPushNotificationService/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 1.5.3; + MARKETING_VERSION = 1.6.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = "com.loki-project.loki-messenger.push-notification-service"; @@ -4639,7 +4639,7 @@ CODE_SIGN_ENTITLEMENTS = Signal/Signal.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 115; + CURRENT_PROJECT_VERSION = 116; DEVELOPMENT_TEAM = SUQ8J2PCT7; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -4674,7 +4674,7 @@ "$(SRCROOT)", ); LLVM_LTO = NO; - MARKETING_VERSION = 1.5.3; + MARKETING_VERSION = 1.6.0; OTHER_LDFLAGS = "$(inherited)"; OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\""; PRODUCT_BUNDLE_IDENTIFIER = "com.loki-project.loki-messenger"; @@ -4706,7 +4706,7 @@ CODE_SIGN_ENTITLEMENTS = Signal/Signal.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 115; + CURRENT_PROJECT_VERSION = 116; DEVELOPMENT_TEAM = SUQ8J2PCT7; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -4741,7 +4741,7 @@ "$(SRCROOT)", ); LLVM_LTO = NO; - MARKETING_VERSION = 1.5.3; + MARKETING_VERSION = 1.6.0; OTHER_LDFLAGS = "$(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = "com.loki-project.loki-messenger"; PRODUCT_NAME = Session; diff --git a/Signal/Signal-Info.plist b/Signal/Signal-Info.plist index b91d44ca3..f77e55a0b 100644 --- a/Signal/Signal-Info.plist +++ b/Signal/Signal-Info.plist @@ -5,9 +5,9 @@ BuildDetails CarthageVersion - 0.34.0 + 0.36.0 OSXVersion - 10.15.5 + 10.15.6 WebRTCCommit 1445d719bf05280270e9f77576f80f973fd847f8 M73 From 829ee5d2671b3477d4e166f9b924822e7de432ba Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Fri, 25 Sep 2020 11:06:48 +1000 Subject: [PATCH 08/11] Add TODOs --- .../src/Loki/API/Open Groups/PublicChatMessage.swift | 1 + .../Protocol/Shelved/Multi Device/DeviceLinkingUtilities.swift | 2 ++ .../Storage/AxolotlStore/OWSPrimaryStorage+SignedPreKeyStore.m | 1 + 3 files changed, 4 insertions(+) diff --git a/SignalServiceKit/src/Loki/API/Open Groups/PublicChatMessage.swift b/SignalServiceKit/src/Loki/API/Open Groups/PublicChatMessage.swift index 9c15c618f..43c935a4d 100644 --- a/SignalServiceKit/src/Loki/API/Open Groups/PublicChatMessage.swift +++ b/SignalServiceKit/src/Loki/API/Open Groups/PublicChatMessage.swift @@ -113,6 +113,7 @@ public final class PublicChatMessage : NSObject { return nil } let userKeyPair = OWSIdentityManager.shared().identityKeyPair()! + // TODO: Sign using the ED25519 private key here guard let signatureData = try? Ed25519.sign(data, with: userKeyPair) else { print("[Loki] Failed to sign public chat message.") return nil diff --git a/SignalServiceKit/src/Loki/Protocol/Shelved/Multi Device/DeviceLinkingUtilities.swift b/SignalServiceKit/src/Loki/Protocol/Shelved/Multi Device/DeviceLinkingUtilities.swift index 8893a1106..e8b336657 100644 --- a/SignalServiceKit/src/Loki/Protocol/Shelved/Multi Device/DeviceLinkingUtilities.swift +++ b/SignalServiceKit/src/Loki/Protocol/Shelved/Multi Device/DeviceLinkingUtilities.swift @@ -22,6 +22,7 @@ public final class DeviceLinkingUtilities : NSObject { let slavePublicKey = slaveKeyPair.hexEncodedPublicKey var kind = UInt8(LKDeviceLinkMessageKind.request.rawValue) let data = Data(hex: masterPublicKey) + Data(bytes: &kind, count: MemoryLayout.size(ofValue: kind)) + // TODO: Sign using the ED25519 private key here let slaveSignature = try! Ed25519.sign(data, with: slaveKeyPair) let thread = TSContactThread.getOrCreateThread(contactId: masterPublicKey) return DeviceLinkMessage(in: thread, masterPublicKey: masterPublicKey, slavePublicKey: slavePublicKey, masterSignature: nil, slaveSignature: slaveSignature) @@ -33,6 +34,7 @@ public final class DeviceLinkingUtilities : NSObject { let slavePublicKey = deviceLink.slave.publicKey var kind = UInt8(LKDeviceLinkMessageKind.authorization.rawValue) let data = Data(hex: slavePublicKey) + Data(bytes: &kind, count: MemoryLayout.size(ofValue: kind)) + // TODO: Sign using the ED25519 private key here let masterSignature = try! Ed25519.sign(data, with: masterKeyPair) let slaveSignature = deviceLink.slave.signature! let thread = TSContactThread.getOrCreateThread(contactId: slavePublicKey) diff --git a/SignalServiceKit/src/Storage/AxolotlStore/OWSPrimaryStorage+SignedPreKeyStore.m b/SignalServiceKit/src/Storage/AxolotlStore/OWSPrimaryStorage+SignedPreKeyStore.m index 413ddfe67..10a86ab47 100644 --- a/SignalServiceKit/src/Storage/AxolotlStore/OWSPrimaryStorage+SignedPreKeyStore.m +++ b/SignalServiceKit/src/Storage/AxolotlStore/OWSPrimaryStorage+SignedPreKeyStore.m @@ -32,6 +32,7 @@ NSString *const OWSPrimaryStorageKeyPrekeyCurrentSignedPrekeyId = @"currentSigne OWSAssert(identityKeyPair); @try { + // TODO: Sign using the ED25519 private key here NSData *signature = [Ed25519 throws_sign:keyPair.publicKey.prependKeyType withKeyPair:identityKeyPair]; return [[SignedPreKeyRecord alloc] initWithId:preKeyId keyPair:keyPair From 9d41abed444ac7befd602a6e3d219a407919d7ab Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Fri, 25 Sep 2020 11:57:54 +1000 Subject: [PATCH 09/11] Store the ED25519 key pair --- .../Loki/View Controllers/RegisterVC.swift | 23 +++++++++++-------- .../src/Messages/OWSIdentityManager.h | 5 ++++ .../src/Messages/OWSIdentityManager.m | 4 +++- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/Signal/src/Loki/View Controllers/RegisterVC.swift b/Signal/src/Loki/View Controllers/RegisterVC.swift index 83765a8e4..5823950a1 100644 --- a/Signal/src/Loki/View Controllers/RegisterVC.swift +++ b/Signal/src/Loki/View Controllers/RegisterVC.swift @@ -2,7 +2,8 @@ import Sodium final class RegisterVC : BaseVC { private var seed: Data! { didSet { updateKeyPair() } } - private var keyPair: ECKeyPair! { didSet { updatePublicKeyLabel() } } + private var ed25519KeyPair: Sign.KeyPair! + private var x25519KeyPair: ECKeyPair! { didSet { updatePublicKeyLabel() } } // MARK: Components private lazy var publicKeyLabel: UILabel = { @@ -135,14 +136,14 @@ final class RegisterVC : BaseVC { private func updateKeyPair() { let padding = Data(repeating: 0, count: 16) - let ed25519KeyPair = Sodium().sign.keyPair(seed: (seed + padding).bytes)! + ed25519KeyPair = Sodium().sign.keyPair(seed: (seed + padding).bytes)! let x25519PublicKey = Sodium().sign.toX25519(ed25519PublicKey: ed25519KeyPair.publicKey)! let x25519SecretKey = Sodium().sign.toX25519(ed25519SecretKey: ed25519KeyPair.secretKey)! - keyPair = ECKeyPair(publicKey: Data(x25519PublicKey), privateKey: Data(x25519SecretKey)) + x25519KeyPair = ECKeyPair(publicKey: Data(x25519PublicKey), privateKey: Data(x25519SecretKey)) } private func updatePublicKeyLabel() { - let hexEncodedPublicKey = keyPair.hexEncodedPublicKey + let hexEncodedPublicKey = x25519KeyPair.hexEncodedPublicKey let characterCount = hexEncodedPublicKey.count var count = 0 let limit = 32 @@ -170,11 +171,13 @@ final class RegisterVC : BaseVC { // MARK: Interaction @objc private func register() { - let identityManager = OWSIdentityManager.shared() - let databaseConnection = identityManager.value(forKey: "dbConnection") as! YapDatabaseConnection - databaseConnection.setObject(seed.toHexString(), forKey: "LKLokiSeed", inCollection: OWSPrimaryStorageIdentityKeyStoreCollection) - databaseConnection.setObject(keyPair!, forKey: OWSPrimaryStorageIdentityKeyStoreIdentityKey, inCollection: OWSPrimaryStorageIdentityKeyStoreCollection) - TSAccountManager.sharedInstance().phoneNumberAwaitingVerification = keyPair!.hexEncodedPublicKey + let dbConnection = OWSIdentityManager.shared().dbConnection + let collection = OWSPrimaryStorageIdentityKeyStoreCollection + dbConnection.setObject(seed.toHexString(), forKey: LKSeedKey, inCollection: collection) + dbConnection.setObject(ed25519KeyPair.secretKey.toHexString(), forKey: LKED25519SecretKey, inCollection: collection) + dbConnection.setObject(ed25519KeyPair.publicKey.toHexString(), forKey: LKED25519PublicKey, inCollection: collection) + dbConnection.setObject(x25519KeyPair!, forKey: OWSPrimaryStorageIdentityKeyStoreIdentityKey, inCollection: collection) + TSAccountManager.sharedInstance().phoneNumberAwaitingVerification = x25519KeyPair!.hexEncodedPublicKey OWSPrimaryStorage.shared().setRestorationTime(0) UserDefaults.standard[.hasViewedSeed] = false let displayNameVC = DisplayNameVC() @@ -182,7 +185,7 @@ final class RegisterVC : BaseVC { } @objc private func copyPublicKey() { - UIPasteboard.general.string = keyPair.hexEncodedPublicKey + UIPasteboard.general.string = x25519KeyPair.hexEncodedPublicKey copyPublicKeyButton.isUserInteractionEnabled = false UIView.transition(with: copyPublicKeyButton, duration: 0.25, options: .transitionCrossDissolve, animations: { self.copyPublicKeyButton.setTitle("Copied", for: UIControl.State.normal) diff --git a/SignalServiceKit/src/Messages/OWSIdentityManager.h b/SignalServiceKit/src/Messages/OWSIdentityManager.h index 4eb13b210..2c4631c4c 100644 --- a/SignalServiceKit/src/Messages/OWSIdentityManager.h +++ b/SignalServiceKit/src/Messages/OWSIdentityManager.h @@ -8,6 +8,9 @@ NS_ASSUME_NONNULL_BEGIN extern NSString *const OWSPrimaryStorageIdentityKeyStoreIdentityKey; +extern NSString *const LKSeedKey; +extern NSString *const LKED25519SecretKey; +extern NSString *const LKED25519PublicKey; extern NSString *const OWSPrimaryStorageIdentityKeyStoreCollection; extern NSString *const OWSPrimaryStorageTrustedKeysCollection; @@ -31,6 +34,8 @@ extern const NSUInteger kStoredIdentityKeyLength; // This class can be safely accessed and used from any thread. @interface OWSIdentityManager : NSObject +@property (nonatomic, readonly) YapDatabaseConnection *dbConnection; + - (instancetype)init NS_UNAVAILABLE; - (instancetype)initWithPrimaryStorage:(OWSPrimaryStorage *)primaryStorage NS_DESIGNATED_INITIALIZER; diff --git a/SignalServiceKit/src/Messages/OWSIdentityManager.m b/SignalServiceKit/src/Messages/OWSIdentityManager.m index 910f8c874..463ae79a9 100644 --- a/SignalServiceKit/src/Messages/OWSIdentityManager.m +++ b/SignalServiceKit/src/Messages/OWSIdentityManager.m @@ -33,6 +33,9 @@ NS_ASSUME_NONNULL_BEGIN // Storing our own identity key NSString *const OWSPrimaryStorageIdentityKeyStoreIdentityKey = @"TSStorageManagerIdentityKeyStoreIdentityKey"; +NSString *const LKSeedKey = @"LKLokiSeed"; +NSString *const LKED25519SecretKey = @"LKED25519SecretKey"; +NSString *const LKED25519PublicKey = @"LKED25519PublicKey"; NSString *const OWSPrimaryStorageIdentityKeyStoreCollection = @"TSStorageManagerIdentityKeyStoreCollection"; // Storing recipients identity keys @@ -57,7 +60,6 @@ NSString *const kNSNotificationName_IdentityStateDidChange = @"kNSNotificationNa @interface OWSIdentityManager () @property (nonatomic, readonly) OWSPrimaryStorage *primaryStorage; -@property (nonatomic, readonly) YapDatabaseConnection *dbConnection; @end From 24725d907bd6787850544098827c455fb3975651 Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Fri, 25 Sep 2020 12:13:22 +1000 Subject: [PATCH 10/11] Remove TODOs --- .../src/Loki/API/Open Groups/PublicChatMessage.swift | 1 - .../Shelved/Multi Device/DeviceLinkingUtilities.swift | 2 -- SignalServiceKit/src/Messages/OWSIdentityManager.h | 4 ++-- .../AxolotlStore/OWSPrimaryStorage+SignedPreKeyStore.m | 1 - 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/SignalServiceKit/src/Loki/API/Open Groups/PublicChatMessage.swift b/SignalServiceKit/src/Loki/API/Open Groups/PublicChatMessage.swift index 43c935a4d..9c15c618f 100644 --- a/SignalServiceKit/src/Loki/API/Open Groups/PublicChatMessage.swift +++ b/SignalServiceKit/src/Loki/API/Open Groups/PublicChatMessage.swift @@ -113,7 +113,6 @@ public final class PublicChatMessage : NSObject { return nil } let userKeyPair = OWSIdentityManager.shared().identityKeyPair()! - // TODO: Sign using the ED25519 private key here guard let signatureData = try? Ed25519.sign(data, with: userKeyPair) else { print("[Loki] Failed to sign public chat message.") return nil diff --git a/SignalServiceKit/src/Loki/Protocol/Shelved/Multi Device/DeviceLinkingUtilities.swift b/SignalServiceKit/src/Loki/Protocol/Shelved/Multi Device/DeviceLinkingUtilities.swift index e8b336657..8893a1106 100644 --- a/SignalServiceKit/src/Loki/Protocol/Shelved/Multi Device/DeviceLinkingUtilities.swift +++ b/SignalServiceKit/src/Loki/Protocol/Shelved/Multi Device/DeviceLinkingUtilities.swift @@ -22,7 +22,6 @@ public final class DeviceLinkingUtilities : NSObject { let slavePublicKey = slaveKeyPair.hexEncodedPublicKey var kind = UInt8(LKDeviceLinkMessageKind.request.rawValue) let data = Data(hex: masterPublicKey) + Data(bytes: &kind, count: MemoryLayout.size(ofValue: kind)) - // TODO: Sign using the ED25519 private key here let slaveSignature = try! Ed25519.sign(data, with: slaveKeyPair) let thread = TSContactThread.getOrCreateThread(contactId: masterPublicKey) return DeviceLinkMessage(in: thread, masterPublicKey: masterPublicKey, slavePublicKey: slavePublicKey, masterSignature: nil, slaveSignature: slaveSignature) @@ -34,7 +33,6 @@ public final class DeviceLinkingUtilities : NSObject { let slavePublicKey = deviceLink.slave.publicKey var kind = UInt8(LKDeviceLinkMessageKind.authorization.rawValue) let data = Data(hex: slavePublicKey) + Data(bytes: &kind, count: MemoryLayout.size(ofValue: kind)) - // TODO: Sign using the ED25519 private key here let masterSignature = try! Ed25519.sign(data, with: masterKeyPair) let slaveSignature = deviceLink.slave.signature! let thread = TSContactThread.getOrCreateThread(contactId: slavePublicKey) diff --git a/SignalServiceKit/src/Messages/OWSIdentityManager.h b/SignalServiceKit/src/Messages/OWSIdentityManager.h index 2c4631c4c..838cd25fe 100644 --- a/SignalServiceKit/src/Messages/OWSIdentityManager.h +++ b/SignalServiceKit/src/Messages/OWSIdentityManager.h @@ -75,10 +75,10 @@ extern const NSUInteger kStoredIdentityKeyLength; - (BOOL)saveRemoteIdentity:(NSData *)identityKey recipientId:(NSString *)recipientId; -#pragma mark - Debug - - (nullable ECKeyPair *)identityKeyPair; +#pragma mark - Debug + #if DEBUG // Clears everything except the local identity key. - (void)clearIdentityState:(YapDatabaseReadWriteTransaction *)transaction; diff --git a/SignalServiceKit/src/Storage/AxolotlStore/OWSPrimaryStorage+SignedPreKeyStore.m b/SignalServiceKit/src/Storage/AxolotlStore/OWSPrimaryStorage+SignedPreKeyStore.m index 10a86ab47..413ddfe67 100644 --- a/SignalServiceKit/src/Storage/AxolotlStore/OWSPrimaryStorage+SignedPreKeyStore.m +++ b/SignalServiceKit/src/Storage/AxolotlStore/OWSPrimaryStorage+SignedPreKeyStore.m @@ -32,7 +32,6 @@ NSString *const OWSPrimaryStorageKeyPrekeyCurrentSignedPrekeyId = @"currentSigne OWSAssert(identityKeyPair); @try { - // TODO: Sign using the ED25519 private key here NSData *signature = [Ed25519 throws_sign:keyPair.publicKey.prependKeyType withKeyPair:identityKeyPair]; return [[SignedPreKeyRecord alloc] initWithId:preKeyId keyPair:keyPair From dc901d75285ba1d4ab4f3803214a662ac2f1606c Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Wed, 28 Oct 2020 10:47:39 +1100 Subject: [PATCH 11/11] Update Pods --- Podfile.lock | 4 ++-- Pods | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Podfile.lock b/Podfile.lock index 734cba68e..797b8796f 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -17,7 +17,7 @@ PODS: - CocoaLumberjack (3.6.2): - CocoaLumberjack/Core (= 3.6.2) - CocoaLumberjack/Core (3.6.2) - - CryptoSwift (1.3.1) + - CryptoSwift (1.3.2) - FeedKit (8.1.1) - GRKOpenSSLFramework (1.0.2.12) - libPhoneNumber-iOS (0.9.15) @@ -304,7 +304,7 @@ CHECKOUT OPTIONS: SPEC CHECKSUMS: AFNetworking: b6f891fdfaed196b46c7a83cf209e09697b94057 CocoaLumberjack: bd155f2dd06c0e0b03f876f7a3ee55693122ec94 - CryptoSwift: f12f037f6d0fcd6d48c96db0071b653de64e6c4d + CryptoSwift: 093499be1a94b0cae36e6c26b70870668cb56060 FeedKit: 3418eed25f0b493b205b4de1b8511ac21d413fa9 GRKOpenSSLFramework: 8a3735ad41e7dc1daff460467bccd32ca5d6ae3e libPhoneNumber-iOS: 0a32a9525cf8744fe02c5206eb30d571e38f7d75 diff --git a/Pods b/Pods index 46670a1c2..32824be1a 160000 --- a/Pods +++ b/Pods @@ -1 +1 @@ -Subproject commit 46670a1c228057915024e6ff96657a051eb54f82 +Subproject commit 32824be1acfe0c86778bec9d95970b271eb80ceb