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

109
Visualizações
AES256 variations

Im building an Electron desktop app and storing data in a JSON file that I wish to encrypt and decrypt to prevent intentional tampering by the end user. This data will occasionally be read and updated by the app.

I've come to understand that Node's crypto module can handle this functionality.

My question pertains to the specific cipher algorithm to use. In reading Node's documentation, it says we have a choice between those provided by OpenSSL as can be found by calling 'openssl list -cipher-algorithms' in the terminal. Further research pointed me toward AES256 as I saw that it's trusted by governments.

But in whittling it down, there's still 11 variations to select from:

  • AES-256-CBC
  • id-aes256-CCM
  • AES-256-CFB
  • AES-256-CFB1
  • AES-256-CFB8
  • AES-256-CTR
  • AES-256-ECB
  • id-aes256-GCM
  • AES-256-OCB
  • AES-256-OFB

I assume that the decision is not arbitrary, and that each of these has a very specific use case. Can anybody point me in the right direction of what may be appropriate? And also, possibly a summary of why the others are not?

=== Update===

@topaco's reference comprehensively addresses this question for my use case, if not by the discussion presented, then by references provided.

Also, for those reading this later. This is a great place to start putting such things in an overarching context.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

CBC and GCM are probably the most commonly used. CBC is older which involves more compatibility. CBC does not include authentication instead of GCM. But it's possible to use CBC with HMAC (Encrypt then MAC). GCM is more and more used and one day CBC will be probably deprecated. For now, both seem to be good in your case.

ECB, one of the first generation of the AES, is absolutely not secure, see https://datalocker.com/what-is-the-difference-between-ecb-mode-versus-cbc-mode-aes-encryption/

about 4 years ago · Juan Pablo Isaza Relatório
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