Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Program Announcements / DarkFish Strong Encryption DLL

Author
Message
GatorHex
18
Years of Service
User Offline
Joined: 5th Apr 2005
Location: Gunchester, UK
Posted: 27th Jun 2007 20:36 Edited at: 29th Jun 2007 14:27
DarkFish Strong Encryption DLL

Free, easy to use, military strength encryption for your Dark Basic Projects!

Encrypt you highscore file, encrypt you player data, encrypt your map files, encrypt your network traffic etc.

You can encrypt bytes,chars,strings, and files. You can also encrypt dwords using the DLL directly and also write your own encryption function if you like for something else.

Download:http://www.kumkie.com/darkfish/



[A quick lesson on how it works]A hash is generated from the password and this is xor-ed with two 32bit dwords that you pass in for left and right sides. Both resulting sides are switched around and the process happens again up to a total of 16 times. This is a lot stronger than a plain cypher because the letter "a" can result in many different values to stop any pattern being discovered.

GatorHex
18
Years of Service
User Offline
Joined: 5th Apr 2005
Location: Gunchester, UK
Posted: 28th Jun 2007 02:29 Edited at: 28th Jun 2007 02:42
No comments? Tough crowd I was hoping for at least one "OMG, I've waiting for something like this to encrypt my files for ages!" Maybe your all trying to crack da code? Give up! They recon it should take around 100 years or so with a brute force attack

Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 28th Jun 2007 11:30
Be patient,
I tested it and its good, but why it uses only capital letters not whole ascii 0..255 when crypting? "FE7B92BDB9A8C30B2DC7BEC..."

And the dll is quite massive, 720 kilos.
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 28th Jun 2007 12:00
I'll try it later, but why not post a .zip file containing all 4 files for easier download?

This may come in handy for a top secret messaging program for me and my cousins to use.

GatorHex
18
Years of Service
User Offline
Joined: 5th Apr 2005
Location: Gunchester, UK
Posted: 28th Jun 2007 12:37 Edited at: 28th Jun 2007 15:26
Quote: "I tested it and its good, but why it uses only capital letters not whole ascii 0..255 when crypting? "FE7B92BDB9A8C30B2DC7BEC..." "


It's not using a weak character substitution cypher it's using military type hash encryption so it's storing DWORDS. The smallest way I could think of storing them as text was base16/Hex. It does make things 8x larger though. Using WRITE LONG to save as binary instead of writing strings should make it smaller.

It's completely configurable so if file size was more important to you than strong encryption you could also remove the randoms in char pair storage and encrypt a char quad instead. But without a bit of randomness patterns sometimes can be visible in short strings so you might want to read all the file into one loooong string to avoid this. However you could run out of memory if somone used a realy long file so you would have to handle this too. A hash quad should result in text file sizes 4x larger.

In theory you can write a 6 char pair. 3x larger files but I was having issues with val(dword) not working and I didn't want to require somone elses DLL to use my DLL.

I might add all the idead above after I get my interim report written for my Uni thesis, don't worry about using my functions now, I'll give any new functions a new name so it remains backward compatible.

Quote: "And the dll is quite massive, 720 kilos. "


I'm using Dev C I couldn't see a debug/release option on it does anyone know how to do this? I'm sure there will be debugging trash in there.

Quote: "I'll try it later, but why not post a .zip file containing all 4 files for easier download?
"


You only need the top 2 files. I thought it was easier to click these two than click a zip and go through the unzip process.

Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 29th Jun 2007 01:33
Quote: "I'm using Dev C I couldn't see a debug/release option on it does anyone know how to do this? I'm sure there will be debugging trash in there."

One of the reasons the DLL is so big may be if you're including a rather large library such as iostream, which bumps the size up 400kb or so.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
GatorHex
18
Years of Service
User Offline
Joined: 5th Apr 2005
Location: Gunchester, UK
Posted: 29th Jun 2007 01:39 Edited at: 29th Jun 2007 02:13
ok thanks benjamin i look to see if i can take it out and have it still running. I was expecting a release compile option that would remove unused includes, but can't find it in Dev C

[Update] OK, got it down to half the size there was an iostream in there well spotted. Download the new slimline version ppl, it about 367kb

Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 29th Jun 2007 14:45
Looks pretty good to me. I will surely be able to use this quite soon. Thanks

Also keywords file attached for anyone who wants one. I hate not having commands highlighted

Attachments

Login to view attachments
Torrey
19
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 29th Jun 2007 15:05
Very useful DLL GatorHex, good job!

I put your plugin on a diet even more effective than smoking crack. You'll find it attached and anorexic like Nicole Ritchie, at a nice 228kb. If you ever have the time, check out LordPE. It has an excellent feature of rebuilding PE files to remove the unnecessary padding. Although, sometimes it doesn't work because of the way the executable functions, but it's always worth a shot.

Attachments

Login to view attachments
GatorHex
18
Years of Service
User Offline
Joined: 5th Apr 2005
Location: Gunchester, UK
Posted: 29th Jun 2007 17:26 Edited at: 29th Jun 2007 17:27
Ok thanks Lost in Thought and Torrey, I've uploaded both your suggested files to the main site.

(no offence to Torrey) but i downloaded LordPE and did the extract myself and tested it just make sure it's not dodgy. Everything seems okay as far as i can see. Nice little util

Ian T
21
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 20th Jul 2007 20:15
8x larger? That's a little worrying. If you could make a version that didn't expand data significantly, that'd be very useful. Also, how do the read/write speeds for this compare to standard DBP file access commands?
GatorHex
18
Years of Service
User Offline
Joined: 5th Apr 2005
Location: Gunchester, UK
Posted: 22nd Jul 2007 00:56
It's using DBP file access commands, the main sting stripping is done in DBP code so you can alter the way it works to suit your requirements. You can see from the screen shot above a small text file is load/save and encrypted/decrypted in 15/16ms.

Sorry, I don't have time to improve it right now as i'm working on War MMOG until October. So it's either do DIY or put up with file increase.

It's not weak encryption (character substitution) it's strong encryption (will take years to crack) and some file size increase will always be required to do this. Look at the letter "C" on lines 1,3,6 then look at the value generated on lines 1,3,6 in the encrypted text. even though it's the same letter each encryption dword is different so no pattern can be found in the secret text.

DinoHunter (still no nVidia compo voucher!), CPU/GPU Benchmark, DarkFish Encryption DLL, War MMOG (WIP), 3D Model Viewer
Mr Tank
21
Years of Service
User Offline
Joined: 25th Nov 2002
Location: United Kingdom
Posted: 22nd Jul 2007 02:56
Interesting. This may come in handy at some point. I'd like to have a high score table without people cheating. Seems like quite a fascinating subject too.

SUPER BADASS SPACESHIP X: WEBSITE
FORUM TOPIC
Torrey
19
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 23rd Jul 2007 22:56 Edited at: 23rd Jul 2007 22:57
I was getting bored coding at work and decided to take another look at this plugin. It appears that the password you supply to encrypt/decrypt your data is being stored in plain text (in a few places) within the data section of your DLL in RAM. With your plugin being able to function independently from dbpro, you're offering up the decrypting link that secures everything. The actual encrypted data by itself would take years to figure out if you could at all, but given any application/library that decrypts the data you'll have your answer within the first few minutes.

GatorHex
18
Years of Service
User Offline
Joined: 5th Apr 2005
Location: Gunchester, UK
Posted: 24th Jul 2007 03:55 Edited at: 24th Jul 2007 04:03
@Torrey, The code is half in the DLL half in the DBP exe. You can customise the DBP side to make your own unique algorithm if you like. The DLL won't work on it's own and DBP won't provide an interface for the user to use it's routines (i hope ).

I'd like to save/read the DWORDS out as pure binary instead of HEX strings. Anyone know how I can do this? It should reduce the file size

I just found somone else has been working on DBP encryption too over here http://forum.thegamecreators.com/?m=forum_view&t=93816&b=8&p=1 You might prefer their solution.

DinoHunter (still no nVidia compo voucher!), CPU/GPU Benchmark, DarkFish Encryption DLL, War MMOG (WIP), 3D Model Viewer
Uncle Sam
18
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 25th Jul 2007 10:57 Edited at: 25th Jul 2007 10:57
Impressive! Nice work.

I wish I had known about this earlier. I had to write my own encryptor for my media files for the demo version of my program (Vegetator Professional), and I think I did a fairly good job, but I don't think it is nearly as secure as this.

Awesome work.

Login to post a reply

Server time is: 2024-03-29 06:26:59
Your offset time is: 2024-03-29 06:26:59