I'm looking for a word that describes an idea that is often held out as true or used as a rationale though in fact the opposite is true. Something like "common misconception" or "antipattern" come close, but I feel as though there's a better word I'm missing.
Examples:
"Refusing to use popular security algorithms because everyone knows how they work is a [word], since it is because everyone knows how they work that they are so safe."
Not necessarily saying I 100% agree with the following, but someone who advocates for Keto might say this:
"Trying to lose weight by cutting out fat is a [word], because replacing carbohydrates and proteins with fat allows the body to enter ketosis, which is one of the best states for losing weight."
Thanks in advance.