You really need to look up the Kirchoff principle
To be helpful, https://en.wikipedia.org/wiki/Kerckhoffs%27s_principle