If I have the identity
$$f(a)f(b)=f(a')f(b')$$
for a given normalized probability distribution $f$, and additionally the constraint
$$a+b = a'+b' = const.$$
for any suitable pairs of real numbers $a,b$ and $a',b'$, would this be sufficient to conclude that
$$f(a)f(b)=f(a+b)$$
or are there further conditions required?
I know that the latter relationship implies that $f$ is an exponential function, but I would like to know which conditions are mathematically required for this, and I can't quite see how this would follow from the two conditions alone I mentioned.