[foaf-protocols] The case for massive simplification and foaf:key
nathan at webr3.org
Tue Sep 21 14:16:38 CEST 2010
Melvin Carvalho wrote:
> The simplicity of this solution does seem to stand out, to my mind.
> Now that we have the ASN.1 parser in PHP I'll be happy to support this
> structured format, with the proviso that the namespace is not yet decided,
> tho foaf sounds logical to me. (I was even mailed an offer to patch
> libAuth, this morning)
FYI, you don't need any ASN.1 support, you just grab the PEM encoded
public key using:
openssl_pkey_get_details( openssl_pkey_get_public( $cert ));
and then strip the header and footer to get DER.
Currently in PHP (with WebID protocol as it stands) you have to:
openssl_pkey_get_details( openssl_pkey_get_public( $cert ))
then run the return through an ASN.1 parser to get exponent/modulus.
The case for DER is more that it allows a single triple, however there
are many benefits in using an industry standard representation of a key
rather than it's subsequent parts.
> That is in addition to any formats that makes it into the WebID Protocol
> spec (which Im assuming is still a work in progress).
> As an implementor I'd try an support as many formulations of a public key as
> time allows, and that I have a parser for.
likewise, although to keep it like a protocol I'd be happier to stick
with a single *required* representation. That isn't to say you couldn't
still have many different representations in your profile though, and
you can always sameas them as noted in a previous mail :)
More information about the foaf-protocols