Addition is a bad idea:
Suppose the prime field W is 7, X is 2 and and Y (the secret answer) is 42.
- ( X + Y = 44 ) % 7 = 2
- Attacker cannot know Y from W and 2 and X. Instead he now knows only 3 bits of Y. Y can be any value that modulo 7 is 2.
- Y remains "3-bit secure"
Now you decide to use a new X, with value 4.
- X + Y = 19 % 7 = 4
- Attacker still does not know Y, but can now perform this operation F(X,Y,W) even if Y is not known.
This makes the function F essentially useless for cryptography ... unless it is done only once ever.
Multiplication is a little better... but only if you choose safe values for W and Y
- W cannot be a factor of Y.
- 7 is a factor of 42 .... and so any choice of X will result in zero... again rendering the function useless.
- The only safe value to choose for Y would be a prime
If Y is prime, half the bits of your secret are safe under multiplication by X, even if the attacker had access to a F(X, Y, W) machine.
But it's still fairly useless, because although you don't know Y, the attacker now has the ability, by using the inverse modulo, to produce an "equivalent Y" under a fixed prime field. Varying the prime field solves this but blows up the problem into a terrbily expensive protocol.
The correct solution is to do your math "in the exponent.