Git Product home page Git Product logo

libaesni's Introduction

libaesni

Advanced Encryption Standard (AES) library using Intel AES-NI

libaesni's People

Contributors

amiralis avatar hellslicer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

libaesni's Issues

Bug with IV CBC functions

Hi I was using you library. Great work!!

But i notice some strange with the CBC even when the IV param is mark as "IN" in the prototype declarations

_AES_IN UCHAR *iv

I notice that the IV value is changed after call that function.

If we dont save the IV before call the functions we are going to lose our data.

Y made this PoC to show the bug:

`int main() {
unsigned char *data,*key,*iv,*enc;

data =(unsigned char*) malloc(32);
iv =  (unsigned char*) malloc(16);
key = (unsigned char*) malloc(32);
enc = (unsigned char*) malloc(32);

memset(data,'B',32);	//Idont care this now
memset(key,0xF0,32);	//Idont care this now

memset(iv,'A',16);		//I know need to be random, but just for this example

printf("Current data: %s\n",data);
printf("Current IV: %s\n",iv);
intel_AES_enc256_CBC(data,enc,key,2, iv);
printf("Current IV: %s\n",iv);		//Here BUG the current Value of IV was changed
intel_AES_dec256_CBC(enc,data,key,2, iv);
printf("Dec: %s\n",data);

}`

How does it perform?

Greetings, I'm a game developer looking to replace the small but slow AES API of my game with something much faster. The current API takes about 3 seconds for 576 KB of data on my PC (with an i5-13500). I stumbled upon your API which looked very straightforward to use so I'm curious, how well does your API perform particularly in comparison with the one I currently use?
Kind regards.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.