Jump to content
Tuts 4 You

Rijndeal 128, 192 , 256 example


Recommended Posts



I want a example about Rijndeal 128, 192 , 256 in Asm,Cpp

Now  have i searched many hours but without good results.


I found this drizz cryptohash.lib but with differents results as this page






Result in hex


256= 18fa02ae57bfc4d9e1414c37d2d5e49898b1c6ce59a2a10fced00a36c6492f64

192= 521b4e49d550cfa20856c254cac7a199a670af2f7aeb8829

128= 37f9ce5d255f5b4fb7c66cefe4331e97


Can your send code examples in Asm or Cpp?!?





Edited by ragdog
Link to comment

You're probably messing up padding. Rijdael operates on 16 byte blocks, you should pad both key and data with zeroes.

Or you could be mixing up encryption modes. tools4noobs by default uses CBC, I'm not sure what Drizz's lib uses - I'm guessing ECB.

Output from Drizz's lib:

37 F9 CE 5D 25 5F 5B 4F B7 C6 6C EF E4 33 1E 97
which is the same as tools4noobs output 37f9ce5d255f5b4fb7c66cefe4331e97

Totally trivial sample code I used for checking:

.486.model flat, stdcalloption casemap:noneinclude windows.incinclude user32.incinclude kernel32.incincludelib user32.libincludelib kernel32.libinclude rijndael.asm.DATA   key db "Tuts4You"       db 8 dup (0)   input db "Tuts4You"       db 8 dup (0)   output db 16 dup (0AAh).CODEstart:   invoke RijndaelInit, offset key, 16   invoke RijndaelEncrypt, offset input, offset outputend start
Compile, step over RijndaelEncrypt in a debugger and examine contents of "output"
  • Like 1
Link to comment

Thanks Kao for the fast reply




key db "Tuts4You"
       db 8 dup (0)
   input db "Tuts4You"
       db 8 dup (0)

The input and password  must be at least 16 bytes long?

Link to comment

From wikipedia:

AES is a variant of Rijndael which has a fixed block size of 128 bits, and a key size of 128, 192, or 256 bits. By contrast, the Rijndael specification per se is specified with block and key sizes that may be any multiple of 32 bits, both with a minimum of 128 and a maximum of 256 bits.

Since pretty much everyone uses AES version (including tools4noobs) - password should be exactly 16/24/32 bytes long. :)
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...