How many Rusted Keys do you need to get red items most of the time?

See the wiki for rusted key. Based on the scaling it is functionally impossible to get 100% chance for legendary. However for 100 keys, it goes up to 80%, which is solid. With 5000 keys, the chance for legendary is 99.60%.

Graph of the table below

The full table from the wiki looks like so:

Keys |  Common | Uncommon | Legendary
---- | ------- | -------- | ---------
1    | 79.21%  | 19.80%   | 0.99%
2    | 64.52%  | 32.26%   | 3.23%
3    | 53.69%  | 40.27%   | 6.04%
4    | 45.45%  | 45.45%   | 9.09%
5    | 39.02%  | 48.78%   | 12.20%
6    | 33.90%  | 50.85%   | 15.25%
7    | 29.74%  | 52.04%   | 18.22%
8    | 26.32%  | 52.63%   | 21.05%
9    | 23.46%  | 52.79%   | 23.75%
10   | 21.05%  | 52.63%   | 26.32%
15   | 13.22%  | 49.59%   | 37.19%
20   | 9.09%   | 45.45%   | 45.45%
50   | 2.23%   | 27.93%   | 69.83%
100  | 0.66%   | 16.56%   | 82.78%
1000 | 0.01%   | 1.96%    | 98.03%
5000 | 0.00%   | 0.40%    | 99.60%