Robustness of entanglement-based discrete- and continuous-variable quantum key distribution against channel noise