thank you all for the response
the fact that they are in prison does not bother me at all. i believe everyone have rights, and just because they made a mistake once, doesn't mean they don't deserve a second chance. if these guys an invent something that can put others that commit their crime without a job, then ultimately less people will end up in jail. for example, a car thief invent a device that make all cars unstealable for the next 5 years, we'll probably see a huge decrease in car theft, and a lot less ending up in jail due to stealing cars.
also when a criminal invents something in jail to try to stop or reduce a crime from happening, he/she is making an contribution to society and will feel more confidence in themselves. So when he/she gets out of jail, instead of feeling sorry for themselves without a job prospect, they have experience building something useful and could get hired. for example a car thief that invented car-thief stopper thing that stopped car theft for 5 years might get a job with a car insurance company or car security company to design better or improve his invention with more resources. it's a win-win situation.
and it's proven that those that can get a job after leaving prison are a lot less likely to go back, it's the ones that get out of prison, have nothing to do, so they waste their time and end up doing something stupid that go back to prison. all nations can pretty much use this idea for non-violent crimes such as fraud and theft, because they are areas that criminals just know more about than the supposed security "experts".