private function getUserKey(PKEncryptionEnabledUserInterface $user)
    {
        $pkiKey = $this->findKeyByUser($user);

        if (!$pkiKey) {
            $userId = $user->getId();
            $userClass = $this->getUserClass($user);

            $pkiKey = new PKIPrivateKey();
            $pkiKey->setUserClass($userClass);
            $pkiKey->setUserId($userId);
        }

        return $pkiKey;
    }