Author Topic: Basic AES-NI example  (Read 5245 times)

peter_asm

  • Regular Member
  • *
  • Posts: 46
Basic AES-NI example
« on: May 17, 2014, 07:07:38 AM »
Just a bit of messing around earlier today with AES-NI for those want a look.
Using ml64 and 64-bit C compilers from Windows SDK so yep, it's in both C/ASM but the example is very basic using CBC mode.
« Last Edit: May 18, 2014, 08:40:23 PM by peter_asm »

cpu2

  • Regular Member
  • *
  • Posts: 28
Re: Basic AES-NI example
« Reply #1 on: May 18, 2014, 01:02:28 PM »
Great code is small and faster, the problem is compatibility. And no offense, with white papers intel is easier to implement.

Regards

peter_asm

  • Regular Member
  • *
  • Posts: 46
Re: Basic AES-NI example
« Reply #2 on: May 18, 2014, 01:58:48 PM »
Yes, I know, no offense taken  :biggrin:
I'm still interested in your finished code but haven't looked into how AES works and can't contribute.

Gunther

  • Member
  • *****
  • Posts: 3585
  • Forgive your enemies, but never forget their names
Re: Basic AES-NI example
« Reply #3 on: May 18, 2014, 07:25:29 PM »
Hi peter_asm,

good example, but I think the cpp source is VS specific.

Gunther
Get your facts first, and then you can distort them.

peter_asm

  • Regular Member
  • *
  • Posts: 46
Re: Basic AES-NI example
« Reply #4 on: May 18, 2014, 08:41:26 PM »
Gunther,

Added a macro for it to compile with mingw (assuming that's what you're using)
The aes.asm can assemble with nasm too using some minor changes.

Gunther

  • Member
  • *****
  • Posts: 3585
  • Forgive your enemies, but never forget their names
Re: Basic AES-NI example
« Reply #5 on: May 18, 2014, 08:55:36 PM »
Added a macro for it to compile with mingw (assuming that's what you're using)
The aes.asm can assemble with nasm too using some minor changes.

 :t Thank you.

Gunther
Get your facts first, and then you can distort them.

cpu2

  • Regular Member
  • *
  • Posts: 28
Re: Basic AES-NI example
« Reply #6 on: May 19, 2014, 10:44:00 AM »
Yes, I know, no offense taken  :biggrin:
I'm still interested in your finished code but haven't looked into how AES works and can't contribute.

Don`t worry,  when you have finished the part decrypt the show.

Regards.