Lambertian Shading of a cube In theory I can't use a lambertian shader on a cube, because there aren't surface normals on the edges.

Is this correct ?

Why is this always possible in software applications ?
Each cube face is made up of a quad, or two triangles.  Let's take 3 points from either the quad, or one of the triangles, and call them $A,B,C$.

You can get the normal to this surface by normalizing the cross product of $\overline{AB}$ and $\overline{BC}$.  You can then use that surface normal to calculate lighting.

You can do similar calculations to get the tangent and bitangent to then calculate $u,v$ values for texture mapping.

I'm not sure why the edges not having normals makes you think you can't calculate lighting for the cube faces, but you totally can.

You could even use the vertices to calculate a normal for the edges if you wanted, but I'm not sure why you would want to do that :P