flat assembler
Message board for the users of flat assembler.

Index > Windows > Yes, Rijndael shift constants

Author
Thread Post new topic Reply to topic
AlexP



Joined: 14 Nov 2007
Posts: 561
Location: Out the window. Yes, that one.
AlexP 22 Jan 2008, 01:55
Ok, I finally figured your code out (and yes, this time I did). I had tried very hard to figure out what was wrong with it, but finally I just put it aside and worked on something else for awhile. Now that I'm done with that, I looked at it with "fresh eyes" and realized what was wrong. Very simple question, yes I made a thread about it, but here it goes. In the state, (a 4*4 block of bytes to anyone else out there), the encryption routine performs shifting right to left. Your encryption/decryption table lookups were all fine, but I noticed that they were exact opposite of each other. The encryption routine accessed them (in a visual, 4*4 box kind of a way) in a diagonal down to the right, which surprised me because I thought the shifting went from right to left. Your decryption routine of course did the opposite, complementing each other and providing the balance. I can see both sides of the problem, where what I think is supposed to happen accesses them "after shifting" and where your side acts like the data has not been shifted before grabbing the bytes. I got a little mixed up, could you clear up this little question of if you pretend like it's before or after shifting that you access them?

PS: (I'll probably be able to delete this thread if u delete yours and then I'll delete my post) Sry bout that last bit of confusion (or should I say byte). Ok, sry for that too. Thanks again if u or anyone helps me!
Post 22 Jan 2008, 01:55
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 22 Jan 2008, 02:06
what's this? looks like response but it's in separate thread. should i move it to some existing thread?
Post 22 Jan 2008, 02:06
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
AlexP



Joined: 14 Nov 2007
Posts: 561
Location: Out the window. Yes, that one.
AlexP 22 Jan 2008, 02:12
It's a reply from a much earlier thread, but that one was just a side-question itself. It's just a specific question that can be deleted if it's answered, which it probably will be. Don't have any other way of contacting him (he' s probably happy, I'm sure he's tired of me now), so I know he'll read this and then it can be deleted if he answers or not.
Post 22 Jan 2008, 02:12
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20299
Location: In your JS exploiting you and your system
revolution 22 Jan 2008, 05:01
Who is 'he'? Can I assume you mean me? It seems I was the only person to give you any Rijndael code so perhaps you do mean me?

If you are talking about the code that I posted in another thread then I can answer that I never shifted the data in memory. It is by far more efficient to work on the data in place and and shift it in the registers either when loading or when storing. Thus the sequence is something like: grab the data in shifted pattern - apply encoding - store the data in normal pattern.
Post 22 Jan 2008, 05:01
View user's profile Send private message Visit poster's website Reply with quote
AlexP



Joined: 14 Nov 2007
Posts: 561
Location: Out the window. Yes, that one.
AlexP 22 Jan 2008, 22:10
Thanks, that occured to me shortly after posting it. I just decided on three seperate exported functions for each cipher, and it's coming together now. Thanks for helpin' again, I don't think I'll need to read up on anything more or freak out over things not working again Smile (at least I hope not)
Post 22 Jan 2008, 22:10
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.