Секрет: secret, know-how
One unexpected consequence of having a dog is that you instantly become the go-to person for anyone looking for an address in your neighborhood. You are clearly местная (local) or the more slangy здешняя (from around here), so you must know how to get to Polyclinic No. 586 or the much vaguer место, где уличный рынок по выходным (the place where there's a street market on the weekend).
Usually midway through my earnest and detailed instructions for how to get from here to there, it dawns on the lost Russian inquirer that a foreigner is giving them directions. Sometimes that disqualifies me in their eyes and they hurry off to find a real Russian. But sometimes they just grin and thank me, and then ask: Откуда вы, если не секрет? (literally, "where are you from, if it's not a secret?") That, in turn, always makes me grin. I mean, it's not 1937. Why would my nationality be a secret?
But here секрет isn't really a secret. It's a bit of information that I may wish to keep confidential. In English, we might express this as: Where are you from, if you don't mind me asking?
So what exactly is секрет, and how is it different from the native Russian тайна (secret)? As usual, that's a bit tricky — but not exactly secret.
Секрет is any piece of information or object that is confidential, private or kept hidden. Никому не говори, что она увольняется. Это пока секрет (Don't tell anyone that she's quitting. It's a secret for now.) Он мне сказал под большим секретом, что будет сокращение штатов (He told me in total confidentiality that there will be staff cuts). Не секрет, что она давно ищет другую работу (It's no secret that she's been looking for another job for a long time). Не надо делать секрет из кадровых перестановок (You shouldn't make a secret out of staff changes).
Секрет can also be some kind of know-how that is the secret to success of anything, from a cake recipe to a company's growth rates. Секрет моего соуса — чайная ложка уксуса (The secret of my sauce is a teaspoon of vinegar).
There's also секрет на весь свет (an open secret), also called among the literate crowd секрет полишинеля (the secret of Polichinelle, a standard character in French folk theater who always blabs everyone's secrets).
A mechanical секрет is some kind of security device. Замок с секретом is a security lock. Those special bolts you put on your car wheels to keep people from stealing them are called секретки (disc or wheel locks).
Тайна is also something that is hidden or should not be disclosed, but it seems to be used for secrets that are more substantial or would have greater consequences if revealed, like государственная тайна (state secret). It can also be secrecy, as in тайна исповеди (seal of confession) or тайна переписки (secrecy or privacy of correspondence).
Тайна can also be used to describe know-how, but it's usually in the plural and sounds a bit lofty: Это тайны творчества (That's the mystery of creation).
Unlike секрет, тайна can be something not just unknown or hidden but unknowable, like тайна природы (the mystery of nature).
As far as my nationality goes, it's not hidden, unknowable or even the key to my success. My answer will be: Что таить? Я американка. (What's there to hide? I'm an American.)