Class hierarchies in Crypto Lib

Have been exploring the Crypto Library and deal with hundreds of header files I don’t even know yet how to use. Need to understand the class hierarchies (another OOP 😉 ), like this:

// pubkey.h - written and placed in the public domain by Wei Dai


/** \file

    This file contains helper classes/functions for implementing public key algorithms.

    The class hierarchies in this .h file tend to look like this:
                 / \
                y1  z1
                 |  |
            x2<y1>  x2<z1>
                 |  |
                y2  z2
                 |  |
            x3<y2>  x3<z2>
                 |  |
                y3  z3
    - x1, y1, z1 are abstract interface classes defined in cryptlib.h
    - x2, y2, z2 are implementations of the interfaces using "abstract policies", which
      are pure virtual functions that should return interfaces to interchangeable algorithms.
      These classes have "Base" suffixes.
    - x3, y3, z3 hold actual algorithms and implement those virtual functions.
      These classes have "Impl" suffixes.

    The "TF_" prefix means an implementation using trapdoor functions on integers.
    The "DL_" prefix means an implementation using group operations (in groups where discrete log is hard).