There are whole laws that are classified and cannot be discussed in open court. Ignorance of the law is no defense when you are charged with violating a law and that’s still true in the USA even if the law is classified and you are not authorized to know what it says.
Check out Gilmore v Gonzales for an example: https://en.wikipedia.org/wiki/Gilmore_v._Gonzales