Dual layer hashing (random salted SHA3 1600 bits & 2048 bit RSA for security improvisation).
Libraries needed : Numpy
Program to get next prime number efficiently and fastly for getting RSA keys.
File containing progran is primegenerator.py. Here, function defined for getting next prime is next_prime.
File is KeyGenerator.py.
It has a class KeyGenerator containing all the three keys required for RSA encryption.
On initialization with Number Of Bits it gives us unique keys for RSA encryption.
It contains 3 variables 'e' and, 'n' as public key. And, 'd' as private key.
File is shasaltpass.py.
It has a class shasaltpass which contains the whole program.
It has two functions :
hashRegister : This encrypt string using random salts and returns hash embedded with salt.
hashVerify : It has two inputs string to be compared and hash. It extract salt from hash and using that hash generate hash. It return boolean value for whether generated hash and input hash are same or not.
Algorithm used is RSA.
It is done in order to secure the hash so that salt can't be easily extracted. Thus, giving user dual security as their own password and system generated unique password.
It has two functions :
encrypt : This generate salt embedded hash using SHA3 and then, using RSA it further encrypt the hash in order to hide salt. This gives us a new hash which is dually encrypted.
check : This decrypt encrypted hash and then use hashVerify method of shasaltpass to verify the password entered.
Loads EncDec class which contains final encrypt and check function.