Skip to content

Commit 7d72fa1

Browse files
freak4pcSn0wfreezeDev
authored andcommitted
[fix] Derive symmetric key correctly
1 parent 6eb2822 commit 7d72fa1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

OpenHaystack/OpenHaystack/HaystackApp/Model/Accessory.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ class Accessory: ObservableObject, Codable, Identifiable, Equatable, Hashable {
214214
/// Derive FindMyKeys until we have symmetric key from one week before now
215215
while self.lastDerivationTimestamp < Date() - TimeInterval(7 * 24 * 60 * 60) {
216216
self.lastDerivationTimestamp.addTimeInterval(self.updateInterval)
217-
self.oldestRelevantSymmetricKey = Accessory.kdf(inputData: self.symmetricKey, sharedInfo: "update".data(using: .ascii)!, bytesToReturn: 32)
217+
self.oldestRelevantSymmetricKey = Accessory.kdf(inputData: self.oldestRelevantSymmetricKey, sharedInfo: "update".data(using: .ascii)!, bytesToReturn: 32)
218218
}
219219

220220
/// we need to generate Keys from seven days in the past until now and 10 extra keys in case of desynchronization

0 commit comments

Comments
 (0)