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

215
Views
Which BouncyCastle API-supported Encryption algorithm is fastest for short string encryption in C# .NET and pretty safe?

I tried to search stackoverflow for an answer to this particular question but couldn't find a good answer.

The BouncyCastle API offers a ton of different encryption algorithms for .NET. In this case I have to select an encryption algorithm for the following use case:

  1. Encrypting several thousand short strings for storage in an unencrypted file, typical length 10-30 characters.

  2. Encryption needs to be only moderately secure, all strings will be encrypted with the same key but a different initialization vector. Things like authorization (like in AES-GCM) are not needed.

Which encryption algorithm is both fastest and straightforward to apply for encrypting and decrypting such a set of several thousand small strings? I will store the encrypted data of each string as BASE64 in the file.

Thank you for your advice!

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

That processor still has AES-NI, so using it via AES.Create seems like the most logical thing to do. A high-end solution would be to create the CTR mode from the ECB (and cache the keystreams).

Otherwise, you are looking for a fast stream cipher in software. You can check if Salsa20 is working for you. Unfortunately, that's the only cipher supported by eStream that I can find in Bouncy Castle for C#.

Note that you may want to look for multi-threading and would certainly check to see if it's possible to use a sequential nonce when using a stream cipher, as generating a 128-bit random value for each cipher seems wasteful.

over 4 years ago · Santiago Trujillo 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!