188.8.131.52 Peer Names
A Peer Name is composed of an authority and classifier, in the form "authority.classifier", and it is created by an application before publishing a name using the PNRP. After it is registered, the Peer Name can be used by other applications to obtain the IP endpoints and extended payload for the name.
There are two types of Peer Names: secure and unsecured. A Secure Peer Name has an associated Peer Identity that is used to prove ownership of the name. The authority element of a Secure Peer Name is algorithmically derived from the associated public key, described as follows:
The public key of the Peer Identity is first represented according to the format of the SubjectPublicKeyInfo field specified in [RFC5280] section 184.108.40.206.
A SHA-1 [RFC3174] hash [h] AuthorityHash is generated from the public key of the Peer Identity.
Each byte in [h] is represented as its two-digit hexadecimal representation.
Each hexadecimal digit is then converted into a Unicode character in the ranges ("0"-"9") and ("a"-"f"). (For example, the hex value 0x64 becomes the sequence of Unicode characters "6", "4", and the hex value 0x0c becomes the sequence "0", "c").
All the characters generated in the previous step are then concatenated in order to form the Authority string.
An Unsecured Peer Name does not have a relationship to a Peer Identity (therefore any node can claim ownership of it), and its Authority string is always set to "0". For example, in the Peer Name "0.MyApplication", the Authority is "0", and the Classifier is "MyApplication".
The Classifier element for a Peer Name is specified by the application registering the resource, and can be any Unicode string up to 150 characters long (counting the terminating null character).