It really shouldn't be overflowing based on the arithmetic, but you can try using the unchecked statement/operator. I'm sure there's some option in the compiler to default to truncate if overflow, but I don't know it, because I've never needed to find it.
Code:
unchecked
{
i_key1 = (byte)((0x0F + (byte)(i_key1 * 0xFA)) * i_key1 + 0x13);
i_key2 = (byte)((0x79 - (byte)(i_key2 * 0x5C)) * i_key2 + 0x6D);
}
or
Code:
i_key1 = unchecked((byte)((0x0F + (byte)(i_key1 * 0xFA)) * i_key1 + 0x13));
i_key2 = unchecked((byte)((0x79 - (byte)(i_key2 * 0x5C)) * i_key2 + 0x6D));
Edit: "Note that Visual Studio does not turn on overflow checking by default in either release or debug builds. You need to turn on the Check for Arithmetic Overflow setting in the Build Properties for the project - but make sure you have the Debug configuration selected when you do this."