Key management is an essential part in designing secure and reliable cryptography scheme. In the paper, we analyzed the basic interacting protocols for key management on RSA asymmetric cryptosystem and presented an improved authenticated encryption scheme based on ECC (elliptic curves cryptosystem). In the scheme, the essential parameters for key generating and distribution are transmitted with authenticated algorithms, the generation and distribution of master key is connected with the identity information of key distributing center and valid users. The attack on the authenticated cipher-text and the secret parameters via public information is equivalent to ECDLP (elliptic curves discrete logarithm problem), which is computationally infeasible without polynomial algorithms. The utilization of random encryption in key generating renders effective protection for the secrecy of private keys and the identity information of key applicants. Compared with traditional schemes, key management with optimization has much superiority in security and efficiency for hardware and software application.