Let the speed of the photon be c=299,792,458m/s. Then the rest mass of the photon is 0.
Proof
1. Relationship between relativistic energy, momentum, and speed
p=γm0vE=γm0c2⟹γm0=c2E
By solving these equations simultaneously,
p=c2Ev⟹v=Epc2
2. Relativistic relationship between energy and momentum of a particle
E=m02c4+p2c2
3. By 1 and 2
v=m02c4+p2c2pc2
At this point, since the speed of the photon is c, substituting into v=c gives
m02c4+p2c2pc=1pc=m02c4+p2c2⟹p2c2=m02c4+p2c2
At that point, the equation holds if either c=0 or m0=0, but since c=0, m0=0