Freely Selected Random Socket Identifiers (Scheme 1)
Under this scheme a user is able to use any 32-bit socket identifier he chooses. Two restrictions apply: the least significant bit denotes the socket's gender (0-read, 1-write), and no more than one socket bearing a given identifier can be active at a host at a time.
The two users select suitably random identifiers ("a" and "b"). User A will attempt to activate his socket with identifier "a" and connect it to socket "b" at Host B. There is the possibility that somebody other than User B has activated socket "b" at Host B so that User A will address the wrong party. However, the possibility that some other user has accidentally picked this particular identifier is reasonably small, since there are about a billion different identifiers. When the connection request from A gets to User B, he examines the identifier of the calling socket. If for some reason it is not "a" or not from Host A, he rejects the request, because it is likely to be from some outside party. If the calling socket is named "a" and from Host A, User B can be reasonably sure that it is from User A. It is very unlikely that some other party will accidentally address socket "b" from a socket named "a".
The advantages of this scheme are: simplicity and reasonable security in a non-malicious environment. The disadvantages are that there are possibilities of annoyingly unavoidable conflicts with other users and that each pair of users must conduct a prior confidential private communication (as opposed to a broadcast announcement in more secure schemes).