[uf-discuss] Correct way to use the "key" property of hCard

Scott Reynen scott at randomchaos.com
Mon Sep 17 14:23:09 PDT 2007


On Sep 17, 2007, at 2:23 PM, Philip Tellis wrote:

> I've ended up doing this:
>
> public key id is <a class="key"
> href="http://pgpkeys.mit.edu:11371/pks/lookup? 
> op=vindex&amp;search=0x1F140E17">1F14
> 0E17</a>

[..]

> - Is what I've done reasonably correct?
> - How do I specify that this is my PGP/GPG public key?
> - How do I specify that it is my primary key?

I don't know much about cryptography, and don't know if anyone has  
previously used keys in hCard, but the following is how I would  
approach the problem.  This is from the vCard RFC:

> The type can also include the type parameter TYPE
> to specify the public key or authentication certificate format. The
> parameter type should specify an IANA registered public key or
> authentication certificate format.

So apparently all vCard keys are assumed public, no need to state  
that.  Further down we find:

>  keytype      = "X509" / "PGP" / iana-token / x-name

So "PGP" is a valid type, no need to go hunting through IANA  
documentation.  Now we just need to translate to hCard.  The type- 
value formatting is already established [1].  I don't think you can  
merely reference a URL which contains the key; as I read the spec,  
you'd need to include the key itself in the vCard, so you'll need to  
do the same in the hCard.  This may be a good place to use <abbr>,  
assuming that ID is some form of abbreviation for the key itself.   
That would leave you with something like this:

<span class="key"><abbr class="type" title="PGP">public key</abbr> id  
is <a
href="http://pgpkeys.mit.edu:11371/pks/lookup? 
op=vindex&amp;search=0x1F140E17"><abbr class="value"  
title="mQGiBEak6cERBACprpDLma8wOmXPtE6I1uT4bIujPDYcAGR601BtWWECpB4rFQgn
xCZ/ajITucDfl+zg0A4SV41koC0WCqfiqgJnSPEuAvZ0wGdnA8gme8mL80brkHwy
Y9Wjb6n4RwDqOFmi3zVMBCx0PmwDnI6ngJEqwDJ7elUUcyuiuLsy4TodswCg1/Wg
l/bxNZMgbtuySqSmBAQ4Gi0D/jeG1NLGqW95dar8Ikxjx3dyTzffvtYjocBXmaCx
5DsiL7ZKfFHJJZCtQBZ34WCH7hXkTdPbgBMB/56aULY6dJQ9YFR0/C5ubjTYX1pQ
6uZFJXZdKVu5/bn0wAR4my5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kxgDdQ9+Q+E1NzxLGZZrtMCpRg3erbPGtQppZKbIvbQ38wM9mgE0KSS64E
/uajEeD+RqaRhB1KJkKbKfM2SBtRWw/MdZe0EcjPS3Pr8vMrDWxffrkFPBQ/O2S0
coPCgW8SgxydGWT0d3oGssdCcIfGcuMEO5qdL3ftLSwUBXuTkgPng5IQ4Gc+nk7J
o+w2/EA5dh9+MFD2uz2LGZ5U9Frr/tg1aSuuD7uVpRXZyJo/DeNJnBh4lmUQ0b/E
oat00ncPzX08UuHIYiy9Ow41D9l0EjaJQmI9VQQdMUVweW3uqsk0jJUp4x+jAAMF
B/wKWknUMiLS82WrSYnxgdCBfd8boBuaLRUv2DoQfSjgfS1r+UR2lpjKdpykURz4
rzdjbpAl17jZ4SidPNZ087aF4jAmAsFZl+fVvUVaqrz8ckSLzHSZE2stnQY2z0mv
KsfZBW84J32WfBJWrPDZnEWBTlA0g/xxEeWsxTf390MAf4VpKzV7p/EnJwBdabM5
iwIRAxn09EXEFcAS7YKWqd+eYmXpAKl6UUObXNQix5Qmt8Pn1Z2L6UG1bnBZIOez
qR4OQBoxIE8t5PIaJPm8DbNFzDMb014q75mIrPibWtG1nGO81Etw3iteHlNbOylR
DUhFwBl9F7SkORU1zQ0TIW+JiEkEGBECAAkFAkak6cYCGwwACgkQOZhMFx8UDhf6
wACfQa/zW6gLhpZjC4CWqnVT5DGGVMgAoLwp9reTXO0kuFAJ9OciMOPQEcBp
=WrgQ">1F140E17</abbr></a></span>

[1] http://microformats.org/wiki/hcard#Value_excerpting

Peace,
Scott



More information about the microformats-discuss mailing list