Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
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)
  #2  
Old 03-09-2024, 17:46
chants chants is offline
VIP
 
Join Date: Jul 2016
Posts: 836
Rept. Given: 47
Rept. Rcvd 52 Times in 32 Posts
Thanks Given: 742
Thanks Rcvd at 1,148 Times in 531 Posts
chants Reputation: 52
Quote:
Originally Posted by Gregory Morse View Post
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.
In the future if you are going to troll with annoying advice, consider not posting. He clearly stated that decryption functioned in a reasonable time. To throw out generic canned nonsense advice like using native code was clearly not what was asked. Although you've been doing this for a while now so it's not surprising.
Reply With Quote
  #3  
Old 03-10-2024, 07:14
dyers eve dyers eve is offline
Friend
 
Join Date: Nov 2023
Posts: 25
Rept. Given: 1
Rept. Rcvd 2 Times in 2 Posts
Thanks Given: 21
Thanks Rcvd at 23 Times in 10 Posts
dyers eve Reputation: 2
Quote:
Originally Posted by chants View Post
In the future if you are going to troll with annoying advice, consider not posting. He clearly stated that decryption functioned in a reasonable time. To throw out generic canned nonsense advice like using native code was clearly not what was asked. Although you've been doing this for a while now so it's not surprising.
You are not the only one who knows everything, @chants.
Whether they are right or wrong, is not for you to decide.
While you may have a better answer, if someone else also wants to post their opinions, let them do so!

@eychie It is better to avoid managed frameworks like .Net when you want to optimise for performance. It is also preferable to code the most compute-intensive parts of the encryption in C++ or better yet, in a memory-safe language like Rust.
Is there a good reason why you chose VB.Net instead of C?
I cannot comment further since I cannot access your attachment due to my low rank. I can help with the code if you provide more information, if you need.
Reply With Quote
The Following User Says Thank You to dyers eve For This Useful Post:
eychei (03-11-2024)
Reply

Tags
des, desx

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is slow link to this forum Neptune General Discussion 7 12-31-2012 02:54
ExeTools is getting slow... baatazu General Discussion 19 07-29-2005 22:11
Emule is so slow for me Rhodium General Discussion 12 04-10-2005 05:47


All times are GMT +8. The time now is 21:44.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )