Has a Pope ever secretly canonized a saint? We know that at certain times a Pope has created a cardinal of the Catholic Church "in pectore" (in the heart). This simply means that the Pope, in creating a cardinal in such circumstances, chooses not to publish the new prelate's name publicly due to some political (or other) reason. His name remains known only to the Pope until such time as he can announce the cardinal's name publicly.

Has this same process ever been applied to the canonization of a saint "in pectore"?
No, such a thing would not be possible.

The Pope cannot unilaterally canonize anyone. That would completely miss the point of declaring someone a saint, which is to present their lives as a public example of heroic virtue for Catholics to imitate.


  By canonizing some of the faithful, i.e., by solemnly proclaiming that they practiced heroic virtue and lived in fidelity to God’s grace, the Church recognizes the power of the Spirit of holiness within her and sustains the hope of believers by proposing the saints to them as models and intercessors.


(Catechism of the Catholic Church, paragraph 828) 


  When we look at the lives of those who have faithfully followed Christ, we are inspired with a new reason for seeking the City that is to come and at the same time we are shown a most safe path by which among the vicissitudes of this world, in keeping with the state in life and condition proper to each of us, we will be able to arrive at perfect union with Christ, that is, perfect holiness.


(Lumen Gentium, section 50)

There would therefore be no purpose in canonizing someone if their life, and thus their name, could not be held up as an example from that moment. 

Further,there is an extended process to be adhered to before anyone is formally declared a saint. This includes includes among other things arrangements for a formal investigation into the person's life, usually by the bishop of the person's diocese, a request for a declaration of sainthood by the Congregation for the Causes of Saints, and a formal declaration by the Pope that the person is indeed a saint. (See the Wikipedia article for a reasonable summary of the process, with good source notes.) It's very difficult to see how such a process could be carried out without anyone but the Pope knowing the name of the one declared a saint.

There is a parallel process for the formal declaration of sainthood of someone who has long been considered a saint in some particular area; this is known as equipollent canonization (from Merriam-Webster: "equal in force, power, or validity"; that is, equally valid with the usual type of canonization). Nevertheless, being a canonization, it also requires a formal declaration from the Pope; and again, it's hard to see how this could be done without anyone knowing the person's name.