Skip to content

Commit

Permalink
Made SIV_GCM the default cipher combo for new vaults
Browse files Browse the repository at this point in the history
Fixes #288
  • Loading branch information
tobihagemann committed Jan 3, 2024
1 parent 0362d6c commit a7dcd5c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public class VaultDBManager: VaultManager {
*/
public func createNewVault(withVaultUID vaultUID: String, delegateAccountUID: String, vaultPath: CloudPath, password: String, storePasswordInKeychain: Bool) -> Promise<Void> {
let tmpDirURL = URL(fileURLWithPath: NSTemporaryDirectory(), isDirectory: true).appendingPathComponent(UUID().uuidString, isDirectory: true)
let cipherCombo = CryptorScheme.sivCtrMac
let cipherCombo = CryptorScheme.sivGcm
let vaultConfig = VaultConfig.createNew(format: 8, cipherCombo: cipherCombo, shorteningThreshold: 220)
let masterkey: Masterkey
let provider: LocalizedCloudProviderDecorator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ class VaultManagerTests: XCTestCase {
}
XCTAssertEqual(uploadedVaultConfigToken, savedVaultConfigToken)
let vaultConfig = try UnverifiedVaultConfig(token: savedVaultConfigToken)
XCTAssertEqual("SIV_CTRMAC", vaultConfig.allegedCipherCombo)
XCTAssertEqual("SIV_GCM", vaultConfig.allegedCipherCombo)
XCTAssertEqual(8, vaultConfig.allegedFormat)

let uploadedRootDirIdFile = try getUploadedData(at: CloudPath(cloudProviderMock.createdFolders[3]).appendingPathComponent("dirid.c9r"))
XCTAssertEqual(88, uploadedRootDirIdFile.count)
XCTAssertEqual(68, uploadedRootDirIdFile.count)
}.catch { error in
XCTFail("Promise failed with error: \(error)")
}.always {
Expand Down

0 comments on commit a7dcd5c

Please sign in to comment.