π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Unused
Manav Rathi25f1087685f8
diff --git a/web/packages/base/crypto/ente-impl.ts b/web/packages/base/crypto/ente-impl.tsindex 60bf3a7d07..8a0a01dacb 100644--- a/web/packages/base/crypto/ente-impl.ts+++ b/web/packages/base/crypto/ente-impl.ts@@ -45,21 +45,8 @@ export const _decryptBlob = libsodium.decryptBlob2;export const _decryptBlobB64 = libsodium.decryptBlobB64;-export const _decryptAssociatedData = libsodium.decryptBlob;-export const _decryptThumbnail = _decryptBlob;-export const _decryptAssociatedDataB64 = async ({- encryptedDataB64,- decryptionHeaderB64,- keyB64,-}: DecryptBlobB64) =>- await _decryptAssociatedData({- encryptedData: await libsodium.fromB64(encryptedDataB64),- decryptionHeaderB64,- keyB64,- });-export const _decryptMetadataJSON_New = async (blob: EncryptedBlob_2,key: BytesOrB64,diff --git a/web/packages/base/crypto/libsodium.ts b/web/packages/base/crypto/libsodium.tsindex f49ee4e2a1..a7cce5710a 100644--- a/web/packages/base/crypto/libsodium.ts+++ b/web/packages/base/crypto/libsodium.ts@@ -13,7 +13,6 @@ import { CustomError } from "@ente/shared/error";import sodium, { type StateAddress } from "libsodium-wrappers";import type {BytesOrB64,- DecryptBlobBytes,DecryptBoxBytes,EncryptBytes,EncryptedBlob_2,@@ -453,27 +452,6 @@ export const decryptBlobB64 = (key: BytesOrB64,): Promise<string> => decryptBlob2(blob, key).then(toB64);-/**- * Decrypt the result of {@link encryptBlob}.- */-export const decryptBlob = async ({- encryptedData,- decryptionHeaderB64,- keyB64,-}: DecryptBlobBytes): Promise<Uint8Array> => {- await sodium.ready;- const pullState = sodium.crypto_secretstream_xchacha20poly1305_init_pull(- await fromB64(decryptionHeaderB64),- await fromB64(keyB64),- );- const pullResult = sodium.crypto_secretstream_xchacha20poly1305_pull(- pullState,- encryptedData,- null,- );- return pullResult.message;-};-/** Decrypt Stream, but merge the results. */export const decryptChaCha = async (data: Uint8Array,