Text this: Optimal device independent quantum key distribution