Robert,
Your project sounds like it will be a fine addition for the community.
You should be aware that the PEM specs are undergoing revision, so it
would be useful to read the internet draft as well as the existing
RFCs. The principal changes are:
o integration of MIME and PEM
o opening up of the naming system to accommodate email addresses and
other strings as identifiers in PEM
o separation of mechanism and policy with respect to the certification
of bindings between names and keys.
With respect to the first point, MIME provides boundary and transfer
encoding mechanisms, so that aspect of 1421 will not appear in the new
spec. Signature and encryption are now entirely independent, and the
protected text is now kept separate from the "pem headers."
Signatures come after the body. (To facilitate one pass processing,
the identifier for the signature algorithm is at the top.)
Good luck. We, and others on this list, will be delighted to test
interoperability with you.
Steve