/Lightweight_NoSQL

Harsh and encryption for NoSQL database.

Primary LanguageAssembly

Lightweight_NoSQL

Use assembly language to establish a hash. I use this established a small size NoSQL database. High search speed and run stable. Every line is optimized. Just like inc ebx. We don’t use add ebx,1. Because the former one is 10 times faster than the latter one.

The encryption and decryption function which can be used as adding access control on NoSQL database. With very low overhead. If add an agent between NoSQL database and user. So we don’t need to change codes of NoSQL database to achieve data encryption and access control.

First I attempt to add access control on NoSQL database. Recently, more and more companies have adopted NoSQL databases. But NoSQL is different with most widely used SQL. Most of them don’t have a schema and don’t support full SQL functionality. Sensitive data is stored in NoSQL databases with plaintext. Security issues become growing concerns. As the different structure of these two modes and NoSQL initially only focusses on speed, make it difficult to add access control on this new database system. So this research is find a tradeoff between the high speed and security. Store encrypted data with a low overhead. If we try to modify NoSQL database codes to add access control will cost lots of time. So I introduce an agent between NoSQL database and users. Assume one user wants to save data into database. Then the agent gets a packet from the user and check the user authorization level to decide whether this user can access to database. If so, the agent encrypt the data and send it to database. The encryption algorithm is AES which wrote in assembly language. Why use assembly language? Because even our modern compiler is intelligent to generate codes which seem to be good. But it still not intelligent enough to generate the best codes. So the speed of my encryption codes is extremely high. Encrypt 100000 times only need no more than 250 milliseconds. The encryption algorithm codes can be found on my Github. Address: https://github.com/hkhk366

Secondly, I made a lightweight NoSQL database before. The core part of a NoSQL database is its hash function. My hash function wrote in assembly language. Time cost depends on collision ratio, but approximately, call my hash function 100000000 times only needs 2 to 3 seconds. Even some modern NoSQL database wrote by C still can’t have this speed. Hash function codes can be found on my Github.