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

218
Visualizações
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 Respostas
Responde à pergunta

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