The invention belongs to the field of Internet, and discloses a browser login
password encryption transmission method and
system, and the method comprises the steps: a
server generates a public key and a private key through an asymmetric
encryption algorithm, generates a random character string (random Key) through a random
algorithm, stores the random Key and the private key in a Redis
database in the form of a key-value pair, and sets a proper
expiration time; the browser obtains a public key and a random Key through a network request, encrypts the
password by using the public key when a user inputs an account
password, and sends the account, the random Key and the encrypted password to the
server; and after the
server receives the account, the encrypted password and the random Key, a private key is obtained in a Redis
database through the random Key, the received password is decrypted through the private key, and then
user information verification is carried out through the account number and the decrypted password. According to the invention, in an
unsafe environment, even if the network request is hijacked, the password input by the user can still be ensured to be safe and not cracked; and after login
verification each time, the secret key is immediately invalid and cannot be cracked by
brute force.