I\'m working on an online event ticketing system, where users will be able to self print his tickets and show up at the event where it will be scanned (barcode) and ideally
For offline verification, I see only one easy solution..
Append to the ticket ID a hash of the ticket ID and a per-event salt. You can truncate any cryptographic hash to the size desired. I can't think of a particular reason to use anything but a random number for the base ticket ID itself.
This allows you to limit the size of the ticket ID and have a clearly proportional security in relation to the size of the ticket ID.