Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

224
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda