Trading securities based on material non-public information ("insider information") is illegal even if the person profiting from the trades is not an employee of the relevant company. In other words, if a golfing buddy (or a murder victim) gives a person material non-public information about a security, then that person may not legally profit from the trades.