Kerckhoffs's principle
A cryptographic system must remain secure even if the enemy knows everything about how it works: the only secret must be the key.
The opposite is called 'security through obscurity': the program is secure because nobody knows how it works. It lasts precisely until the first curious person with a free afternoon.
Kerckhoffs reasoned like a soldier: devices get captured, manuals copied, spies bribed. If all the security lies in the secrecy of the mechanism, one theft and you lose everything. If it lies in the key, you change the key and start again. That's why serious algorithms are public and studied by everyone.
My uncle protects his cellar with a top-secret system: the key under the geranium pot. The system is obscure, but the whole village knows it. On Sunday someone left him a note: 'Excellent salami, good vintage.' Security through geraniums: not recommended.