About tuning and dieselgate: university researchers did eventually use tuning software to look at the Dieselgate calibrations (they were probably here on Nef at some point or another on their journey!), but the funniest thing about dieselgate was that the whole thing was in the A2L+FR for EDC17 the whole time, it was just called "acoustic function" :
http://cseweb.ucsd.edu/~klevchen/diesel-sp17.pdf .
Anyway, those researchers weren't the ones to find and expose the dieselgate scandal anyway - the VW scandal was originally found by a nonprofit called International Council on Clean Transportation, and it was found the old fashioned way by using tailpipe sniffers. They weren't even looking for an emissions cheat - they were just trying to figure out how USDM diesels were supposed to be so much cleaner than EUDM ones.
The constant parallels on forums and elsewhere between dieselgate and tuning are interesting to me, because as far as I can see it there is really limited to no link at all between the two. Dieselgate had nothing to do with OBD or CAN, nothing to do with aftermarket tuning or aftermarket emissions defeat, and wasn't found by tuners. It was a simple mapswitching function added by VW and Bosch to fudge the US emissions testing system using drive pattern heuristics, and it was found using tailpipe sniffers.
The only tuning related thing that came out of the VW scandal is the EU checks for CVNs. These started because the EU regulators were worried that people wouldn't bring their diesels in for the software update. And they were right, because who would want to given the choice?
The US tuning crackdown, meanwhile, can be directly attributed to idiotic "coal rolling" diesel tuners - they're who the EPA went after first, and now that they've hit the "low hanging" fruits there it's onto the gas crowd.
Anyway, as for CVN - as prj pointed out, it's just an arbitrary set of bytes attached to an OBD-II handler "09 06", required in the US since MY2005. The regulators in various countries maintain a database of "valid" CVNs given certain criteria, which they're provided by the manufacturers. In some places the CVN database is keyed on Calibration ID (another arbitrary set of bytes in OBD-II land, "09 04"), in others on VIN or model year.
The CVN itself is often just a CRC32 but can also be pretty much any checksum routine - the regulatory requirement is just that it's unique for any given ASW+CAL byte sequence. It can, of course, be patched at the handler level or manipulated using checksum tricks, but this comes with stiff legal penalties if discovered in the US. Meanwhile, in the EU several vendors like Alientech openly advertise CVN replacement as a feature, so go figure.