After public school officials in Canon City, Colo., discovered at least 100 students had been using their cellphones to swap nude photos of themselves, the Associated Press reported that “it could take a month to sort the offenders from the victims.”

Part of the challenge is that Colorado, like many states, makes no such distinction: If you’re under 18 and take a sexually suggestive picture of yourself, you’re both victim and offender.

Thom LeDoux, the district attorney, says he doesn’t plan to treat all of the Canon City High School students involved in sexting as child pornographers, and “it is possible there will be no criminal charges filed at all.”

But teenagers who exchange consensually produced pictures should not have to rely on prosecutorial forbearance to avoid being branded as sex offenders.

Under Colorado law, producing or distributing sexually explicit images of a minor is a Class 3 felony, punishable by four to 12 years in prison. Merely possessing such pictures is identified as a Class 6 felony, punishable by 12 to 18 months in prison.

Possession becomes a Class 4 felony, punishable by two to six years in prison, if it involves video or more than 20 still images.

In addition to the criminal penalties, people convicted of these crimes have to register as sex offenders. “I take the implication of that very seriously and would urge that only if I felt it was absolutely necessary,” LeDoux said.

At the same time, LeDoux highlighted the legal peril for not just students but their parents. After Canon City School Superintendent George Welsh urged parents to examine their kids’ cellphones for evidence of sexting, the district attorney noted that doing so could implicate them in felonies.

‘‘For parents that may be having conversations with their children or reviewing cellphones as the superintendent recommended,” LeDoux said, “they need to understand that continuing or ongoing possession of these materials does constitute a very serious crime for the adults and for the children.”

In fact, since Colorado’s exemptions for possessing “sexually exploitative material” are limited to peace officers, court personnel, physicians, psychologists, therapists and social workers, even school officials who confiscate students’ phones theoretically could be charged with felonies.

Although LeDoux promises restraint, other prosecutors have been less wary of filing child pornography charges in sexting cases.

In 2010, eight “sexters” at a high school in Harrisburg, Pa., were charged with felonies. Two months ago, North Carolina prosecutors charged a 17-year-old with sexual exploitation of a minor after he and his girlfriend exchanged photos.

Laws like Colorado’s should be updated to preclude such prosecutions. According to the Cyberbullying Research Center, 17 states have amended their child pornography laws to decriminalize sexting by minors or make it a misdemeanor, although three still allow felony charges in certain circumstances.

Except when coercion is involved, it makes little sense to treat sexting as any sort of crime. “Consenting adults can do this to their hearts’ content,” LeDoux said. “If the subject is under the age of 18, that’s a problem.”

But if a teenager isn’t old enough to sext consensually, how can he be old enough to sexually exploit a minor who agrees to be photographed, especially if that minor is himself? Adding to the confusion, the age of consent for sex in Colorado is 17 in general, 15 if the other party is no more than 10 years older, and even younger if the difference in age is four years or less.

In other words, it is unambiguously legal for teenagers in Colorado to have consensual sex with each other or even with partners in their early 20s. But sending each other pictures of their private parts is a felony.

The New York Times reports that “the ‘sexting scandal,’ as parents are calling it, shocked many.” The real sexting scandal has less to do with the way teenagers use their cellphones than with the way adults respond to it.