Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Rijndeal 128, 192 , 256 example

Featured Replies

Posted

Hello


 


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


http://www.tools4noobs.com/online_tools/encrypt/


 


Key=Tuts4You


Text=Tuts4You


 


Result in hex


 


256= 18fa02ae57bfc4d9e1414c37d2d5e49898b1c6ce59a2a10fced00a36c6492f64


192= 521b4e49d550cfa20856c254cac7a199a670af2f7aeb8829


128= 37f9ce5d255f5b4fb7c66cefe4331e97


 


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


 


 


Regards,


raggy

Edited by ragdog

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"
  • 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?

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. :)
  • Author

AES version?


 


Gives a AES version for Masm?



aes.zip

Edited by ToMKoL

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.