The "legal name" of a child (or adult for that matter) is, strictly speaking, the name by which they are known.
It is worth remembering that until the 1960s birth registrations did not explicitly allocate a surname to a child. The "Name" column on the birth certificate used to contain only Christian name(s) and it was only in the index entry that the father's surname (or mother's in the case of illegitimate births) was tacked on to this.
In modern times, our obsession with documentary proof of identity has meant that using a name not on ones birth certificate causes severe problems. Combined with more complicated family situations these days, this has resulted in some relatively new and very complex rules regarding birth registration.