The embodiment of the invention provides a two-section type login method and
system. The method comprises the following steps: firstly, receiving an encrypted random number acquisition request which is sent by a user side and comprises an account name, a user side public key and a
timestamp through a
server side, immediately acquiring a source random number of a corresponding account from a user center, and encrypting the source random number by using the user side public key to generate an encrypted random number; and dynamically acquiring a
server-side public key with timeliness from the key center, returning the
server-side public key to the user side, and when an external login request is received, generating a unique login identifier based on the server-side private key, the encrypted
ciphertext and the
timestamp, and storing the unique login identifier to process login
authentication. In the service request stage, the legality of the request and the
data integrity are ensured through the
verification identifier, the
timestamp and the message entity MD5 calculation value. Through the
processing process, on the premise that an original
system permission system is not changed, repeated input of the login
certificate is avoided, a safe and efficient login solution is provided for small applications, and therefore the safety of the
system is remarkably improved.