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

108
Views
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 answers
Answer question

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 Report
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!