Network Working Group H. Kennedy
Request for Comments: 3091 University of Michigan
Category: Informational 1 April 2001
Pi Digit Generation Protocol
1. TCP Based Digit Generator Service
One REQUIRED PIgen service is defined as a stateless TCP service. A server listens on TCP port 314159. Once a connection is established the server sends a stream of data, one digit of Pi at at time, starting with the most significant digit following the decimal point. Any incoming data MUST be discarded. This continues until the client closes the connection.
Kennedy Informational [Page 1]
RFC 3091 Pi Digit Generation Protocol 1 April 2001
The data flow over the connection is limited by the normal TCP flow control mechanisms, so there is no concern about the server sending data faster than the client can process it.
1.1. Approximate Service
An OPTIONAL PIgen service is defined as a stateless TCP service. A server listens on TCP port 220007. Once a connection is established the server sends a stream of data, one digit of the rational number 22/7 at a time, starting with the most significant digit following the decimal point. Any incoming data MUST be discarded. This continues until the client closes the connection.
2. UDP Based Digit Generator Service
An OPTIONAL PIgen service is defined as a stateless UDP service. A server listens on UDP port 314159. When a datagram requesting a specific digit of Pi is received, an answering datagram is sent containing the value of the requested digit of Pi according to the format defined in sections 2.1.1. and 2.1.2.
2.1. Packet Format
The datagram-based components of the PIgen protocol suite all share the following UDP data payload formats (defined in the ABNF of RFC 2234 [RFC2234]).
Kennedy Informational [Page 2]
RFC 3091 Pi Digit Generation Protocol 1 April 2001 2.1.1. Request Payload Formatrequest = nth_digit
2.1.2. Reply Payload Format
reply = nth_digit ":" DIGIT ; where DIGIT is the value of the n-th
2.2. Approximate Service
An OPTIONAL PIgen service is defined as a stateless UDP service. A server listens on UDP port 220007. When a datagram requesting a specific digit of the rational number 22/7 is received, an answering datagram is sent containing the value of the requested digit of 22/7 according to the format defined in sections 2.1.1. and 2.1.2.
3. IP Multicast Based Digit Generator Service
An OPTIONAL PIgen service is defined as a stateless UDP service. A random distribution of digits of Pi are sent using the payload format described in section 2.1.2. to the IP multicast group 314.159.265.359.
Kennedy Informational [Page 3]
RFC 3091 Pi Digit Generation Protocol 1 April 2001 4. Service DiscoveryClients SHOULD discover PIgen servers via the DNS SRV algorithm [RFC2782]. The service used is "pigen" and the protocols used are "tcp" and "udp". Approximate services (sections 1.1. and 2.2.) should be discovered using a service of "pigem". This allows for central administration of addressing, fallback for failed relays and collectors, and static load balancing.
5. Security Considerations
As almost every secure Internet protocol requires a highly accurate value of Pi in order to function correctly, it is imperative that clients only use a trusted PIgen server. The imminent collapse of the Internet is assured if this guideline is not strictly followed.
6. References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Kennedy Informational [Page 4]
RFC 3091 Pi Digit Generation Protocol 1 April 2001
[CHARGEN] Postel, J., "Character Generation Protocol", STD 22, RFC
7. Author's Address
Hugh Kennedy University of Michigan 2281 Bonisteel Blvd. Ann Arbor, MI 48109-2099 USA
Kennedy Informational [Page 5]
RFC 3091 Pi Digit Generation Protocol 1 April 2001
Full Copyright Statement