Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mob] Remove client side strength check

Neeraj Gupta02fb6888abaa
diff --git a/mobile/lib/utils/crypto_util.dart b/mobile/lib/utils/crypto_util.dart
index d9d515d47e..52ed85f857 100644
--- a/mobile/lib/utils/crypto_util.dart
+++ b/mobile/lib/utils/crypto_util.dart
@@ -17,8 +17,6 @@ const int loginSubKeyLen = 32;
const int loginSubKeyId = 1;
const String loginSubKeyContext = "loginctx";
-const int _keyDerivationStregth = 1073741824 * 4;
-
Uint8List cryptoSecretboxEasy(Map<String, dynamic> args) {
return Sodium.cryptoSecretboxEasy(args["source"], args["nonce"], args["key"]);
}
@@ -408,10 +406,9 @@ class CryptoUtil {
final factor = Sodium.cryptoPwhashMemlimitSensitive ~/
Sodium.cryptoPwhashMemlimitModerate; // = 4
int opsLimit = Sodium.cryptoPwhashOpslimitSensitive * factor; // = 16
- if (memLimit * opsLimit != desiredStrength ||
- desiredStrength != _keyDerivationStregth) {
+ if (memLimit * opsLimit != desiredStrength) {
throw UnsupportedError(
- "unexpcted values for memLimit $memLimit and opsLimit: $opsLimit or desiredStrength: $desiredStrength",
+ "unexpcted values for memLimit $memLimit and opsLimit: $opsLimit",
);
}