Gamestudio Links
Zorro Links
Newest Posts
hold key code returns very high value instead of 0 or 1
by 3run
Today at 16:08
oldschool fps project
by 3run
Today at 15:46
Sam Foster Sound | Experienced Indie Game Composer for Hire
by titanicpiano14
Today at 15:02
Project Aum - Winter Contest 2017 - Update
by Ayumi
Yesterday at 22:34
[ALL STYLES] 2D Videogame Artist (pixel, vector, painted)
by DesixStudios
Yesterday at 14:45
Easy question
by jcl
Yesterday at 13:47
Cheap bouncing shells/gibs
by 3run
Yesterday at 00:36
AUM Magazine
Latest Screens
RPG PARTY
Triton Wing now available on Steam
AckCon'17: Lotter vs The World
Triton Wing
Who's Online
17 registered (Ch40zzC0d3r, Ezzett, Lobo, Hredot, AndrewAMD, 3run, alibaba, ChrstphFr, firecrest, 2 invisible), 454 Guests and 5 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
Amocfx, cme, pataba, byano, Tuguldur717
17834 Registered Users
Topic Options
Rate This Topic
#466520 - 06/19/17 11:34 AES 128
Kartoffel Offline
Expert

Registered: 06/11/09
Posts: 2124
Loc: 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.


Edited by Kartoffel (06/19/17 12:31)
_________________________
POTATO-MAN saves the day! - Random

Top
#466564 - 06/21/17 14:09 Re: AES 128 [Re: Kartoffel]
Ch40zzC0d3r Online
Serious User

Registered: 10/10/11
Posts: 1082
Loc: 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.


Edited by Ch40zzC0d3r (06/21/17 14:09)

Top
#466573 - 06/21/17 20:10 Re: AES 128 [Re: Ch40zzC0d3r]
Kartoffel Offline
Expert

Registered: 06/11/09
Posts: 2124
Loc: 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

Top


Moderator:  HeelX, Lukas, Rei_Ayanami, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | resources | magazine | manual | support faq | bugs

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) 3dgamestudio.net