Skip to content

Commit

Permalink
v0.9.17 (484)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbaigner committed Jan 11, 2022
1 parent f31faca commit 79e9c87
Show file tree
Hide file tree
Showing 72 changed files with 4,292 additions and 644 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.en.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [0.9.17 (484)] - 2022-01-10

- Fixes a potential timing attack on the implementation of scalar multiplication on EC (many thanks to Ryad Benadjila for pointing it out to us!)
- It is possible to customize the quick emoji button of the new composition view, both globally and for each discussion.
- The fluidity of the new discussion screen is improved.
- Since Olvid will soon drop support for iOS 11 and 12, a new alert recommends users using an old iOS version to upgrade to the latest one.

## [0.9.16 (479)] - 2022-01-04

- Fix an important issue for our iOS12 users, preventing Olvid to launch.
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.fr.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [0.9.17 (484)] - 2022-01-10

- Corrige une potentielle « timing attack » cryptographique concernant la multiplication scalaire sur les courbes elliptiques (mille merci à Ryad Benadjila de nous l'avoir remontée !).
- Il est maintenant possible de configurer l'émoji rapide de la nouvelle vue de composition de messages.
- Améliore la fluidité du nouvel écran de discussion.
- Étant donné que Olvid ne supportera bientôt plus iOS 11 et 12, une nouvelle alerte préviens les utilisateurs d'anciennes versions d'iOS qu'ils devraient mettre à jour vers la dernière version.

## [0.9.16 (479)] - 2022-01-04

- Corrige un problème important pour nous utilisateurs sous iOS12. Olvid démarre à nouveau !
Expand Down
9 changes: 8 additions & 1 deletion CoreDataStack/CoreDataStack/DataMigrationManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,9 @@ open class DataMigrationManager<PersistentContainerType: NSPersistentContainer>
destinationType: NSSQLiteStoreType,
destinationOptions: destinationOptions)
} catch {
if FileManager.default.isDeletableFile(atPath: destinationStoreURL.path) {
try? FileManager.default.removeItem(at: destinationStoreURL)
}
migrationRunningLog.addEvent(message: "The call to migrateStore failed: \(error.localizedDescription))")
throw error
}
Expand All @@ -327,7 +330,6 @@ open class DataMigrationManager<PersistentContainerType: NSPersistentContainer>

let psc = NSPersistentStoreCoordinator(managedObjectModel: destinationModel)


migrationRunningLog.addEvent(message: "Replacing the persistent store...")
os_log("Replacing persistent store", log: log, type: .info)

Expand Down Expand Up @@ -382,7 +384,12 @@ open class DataMigrationManager<PersistentContainerType: NSPersistentContainer>
open func performPreMigrationWork(forSourceModel sourceModel: NSManagedObjectModel, destinationModel: NSManagedObjectModel) throws {
fatalError("Must be overwritten by subclass")
}


open func performPostMigrationWork(forSourceModel sourceModel: NSManagedObjectModel, destinationModel: NSManagedObjectModel) throws {
fatalError("Must be overwritten by subclass")
}

}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ extension EdwardsCurve {
var pointQ = PointOnCurve(x: 1, y: 0, onCurveWithByteId: self.byteId, checkPointIsOnCurve: false)!
var pointR = PointOnCurve(with: pointP)

let bitCount = n.size(inBase: .two)
let bitCount = self.parameters.cardinality.size(inBase: .two)
for i in 0..<bitCount {

/* t1 = ((Q.x-Q.y)*(R.x+R.y))%p */
Expand Down Expand Up @@ -181,11 +181,12 @@ extension EdwardsCurve {
}


public func scalarMultiplication(scalar n: BigInt, point: PointOnCurve) -> PointOnCurve? {
public func scalarMultiplication(scalar: BigInt, point: PointOnCurve) -> PointOnCurve? {
guard self.byteId == point.onCurveWithByteId else { return nil }
var pointP: PointOnCurve
let p = self.parameters.p
let y = BigInt(point.y).mod(p)
let n = BigInt(scalar).mod(self.parameters.cardinality)
if n == BigInt(0) || y == BigInt(1) {
pointP = PointOnCurve(x: 0, y: 1, onCurveWithByteId: self.byteId, checkPointIsOnCurve: false)!
} else if y == BigInt(-1).mod(p) {
Expand All @@ -197,7 +198,7 @@ extension EdwardsCurve {
} else {
var pointQ = PointOnCurve(with: point)
pointP = PointOnCurve(x: 0, y: 1, onCurveWithByteId: self.byteId, checkPointIsOnCurve: false)!
let bitCount = n.size(inBase: .two)
let bitCount = self.parameters.cardinality.size(inBase: .two)
for i in 0..<bitCount {
if n.isBitSet(atPosition: UInt(bitCount-i-1)) {
pointP = self.add(point: pointP, withPoint: pointQ)!
Expand Down
Loading

0 comments on commit 79e9c87

Please sign in to comment.