Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

158
Views
Issues with E2EE in browser chat application (WebCrypto API)

I am trying to implement a messaging system into a website. The messages between two user should be E2E encrypted. There is a wonderful tutorial at https://getstream.io/blog/web-crypto-api-chat/, that I used as a guide for implementation. For the encryption/decryption I use the WebCrypto API.

  1. Each user get's an EC-256 (public, private)-keypair generated.
  2. Messages between two users will be encrypted with the AES-GCM algorithm using an IV and the secret key derived from the sender's private and the receivers public key.

So far, so good, in the most cases this works perfectly: the message to send will be encrypted on the client, sent to the server and stored in the database as an incomprehensible string. If one of the user's is logged in again on the website and opens the conversation, the messages will be decrypted and are readable again for both user's...BUT certain messages can't be decrypted for some reason. I get this common error message, which can be found in numerous threads:

DOMException: The operation failed for an operation-specific reason

Unfortunately, for security reasons, the browser does not show more details about what is going wrong. It also makes no difference which browsers I use, it's always the same messages that can't be decrypted. But this is probably an indication that something is going wrong with the encryption, so that the decryption can no longer work. But on the other side I can't experience any errors in the console when encrypting a message, which can't be decrypted later.

Has anyone had experience with something like this?

Thank you and best regards

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!