diff --git a/apps/browser/src/background/nativeMessaging.background.ts b/apps/browser/src/background/nativeMessaging.background.ts index 2399afd57b..69f66dfa7c 100644 --- a/apps/browser/src/background/nativeMessaging.background.ts +++ b/apps/browser/src/background/nativeMessaging.background.ts @@ -274,7 +274,11 @@ export class NativeMessagingBackground { let message = rawMessage as ReceiveMessage; if (!this.platformUtilsService.isSafari()) { message = JSON.parse( - await this.encryptService.decryptToUtf8(rawMessage as EncString, this.sharedSecret), + await this.encryptService.decryptToUtf8( + rawMessage as EncString, + this.sharedSecret, + "ipc-desktop-ipc-channel-key", + ), ); } diff --git a/apps/desktop/native-messaging-test-runner/src/native-message.service.ts b/apps/desktop/native-messaging-test-runner/src/native-message.service.ts index 8cc94c9619..cd84504c63 100644 --- a/apps/desktop/native-messaging-test-runner/src/native-message.service.ts +++ b/apps/desktop/native-messaging-test-runner/src/native-message.service.ts @@ -219,7 +219,11 @@ export default class NativeMessageService { key: string, ): Promise { const sharedKey = await this.getSharedKeyForKey(key); - const decrypted = await this.encryptService.decryptToUtf8(payload, sharedKey); + const decrypted = await this.encryptService.decryptToUtf8( + payload, + sharedKey, + "native-messaging-session", + ); return JSON.parse(decrypted); } diff --git a/apps/desktop/src/services/native-message-handler.service.ts b/apps/desktop/src/services/native-message-handler.service.ts index 106dc11e41..a99effce9e 100644 --- a/apps/desktop/src/services/native-message-handler.service.ts +++ b/apps/desktop/src/services/native-message-handler.service.ts @@ -185,6 +185,7 @@ export class NativeMessageHandlerService { let decryptedResult = await this.encryptService.decryptToUtf8( message.encryptedCommand as EncString, this.ddgSharedSecret, + "ddg-shared-key", ); decryptedResult = this.trimNullCharsFromMessage(decryptedResult); diff --git a/apps/desktop/src/services/native-messaging.service.ts b/apps/desktop/src/services/native-messaging.service.ts index c9830030ef..2312bfb2f6 100644 --- a/apps/desktop/src/services/native-messaging.service.ts +++ b/apps/desktop/src/services/native-messaging.service.ts @@ -114,6 +114,7 @@ export class NativeMessagingService { await this.encryptService.decryptToUtf8( rawMessage as EncString, SymmetricCryptoKey.fromString(await ipc.platform.ephemeralStore.getEphemeralValue(appId)), + `native-messaging-session-${appId}`, ), );