⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rfc2777.txt

📁 RFC 的详细文档!
💻 TXT
📖 第 1 页 / 共 3 页
字号:
   getchar ();
   return 0;
   }

   /* prompt for an integer input */
   /****************************************************************/
   int getinteger ( char *string )
   {
   int     i, j;
   char    tin[257];

   while ( 1 )
   {
   printf ( string );



Eastlake                     Informational                     [Page 11]

RFC 2777              Verifiable Random Selection          February 2000


   printf ( "(or 'exit' to exit) " );
   gets ( tin );
   j = sscanf ( tin, "%d", &i );
   if (    ( j == EOF )

       ||  ( !j && ( ( tin[0] == 'e' ) || ( tin[0] == 'E' ) ) )
           )
       exit ( j );
   if ( j == 1 )
       return i;
   }   /* end while */
   }

   /* get remainder of dividing a 16 byte unsigned int
      by a small positive number */
   /****************************************************************/
   int longremainder ( unsigned char divisor,
                       unsigned char dividend[16] )
   {
   int i;
   long int kruft;

   if ( !divisor )
       return -1;
   for ( i = 0, kruft = 0; i < 16; ++i )
       {
       kruft = ( kruft << 8 ) + dividend[i];
       kruft %= divisor;
       }
   return kruft;
   }   /* end longremainder */

   /* calculate how many bits of entropy it takes to select N from P */
   /****************************************************************/
   /*             P!
     log  ( ----------------- )
        2    N! * ( P - N )!
   */

   double NPentropy ( int N, int P )
   {
   int         i;
   double      result = 0.0;

   if (    ( N < 1 )   /* not selecting anything? */
      ||   ( N >= P )  /* selecting all of pool or more? */
      )
       return 1.0;     /* degenerate case */



Eastlake                     Informational                     [Page 12]

RFC 2777              Verifiable Random Selection          February 2000


   for ( i = P; i > ( P - N ); --i )
       result += log ( i );
   for ( i = N; i > 1; --i )
       result -= log ( i );
   /* divide by [ log (base e) of 2 ] to convert to bits */
   result /= 0.69315;

   return result;
   }   /* end NPentropy */










































Eastlake                     Informational                     [Page 13]

RFC 2777              Verifiable Random Selection          February 2000


Appendix: History of NomCom Member Selection

   For reference purposes, here is a list of the IETF Nominations
   Committee member selection techniques and chairs so far:

           YEAR      CHAIR               SELECTION METHOD

        1993/1994  Jeff Case             Clergy
        1994/1995  Fred Baker            Clergy
        1995/1996  Guy Almes             Clergy
        1996/1997  Geoff Huston          Spouse
        1997/1998  Mike St.Johns         Algorithm
        1998/1999  Donald Eastlake 3rd   This Algorithm
        1999/2000  Avri Doria            This Alogrithm

   Clergy = Names were written on pieces of paper, placed in a
   receptacle, and a member of the clergy picked the Nomcom members.

   Spouse = Same as Clergy except chair's spouse made the selection.

   Algorithm = Algorithmic selection based on the same concepts as
   documented herein.

   This Algorithm = Algorithmic selection using the algorithm and
   reference code (but not the fake example sources of randomness)
   described herein.

























Eastlake                     Informational                     [Page 14]

RFC 2777              Verifiable Random Selection          February 2000


References

   RFC 1321  Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321,
             April 1992.

   RFC 1750  Eastlake, D., 3rd, Crocker, S. and J. Schiller, "Randomness
             Recommendations for Security", RFC 1750, December 1994.

   RFC 2727  Galvin, J., "IAB and IESG Selection, Confirmation, and
             Recall Process: Operation of the Nominating and Recall
             Committees", BCP 10, RFC 2727, February 2000.

Author's Address

   Donald E. Eastlake, 3rd
   Motorola
   65 Shindegan Hill Road, RR #1
   Carmel, NY 10512 USA

   Phone:  +1-914-276-2668 (h)
           +1-508-261-5434 (w)
   Fax:    +1-508-261-4447 (w)
   EMail:  Donald.Eastlake@motorola.com




























Eastlake                     Informational                     [Page 15]

RFC 2777              Verifiable Random Selection          February 2000


Full Copyright Statement

   Copyright (C) The Internet Society (2000).  All Rights Reserved.

   This document and translations of it may be copied and furnished to
   others, and derivative works that comment on or otherwise explain it
   or assist in its implementation may be prepared, copied, published
   and distributed, in whole or in part, without restriction of any
   kind, provided that the above copyright notice and this paragraph are
   included on all such copies and derivative works.  However, this
   document itself may not be modified in any way, such as by removing
   the copyright notice or references to the Internet Society or other
   Internet organizations, except as needed for the purpose of
   developing Internet standards in which case the procedures for
   copyrights defined in the Internet Standards process must be
   followed, or as required to translate it into languages other than
   English.

   The limited permissions granted above are perpetual and will not be
   revoked by the Internet Society or its successors or assigns.

   This document and the information contained herein is provided on an
   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

Acknowledgement

   Funding for the RFC Editor function is currently provided by the
   Internet Society.



















Eastlake                     Informational                     [Page 16]


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -