The scriptures have it that the works of God are done in the open for everyone to see and know, but the devil uses secrecy to hide all of his efforts. In 2 Nephi 26 we have: “ there are also secret combinations, even as in times of old, according to the combinations of the devil, for he is the founder of all these things; yea, the founder of murder, and works of darkness. … For behold, my beloved brethren, I say unto you that the Lord God worketh not in darkness. He doeth not anything save it be for the benefit of the world; for he loveth the world.” In Acts 26 Paul declares before Agrippa “This thing was not done in a corner.” And one final reference from Amos 3:7 “Surely the Lord GOD will do nothing, but he revealeth his secret...”
Understanding this principle Ignatius of Loyola gave some clarification for its application to the work of discernment of spirits.
[The evil spirit] acts as a licentious lover in wanting to be secret and not revealed. For, as the licentious man who, speaking for an evil purpose, solicits a daughter of a good father or a wife of a good husband, wants his words and persuasions to be secret, and the contrary displeases him much, when the daughter reveals to her father or the wife to her husband his licentious words and depraved intention, because he easily gathers that he will not be able to succeed with the undertaking begun: in the same way, when the enemy of human nature brings his wiles and persuasions to the just soul, he wants and desires that they be received and kept in secret; but when one reveals them to his good Confessor or to another spiritual person that knows his deceits and evil ends, it is very grievous to him, because he gathers, from his manifest deceits being discovered, that he will not be able to succeed with his wickedness begun. (Spritual Exercises, Rule 13 for discernment in the First Week.)
Now there are a few things that I would like to point out about this teaching and it's general implications. First, it may be noted that for most of Christianity there is a certain understanding of a need for confession with regards to sin. This is not what he's talking about here. He's saying that the enemy desires us to keep even the ways in which we are tempted a secret and that by revealing the secret to someone else we unmask the villainous plan and obtain some power over the temptation. And this goes beyond just temptation. It includes trials of any kind. How often do people afflicted with spiritual trials in life keep them a secret either because they are ashamed or feel like they shouldn't burden another with their problems? And yet the argument here is that this tendency towards secrecy is a method of diabolical deceit.
The second point to observe here is that the instruction leaves plenty of room for exercising wisdom and judgment in the manner of revealing the secret. There is no injunction to be completely open and make all temptations and trials public. There is no rule that one should confess to persons directly involved in the problem. It simply states a confessor, or another spiritual person. For example if a trial exists around angry feelings towards a family member, it is not necessary to reveal this to the family member if it is liable to create unnecessary problems in the relationship. One may safely choose to reveal the issue to a friend or spiritual leader and thereby gain strength against the enemy.
The third point deals with how it is that this process works. There is something about a secret that it does interesting things to the mind of the person who harbors it. In the case of secret emotions as temptations, it can be very difficult for a person caught up in them to see and understand them with clarity and objectivity. However, the second that one reveals them to another person there is the opportunity where one can hardly help but consider them from an outsiders perspective. It is an automatic human process that we model in our own minds what we expect others to think when we are communicating with them. And should the hearer be sufficiently spiritual, they can provide actual feedback, the sum of which will uncloak the deceits being used against the afflicted and destroy their influence.
A fourth point can be made in the fact that Ignatius does not specify the gravity of the “wiles or afflictions” in question. Though I think it can be seen clearly that this principle applies to help in preventing one from following through with temptations to commit serious crimes, I believe that it can also apply to smaller struggles according to the judgment and perception of the person in question. I read recently that sometimes just having an opportunity to talk to another person about one's spiritual life can be such a relief that what were before great trials seem diminished even to non-existence. It was recommended that when this occurs one ought to reveal the secret anyway and thus more completely destroy the temptation.
Finally I enjoy this passage from Doctrine and Covenants 123:13-14“... we should waste and wear out our lives in bringing to light all the hidden things of darkness, wherein we know them... These should then be attended to with great earnestness.”
Just something to think about.