Abstract
Quantum key distribution offers another way, alongside public key cryptography, of establishing cryptographic keys. The usage of quantum mechanics provides a high level of security at the cost of key establishment efficiency. To help with that, we propose a new link cost function used for establishing best paths in order to minimize key consumption. We optimize its parameters using the artificial fish swarm algorithm. The findings demonstrate that this approach enhances the performance of the quantum key distribution network.