Skip to content

Commit

Permalink
[fix] Derive symmetric key correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
freak4pc committed Oct 16, 2023
1 parent 6eb2822 commit 6a5a71c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ class Accessory: ObservableObject, Codable, Identifiable, Equatable, Hashable {
/// Derive FindMyKeys until we have symmetric key from one week before now
while self.lastDerivationTimestamp < Date() - TimeInterval(7 * 24 * 60 * 60) {
self.lastDerivationTimestamp.addTimeInterval(self.updateInterval)
self.oldestRelevantSymmetricKey = Accessory.kdf(inputData: self.symmetricKey, sharedInfo: "update".data(using: .ascii)!, bytesToReturn: 32)
self.oldestRelevantSymmetricKey = Accessory.kdf(inputData: self.oldestRelevantSymmetricKey, sharedInfo: "update".data(using: .ascii)!, bytesToReturn: 32)
}

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

0 comments on commit 6a5a71c

Please sign in to comment.