Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (degenerate_762, AndrewAMD), 877 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
AES 128 #466520
06/19/17 09:34
06/19/17 09:34
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline OP
Expert
Kartoffel  Offline OP
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Hey there!

Here's a quick lite-c conversion of the AES-128 implementation found at: https://github.com/kokke/tiny-AES128-C (more info on AES)

Note that this AES implementation is probably not secure against a variety of attacks. On top of that the author provides NO warranty.
I'm using it to encrypt game files.

Important note from aes.c:
Code:
NOTE: String length must be evenly divisible by 16byte (str_len % 16 == 0)
You should pad the end of the string with zeros if this is not the case.


Download: AES128_lite-c_19-06-2017.zip (Dropbox)
Download: AES128_lite-c_19-06-2017.zip (update 1) (Dropbox)

Edit: small update: Added (CBC mode) functions to encrypt or decrypt from and into the same buffer, rather than having to use both an input and an output buffer.

Last edited by Kartoffel; 06/19/17 10:31.

POTATO-MAN saves the day! - Random
Re: AES 128 [Re: Kartoffel] #466564
06/21/17 12:09
06/21/17 12:09
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
Just a note, using strong encryption for gamefiles is useless and simply just wasting time.
All files can easily be dumped live from memory.
You should use a simple XOR cypher with incrementing the steps.
Anyways thanks for the contribution.

Last edited by Ch40zzC0d3r; 06/21/17 12:09.
Re: AES 128 [Re: Ch40zzC0d3r] #466573
06/21/17 18:10
06/21/17 18:10
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline OP
Expert
Kartoffel  Offline OP
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Yes, I know about a few ways to do this, thanks for the info though. It's important to keep this in mind.
But I'm still sticking to my current approach since a simple xor encryption seems a bit too easy to break.
(in terms of being able to manipulate save files, textures, levels or other game data in a predictable manner)


POTATO-MAN saves the day! - Random

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1