  We propose three private information retrieval (PIR) protocols for
distributed storage systems (DSSs) where data is stored using an arbitrary
linear code. The first two protocols, named Protocol 1 and Protocol 2, achieve
privacy for the scenario with noncolluding nodes. Protocol 1 requires a file
size that is exponential in the number of files in the system, while Protocol 2
requires a file size that is independent of the number of files and is hence
simpler. We prove that, for certain linear codes, Protocol 1 achieves the
maximum distance separable (MDS) PIR capacity, i.e., the maximum PIR rate (the
ratio of the amount of retrieved stored data per unit of downloaded data) for a
DSS that uses an MDS code to store any given (finite and infinite) number of
files, and Protocol 2 achieves the asymptotic MDS-PIR capacity (with infinitely
large number of files in the DSS). In particular, we provide a necessary and a
sufficient condition for a code to achieve the MDS-PIR capacity with Protocols
1 and 2 and prove that cyclic codes, Reed-Muller (RM) codes, and a class of
distance-optimal local reconstruction codes achieve both the finite MDS-PIR
capacity (i.e., with any given number of files) and the asymptotic MDS-PIR
capacity with Protocols 1 and 2, respectively. Furthermore, we present a third
protocol, Protocol 3, for the scenario with multiple colluding nodes, which can
be seen as an improvement of a protocol recently introduced by Freij-Hollanti
et al.. Similar to the noncolluding case, we provide a necessary and a
sufficient condition to achieve the maximum possible PIR rate of Protocol 3.
Moreover, we provide a particular class of codes that is suitable for this
protocol and show that RM codes achieve the maximum possible PIR rate for the
protocol. For all three protocols, we present an algorithm to optimize their
PIR rates.
