Note to readers: Nothing that follows should be construed as legal advice. For specific matters and cases seek legal counsel.

Pop quiz: How can you commit a crime without having any idea you've broken the law?

Answer: Ask your friends for stock tips. Odds are sooner or later you'll fall afoul of Section 10(b) of the 1934 Securities and Exchange Act as enforced by the SEC through rules steadily promulgated over the 20th century and interpreted by the Supreme Court in a series of (often vague) interpretations.

Otherwise known as insider trading.

What Is Insider Trading?

Insider trading is using information not publicly available and which you received illicitly to make trade decisions. The American Bar Association defines the elements of insider trading as:

[T]he purchase or sale of a security of any issuer, on the basis of material nonpublic information about that security or issuer, in breach of a duty of trust or confidence that is owed directly, indirectly, or derivatively, to the issuer of that security or the shareholders of that issuer, or to any other person who is the source of the material nonpublic information.

Let's break that down into its component parts.

"The purchase or sale of a security of any issuer…"

You must have actually made or benefited from a transaction involving some regulated security. Note that this element does not require you to have actually been the one to push the button. It is still insider trading if you tip your cousin and have him make the trade.

"[O]n the basis of…"

You must have made this trade because of information you knew that was not generally available to the market. This is called mens rea, or your intent to commit the crime.

As we'll discuss below, "on the basis of" is one of the things that makes insider trading so tricky. While intent is one of the biggest grey areas in criminal law, insider trading tries to make the issue simple. If you were aware of material nonpublic information when you executed the trade, the court can presume you did so because of what you knew.

"[M]aterial nonpublic information…"

This is the heart of insider trading. Material nonpublic information is the information relevant to your trade which is unavailable to the general public.

Information is "material" if it creates ""a substantial likelihood that the disclosure of the omitted fact would have been viewed by the reasonable investor as having significantly altered the 'total mix' of information made available." Or, as some lawyers put it, if this information would be likely to affect a reasonable trader's decision to buy, sell or value the security.

Information is nonpublic if it is not available to a general trader through ordinary means or if it has not been disclosed to the general public. While broad dissemination is not required for information to be considered "public," it also isn't enough to have told a finite number of people. As a general rule, the information must be equally accessible to all investors.

"[A]bout that security or issuer…"

This nonpublic information must have related to the security you traded or the entity which issued it. If you possess insider information on one security and trade a completely different one, there is no crime.

"[I]n breach of a duty of trust or confidence that is owed directly, indirectly, or derivatively, to the issuer of that security or the shareholders of that issuer, or to any other person who is the source of the material nonpublic information"

Either you or the person who gave you this information must have had a duty not to disclose it or some other form of fiduciary duty to the entity which issued the security. We will discuss this further below in our section on insiders.

Why Is Insider Trading Illegal?

To keep the market fair… sort of. As described by the American Bar Association's White Collar Newsletter, this is an area that even many lawyers get wrong.

It is true that the offense is designed to prevent dishonest securities trading practices that unfairly benefit key employees by allowing them an unfair advantage via exploiting private information to which the general investing public has no access. However, the central principle supporting the proscription of insider trading lies in its deception rather than the involvement of private information.

Insider trading is in part about keeping the market fair. The SEC wants all traders to feel like they participate on a level playing field, and without insider trading laws that wouldn't happen. Individual officers of a company would profit from information that no one else could access. This would distort financial markets, rewarding nepotism and stock manipulation more than efficiency.

However, even more than the issue of efficiency, at its heart insider trading is about deception and breach of fiduciary duty. When the insider acts on their information, or when they give it to someone else to act on, they do so despite their duty to the company. They're keeping a secret from the firm which doesn't want traders acting on this information yet.

This takes advantage of the trust placed in them by a company's owners and shareholders. That breach of trust is the heart of why insider trading is illegal.

The Mens Rea Difference

Insider trading is one of the very, very few crimes that you can commit accidentally. To understand that, we need to understand mens rea.

Mens rea literally means "guilty mind" in Latin, a language beloved of lawyers and doctors because they think it makes them fun at parties. (It does not.) In practice it means the mental intent necessary to commit a crime. This is an element of virtually all crimes in the United States. To break the law you must understand the nature of your actions and intend to carry them out.

Take, for example, grabbing someone's wallet off a table. It's theft if you know you've taken another person's wallet. It's an innocent mistake if you thought it was yours. Theft requires the intent to take something that you know does not belong to you.

Note that the old saw "ignorance of the law is no excuse" still applies. It doesn't matter whether you knew it was illegal to take someone else's wallet, just that you knew you were doing so.

Here's where insider trading gets tricky (one of the many places). The crime of insider trading is complete once you use material nonpublic information acquired through trust or confidence to make a trade. You don't have to actually know that your information violated any trust or fiduciary duty.

From the perspective of the SEC and federal courts traders have a duty to source their information and check to see whether it's legitimate to act on. If you don't or can't do so, then you shouldn't make the trade. As a result they impute knowledge and responsibility to the trader.

If you receive a stock tip, for example, or hear a buzz going around the office you might jump on your portfolio to try and make a few trades. In doing so, you might break the law.

It's not possible to mistakenly steal a wallet. Good faith error absolves you of the crime of theft. The same isn't true of insider trading. It is one of the very few crimes that you can commit without even realizing you've done it.

Vagueness of Insider Trading

The other issue that makes insider trading so tricky to quantify and enforce is the law's vagueness. Courts and prosecutors define the terms of insider trading, at times, situationally.

This is almost unique in criminal law. In almost all other areas of criminal prosecution the courts require that a subject be defined with absolute clarity. If the state wants to send you to jail it first has to make very clear what you should and shouldn't do. (Put another way, prosecutors can't define your crimes after the fact.)

This isn't quite so with insider trading. While the SEC has defined the elements of the crime, "material nonpublic information" remains a vague term. In fact, as the ABA explained in a report for its 2012 annual conference:

The Supreme Court has cautioned against applying brightline rules and rigid formulas for materiality, holding that "[a]ny approach that designates a single fact or occurrence as always determinative of an inherently fact-specific finding such as materiality, must necessarily be overinclusive or underinclusive."

There are certain types of information that the SEC recommends that traders review carefully for inside status, such as earnings information, offers, new products or discoveries, etc. But the courts reserve the right to decide materiality based on the nature of the information traded upon.

The same is true of nonpublic status. Information published in a newspaper or a generally disseminated prospectus is certainly public. Information held only by officers of the company and not shared with anyone else is certainly nonpublic. The line in between those two is blurred. The courts have ruled that something isn't public just because someone outside the company knows, but you also don't have to shout it from the rooftops.

Like intent, regulators generally handle the vagueness of insider trading laws through prosecution decisions. Someone who made a good faith error may receive little or no punishment beyond having to return the money they made. Someone who really should have known better might face a lengthy prison sentence.

It's also important to point out that there is some dispute on the subject of vagueness. For a counterpoint, see Stephen Diamond with the Santa Clara University of Law in the Financial Times.

Insiders, Misappropriation, Tippers and Tippees

In addition to materiality, the essential question of insider trading is breach of duty. It is not illegal to trade on insider information unless you have some duty not to.

But… the odds are very good that if you have inside information, you probably have an obligation not to use it.

1. Classic Insider

The classic theory of insider trading holds that someone cannot act on information if they owe a duty of trust or confidence, or any other form of fiduciary duty, to the company which issued the traded security. This can include someone with a temporary fiduciary duty to the company such as hired accountants and consultants.

So, for example, a corporate officer couldn't learn about a series of office closings and run right out to short the company's stock. The same would apply to an accountant hired to help liquidate those offices' holdings.

The easiest way to think of the classic insider is this: If you received this information as part of your job and it relates to your employer or client, then you are probably an insider.

2. Misappropriation

Misappropriation insider trading happens when an outsider (someone who is not a classic insider) trades on insider information that he acquired due to a fiduciary duty owed to the source of that information.

The classic example of misappropriation is an attorney in a law firm who learns material nonpublic information about a non-client and uses that to make trades. In this case, the lawyer would owe a fiduciary duty to his firm and not the targeted company, so classic insider trading wouldn't apply.

However, he still engaged in these trades through deceptive practices, taking advantage of the trust placed in him by his law firm.

In essence, if someone has trusted you with this information you probably shouldn't trade on it.

3. Tipper/Tippee

An insider doesn't have to actually conduct any trades themselves to commit insider trading. If an insider gives an outsider material nonpublic information, or "a tip," this becomes insider trading when the outsider acts on it.

This is known as tipper/tippee liability. That is not a typo. The formal term rhymes with yippee, drippy and why-couldn't-they-have-called-it-recipient-ee.

The tipper commits insider trading as soon as the tippee trades based on the insider information. The tippee commits insider trading if they get a tip from an insider, have reason to know and understand the source of the information, and make a trade based on it.

The tippee must understand and know the source of their information because it establishes the deception necessary for insider trading. The Supreme Court has held that as long as the tippee knows that their information came from an insider source then they know or should know that there has been a breach of duty to the targeted company. This then creates a duty to that company on the part of the tippee, which they breach by trading.

Now, there technically is a final piece of this puzzle. The tipper (the insider) must in some way benefit from the trade. Historically lawyers have interpreted this to mean that the tipper has to benefit financially (essentially, they have to get cut in on the deal). A 2016 Supreme Court decision reduced this requirement significantly, to the point where the tipper's "benefit" can simply be the fact that they did something nice for a friend. The benefit rule establishes that the tipper and tippee need to have a relationship with each other.

So, for example, let's say your cousin works in research for a large company. He knows that they're about to roll out a new product line, so over drinks he tells you to buy up as many shares of stock as you can. You do so and make a killing. Both of you have committed insider trading even if you don't share the money.

4. Outsider

You are an outsider if you meet none of these conditions.

This is an essential piece of insider trading that many people get wrong. The key element of insider trading is not the information. It is the fiduciary relationship breached when an insider uses that information. If you don't owe a duty to the targeted company or receive your information from someone who you know to owe a duty to the targeted company, you can generally use insider information without breaking the law.

Take our example above. Instead of receiving the information from your cousin, you're out for drinks one night and overhear a stranger talking about the new product launch. It sounds good so you buy some stock. You're in the clear because you have no way of knowing who this person is or how he got this information.

This is also true if you get the information accidentally. Let's say you overhear your cousin on the phone in a legitimate accident by all parties. Again, there is no insider trading because your cousin does not benefit from your trade. He didn't give you a gift or intend for you to get this information, so you're both probably in the clear.

With insider trading, frankly, the line between luck and felony is pretty blurred. As a general rule, though, if you get information and have no relationship with the source then you can probably use it. Otherwise, it's probably illegal.

It's never too late - or too early - to plan and invest for the retirement you deserve. Get more information and a free trial subscription toTheStreet's Retirement Dailyto learn more about saving for and living in retirement. Got questions about money, retirement and/or investments? We've got answers.