The European Commission cannot divulge these algorithms. However, the structure of VAT identification numbers is given in the table below.
As it happened I was looking for a method of verification of the Greek VAT identification numbers. All I knew was that it was a check digit algorithm. The above quote from the EC/VIES site shows, the algorithms are somehow “secret”. But as the old saying goes “Information wants to be free“. All it took was asking over at twitter and a bunch of links were sent to me describing the verification method. From them the one by @stsimb stands out as it points to open source code by GSIS (General Secreteriat of Information Systems).
So please member States, publish your algorithms. Obscurity only delays the innevitable information release.