Skip to content

armgit / ente

Public Imported from GitHub
0

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

Update

Manav Rathi46f53494df44
diff --git a/web/docs/dependencies.md b/web/docs/dependencies.md
index 7435d80367..84275c11fc 100644
--- a/web/docs/dependencies.md
+++ b/web/docs/dependencies.md
@@ -49,12 +49,12 @@ The root `package.json` also has a convenience dev dependency:
## Cryptography
We use [libsodium](https://libsodium.gitbook.io/doc/) for our cryptography
-primitives. Specifically, we use its WebAssembly target, accessible via
-JavaScript wrappers maintained by the original authors of libsodium themselves -
+primitives. We use its WebAssembly target, accessible via JavaScript wrappers
+maintained by the original authors of libsodium themselves -
[libsodium-wrappers](https://github.com/jedisct1/libsodium.js).
-We need to use the "sumo" variant, _libsodium-wrappers-sumo_, to get access to
-the `crypto_pwhash_*()` functions.
+More precisely, we use the sumo variant, "libsodium-wrappers-sumo", since the
+standard variant does not provide the `crypto_pwhash_*` functions.
## Meta frameworks
diff --git a/web/packages/base/crypto/libsodium.ts b/web/packages/base/crypto/libsodium.ts
index 1efcda7676..cd91633c17 100644
--- a/web/packages/base/crypto/libsodium.ts
+++ b/web/packages/base/crypto/libsodium.ts
@@ -10,7 +10,7 @@
*/
import { mergeUint8Arrays } from "@/utils/array";
import { CustomError } from "@ente/shared/error";
-import sodium, { type StateAddress } from "libsodium-wrappers";
+import sodium, { type StateAddress } from "libsodium-wrappers-sumo";
import type {
BytesOrB64,
EncryptedBlob,
diff --git a/web/packages/base/crypto/worker.ts b/web/packages/base/crypto/worker.ts
index 82f2d47624..b348d6a299 100644
--- a/web/packages/base/crypto/worker.ts
+++ b/web/packages/base/crypto/worker.ts
@@ -1,5 +1,5 @@
import { expose } from "comlink";
-import type { StateAddress } from "libsodium-wrappers";
+import type { StateAddress } from "libsodium-wrappers-sumo";
import * as ei from "./ente-impl";
import * as libsodium from "./libsodium";