Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

159
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda