This blog will be about Argon2, a password hashing function implemented on a C programming language. The main focus will be using a hash type function in the C programming language to test and try to optimize the program.
I have tried to find other hash function programs like lua-md5 and rust-md5-o-matic. Those package is either unsupported or does not include the source code (src directory).
The following link will be where I will get the files to experiment with:
NOTE: I will be mainly focusing in the src directory where the source code is located.
The Argon2 password hashing function is a package available to the aarch64 Fedora 28 Linux system. This package also have some inline assembler code.
The inline assembler code is for reserving the memory location in the hardware. The code is also supported in the C programming language.
Initial Testing Stage(Base Program):
- I will check how many files contain inline assembler code
- I will check how many files already use the assembler coding language (File extension: s or S).
- I will check how many files use the C programming language(File extension: c).
- I will use a profiling tool to check how optimized the program is in the current build package(Can be gprof, stap, etc.).
- I will try to build the program from the src directory in the aarch64 Fedora 28 Linux system. The src directory has a Makefile included so I will try to edit it to my requirements.
- I will test the program multiple times to check consistency of the program. I will also create a password file to test the Argon2 password hashing function. (The password will be random generated using an alternative method, like a Microsoft Excel formula)
- I will change a character in the password file to check if there is a major change to the program. I will also test if changing few or many characters in the password file will affect the program’s performance. The requirements/variables that I will use for the test are: compile time, program run time, file size, and program produced result.
Modified Testing Stage(Modified Program):
- I will change some of the code in the base program to attempt optimization. The changes can be algorithm changes, new inline assembler code, or removing unnecessary code.
- I will run the changed program multiple times to check if there are any bugs or problems compared to the base program. The testing requirements/variables are: compile time, program run time, file size, and program produced result.
- I will test if the GNU C program compiler is able to further optimize the changed program by using optimization levels 0 to 3.
- I will compare the results of the modified program and the base program.