I am definitely not the first person to think of this device. Any naughty schoolkid who has ever snuck off between classes to have a sneaky cigarette has wished for this at some point.
The idea is to create a device that contains all the smoke emitted while smoking. That means it has to solve two problems:
The smoke from the burning cigarette
The smoke exhaled after taking a drag
I'm actually quite surprised that I haven't been able to find anything that attempts to tackle both those problems. The closest I came was Smoke Buddy, which is a personal air filtration system that seems to be quite effective at purifying the smoky air exhaled after a drag, but still does nothing about the smoke from the cigarette itself.
The device I have in mind would resemble the picture I added to this idea. The picture is simply of a cigarette container, but imagine something similar, where you could insert a cigarette snugly into a device, one button could light the cigarette, then after it is lit, another button could activate a small vacuum/fan which would suck up the smoke from the end of the cigarette into a storage compartment while also providing enough fresh air for the cigarette to remain lit.
The second part of the idea could simply be a separate device, like the Smoke Buddy, or another container with an attachment resembling a straw on the outside and a flap similar to what is found on the bottom of a vacuum cleaner on the inside, this will allow you to blow smoke through the straw into the container, lifting the flap with the air pressure, but once the smoke is inside it would not be able to escape because the flap simply closes as soon as you stop blowing.
Ideally, for the sake of convenience, this would be one small device that you could carry along with you and empty out in an appropriate place.
Not only would this benefit smokers by being able to smoke more freely, but non-smokers would also be happy to be rid of the secondhand smoke in areas that allow smoking.
I really don't think it would be too difficult to pull this off, I remember using empty bottles when trying to hide smoking at school and even though that system was far from airtight and refined, it was relatively successful. There's no reason why a device like this would not be able to contain all the smoke produced from both a cigarette and exhaling.
As cigarette sizes are pretty universal, such a device could pretty much be a once size fits all. The same concept could be used to produce similar products for pipes, king size cigarettes and even bongs. Rolled cigarettes and joints might be more difficult as they tend to vary in size.