There isn't a unified way of doing DRM in the ePub format. The standard includes the provisions to bolt DRM into it but there isn't a set DRM technology as part of the standard. The retailer has to employ their own DRM system be it a commercial one or a custom one
Okay, but there seems to be an agreement in epub world on how the DRM is done, or at least it was when I still had a Sony ereader. You got your AdobeID, set up your Adobe Digital Editions and your ereader with it and used the AdobeID when purchasing a book. If Adobe provides the encryption as a service or how it is done, I do not know, but the result is that regardless where you bought a book it is readable on your reader. Amazon's model is similar to Apple's app store, all (DRM-ed) content goes through them and there's no other way except not using DRM at all.