Posted February 15, 201411 yr Hello I want a example about Rijndeal 128, 192 , 256 in Asm,CppNow have i searched many hours but without good results. I found this drizz cryptohash.lib but with differents results as this pagehttp://www.tools4noobs.com/online_tools/encrypt/ Key=Tuts4YouText=Tuts4You Result in hex 256= 18fa02ae57bfc4d9e1414c37d2d5e49898b1c6ce59a2a10fced00a36c6492f64192= 521b4e49d550cfa20856c254cac7a199a670af2f7aeb8829128= 37f9ce5d255f5b4fb7c66cefe4331e97 Can your send code examples in Asm or Cpp?!? Regards,raggy Edited February 15, 201411 yr by ragdog
February 15, 201411 yr 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 97which is the same as tools4noobs output 37f9ce5d255f5b4fb7c66cefe4331e97Totally 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 startCompile, step over RijndaelEncrypt in a debugger and examine contents of "output"
February 15, 201411 yr Author 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?
February 15, 201411 yr 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.
Create an account or sign in to comment