The invention discloses an identity
authentication method and device in a
smart power grid, and a storage medium, and relates to
smart power grid
terminal equipment, a
power grid server and a trusted center node. The scheme comprises three stages of initialization, registration and
authentication: initializing to determine hash, MAC and symmetric
encryption and decryption algorithms, and establishing block chain configuration; during registration, the terminal and the
server respectively generate a public key and a private key, and the {n, time, id} and the {N, time, ID} are registered to the block chain; during
authentication, the
server sends a public key, the terminal selects a random number and takes a
timestamp after checking the validity period, calculates four modular square roots corresponding to a hash result, determines the minimum square root, and encrypts by using a shared
session key to form an authentication message to be sent; the server calculates a
master key according to the private key, decrypts and verifies a
timestamp and on-chain registration, authenticates the terminal through a square relationship of a minimum square root and returns a response; and the terminal authenticates the server accordingly, and the two parties obtain an equal shared
session key. The scheme is light in weight and efficient, and has
correctness,
confidentiality and integrity.