View Single Post
  #3  
Old 03-09-2024, 09:15
NON NON is offline
Banned User
 
Join Date: Sep 2023
Posts: 77
Rept. Given: 2
Rept. Rcvd 2 Times in 2 Posts
Thanks Given: 30
Thanks Rcvd at 21 Times in 16 Posts
NON Reputation: 2
Quote:
Originally Posted by eychei View Post
Hi everyone,

I did write a small vb.net program to encrypt and decrypt DESX.
Its actually nearly the same as DES but with an additional input and output XOR with two extra keys.

Attachment 10479

So when I decrypt files it easy really fast taking around 10sec for 100mb.
This is because I can decrypt the complete file first without needing to go from one block to the next.

But when I encrypt files I need to chain 8 byte sized chunks in serial.



So I tried different approaches in appending the ciphertext at the end to a bte array so i can write it to file afterwards.
It does not change in speed if I use array.copy / concat or for loop copy.
I also tried with creating 4-8 parallel threads. While this reduces the time needed for encryption, it is still slow for very big files.


How can I increase speed for the encryption algorithm? Hope someone has a solution.

Thx.

-e
You can write native code instead of the .Net code. Will be much faster. At least, write the time consuming parts of the code in native. You can use the pre-written libraries available on internet. No need to create your own. Much faster.
Reply With Quote
The Following User Says Thank You to NON For This Useful Post:
dyers eve (03-10-2024)