π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
casing
Manav Rathi92096e6a2123
diff --git a/web/packages/accounts/components/VerifyMasterPasswordForm.tsx b/web/packages/accounts/components/VerifyMasterPasswordForm.tsxindex 59999647ab..23e172510c 100644--- a/web/packages/accounts/components/VerifyMasterPasswordForm.tsx+++ b/web/packages/accounts/components/VerifyMasterPasswordForm.tsx@@ -49,7 +49,7 @@ export interface VerifyMasterPasswordFormProps {* auxillary information that was ascertained when verifying it.** @param key The user's master key obtained after decrypting it by using- * the kek derived from their passphrase.+ * the KEK derived from their passphrase.** @param kek The key used for encrypting the user's master key.*diff --git a/web/packages/accounts/pages/credentials.tsx b/web/packages/accounts/pages/credentials.tsxindex 5ebee75d47..dc7856b8aa 100644--- a/web/packages/accounts/pages/credentials.tsx+++ b/web/packages/accounts/pages/credentials.tsx@@ -170,7 +170,7 @@ const Page: React.FC = () => {async (kek: string) => {try {// Currently the page will get reloaded if any of the attributes- // have changed, so we don't need to worry about the kek having+ // have changed, so we don't need to worry about the KEK having// been generated using stale credentials. This await on the// promise is here to only ensure we're done with the check// before we let the user in.diff --git a/web/packages/accounts/services/srp.ts b/web/packages/accounts/services/srp.tsindex 7332221140..27be52e9ee 100644--- a/web/packages/accounts/services/srp.ts+++ b/web/packages/accounts/services/srp.ts@@ -179,7 +179,7 @@ export interface SRPAttributes {* generated) for use as the SRP user password by applying a deterministic KDF* (Key Derivation Function) to the provided {@link kek}.*- * @param kek The user's kek (key encryption key) as a base64 string.+ * @param kek The user's KEK (key encryption key) as a base64 string.** @returns A string that can be used as the SRP user password.*/@@ -390,7 +390,7 @@ export const convertBase64ToBuffer = (base64: string) => {/**** @param loginSubKey The user's SRP password (autogenerated, derived- * deterministically from their kek by {@link deriveSRPPassword}).+ * deterministically from their KEK by {@link deriveSRPPassword}).** @returns*/diff --git a/web/packages/accounts/services/user.ts b/web/packages/accounts/services/user.tsindex aa9574e8b0..bc54bb2536 100644--- a/web/packages/accounts/services/user.ts+++ b/web/packages/accounts/services/user.ts@@ -155,17 +155,17 @@ export interface KeyAttributes {* [Note: Key encryption key]** The user's master key is encrypted with a "key encryption key" (lovingly- * called a "kek" sometimes).+ * called a "KEK" sometimes).*- * The kek itself is derived from the user's passphrase.+ * The KEK itself is derived from the user's passphrase.** 1. User enters passphrase on new device.*- * 2. Client derives kek from this passphrase (using the {@link kekSalt},+ * 2. Client derives KEK from this passphrase (using the {@link kekSalt},* {@link opsLimit} and {@link memLimit} as parameters for the* derivation).*- * 3. Client use kek to decrypt the master key from {@link encryptedKey} and+ * 3. Client use KEK to decrypt the master key from {@link encryptedKey} and* {@link keyDecryptionNonce}.*/encryptedKey: string;@@ -178,7 +178,7 @@ export interface KeyAttributes {*/keyDecryptionNonce: string;/**- * The salt used during the derivation of the kek.+ * The salt used during the derivation of the KEK.** Base64 encoded.*@@ -208,7 +208,7 @@ export interface KeyAttributes {*/kekSalt: string;/**- * The operation limit used during the derivation of the kek.+ * The operation limit used during the derivation of the KEK.** The {@link opsLimit} and {@link memLimit} are complementary parameters* that define the amount of work done by the key derivation function. See@@ -219,7 +219,7 @@ export interface KeyAttributes {*/opsLimit: number;/**- * The memory limit used during the derivation of the kek.+ * The memory limit used during the derivation of the KEK.** See {@link opsLimit} for more details.*/@@ -571,15 +571,15 @@ export const remoteLogoutIfNeeded = async () => {};/**- * Generate a new local-only kek (key encryption key) suitable for interactive+ * Generate a new local-only KEK (key encryption key) suitable for interactive* use and update the locally saved key attributes to reflect it.** See {@link deriveInteractiveKey} for more details.*- * In brief, after the initial passphrase verification, we create a new kek- * derived from the same passphrase as the original kek, but with so called- * interactive mem and ops limits which result in a noticeably faster key- * derivation.+ * In brief, after the initial passphrase verification, we create a new+ * inetractive KEK derived from the same passphrase as the original KEK, but+ * with so called interactive mem and ops limits which result in a noticeably+ * faster key derivation.** We then overwrite the encrypted master key, encryption nonce and the KEK* derivation parameters (see: [Note: KEK three tuple]) in the locally persisteddiff --git a/web/packages/base/crypto/libsodium.ts b/web/packages/base/crypto/libsodium.tsindex a5151f384a..18129942d3 100644--- a/web/packages/base/crypto/libsodium.ts+++ b/web/packages/base/crypto/libsodium.ts@@ -787,7 +787,7 @@ export const deriveKey = async (/*** A variant of {@link deriveKey} with (dynamic) parameters for deriving- * sensitive keys (like the user's master key kek (key encryption key).+ * sensitive keys (like the user's master key KEK (key encryption key).** This function defers to {@link deriveKey} after choosing the most secure ops* and mem limits that the current device can handle. For details about thesediff --git a/web/packages/base/session.ts b/web/packages/base/session.tsindex 410d1f1a5e..bf0aa9913c 100644--- a/web/packages/base/session.ts+++ b/web/packages/base/session.ts@@ -186,7 +186,7 @@ export const stashKeyEncryptionKeyInSessionStore = (kek: string) =>saveKeyInSessionStore("keyEncryptionKey", kek);/**- * Return the decrypted user's key encryption key ("kek") from session storage+ * Return the decrypted user's key encryption key ("KEK") from session storage* if present, otherwise return `undefined`.** The key (if it was present) is also removed from session storage.@@ -198,10 +198,10 @@ export const stashKeyEncryptionKeyInSessionStore = (kek: string) =>* During login, if the user has set a second factor (passkey or TOTP), then we* need to redirect them to the accounts app or TOTP page to verify the second* factor. This second factor verification happens after password verification,- * but simply storing the decrypted kek in-memory wouldn't work because the+ * but simply storing the decrypted KEK in-memory wouldn't work because the* second factor redirect can happen to a separate accounts app altogether.*- * So instead, we stash the encrypted kek in session store (using+ * So instead, we stash the encrypted KEK in session store (using* {@link stashKeyEncryptionKeyInSessionStore}), and after redirect, retrieve it* (after clearing it) using {@link unstashKeyEncryptionKeyFromSession}.*/