The security of current authentication protocols is challenged by quantum attacks, in this regard, this paper designs a security mechanism based on Kyber and Dilithium algorithms to ensure data security, and in order to realize quantum-resistant lightweight authentication, a key negotiation (AKA) protocol is designed to protect the communication between the 6G terminal device and the fog node. The authentication scheme constructed based on Dilithium and Kyber algorithms is tested experimentally, and the experimental results show that the scheme has high security and good performance. The AKA protocol based on Dilithium and Kyber algorithms proposed in this paper is compared and experimented with PSK and ECDHE based on traditional public key certificates, and PBC protocol based on identity, respectively, in terms of communication overhead and key negotiation connection time. Under the premise of guaranteeing security, the number of key negotiation messages to be transmitted by the AKA protocol scheme is 6, which is better than PSK and ECDHE, and the key negotiation connection time of the AKA protocol scheme is 22.61ms, which is significantly better than the other protocol schemes. This scheme significantly reduces the communication overhead and connection delay while ensuring high security, and is suitable for resource-constrained 6G terminal equipment scenarios.