Network Working Group D. Eastlake 3rd Request for Comments: 2777 Motorola Category: Informational February 2000
Publicly Verifiable Nomcom Random Selection
Status of this Memo
このメモの位置付け
This memo provides information for the Internet community. It does not specify an Internet standard of any kind. Distribution of this memo is unlimited.
このメモはインターネットコミュニティのための情報を提供します。それはどんな種類のインターネット標準を指定しません。このメモの配布は無制限です。
Copyright Notice
著作権表示
Copyright (C) The Internet Society (2000). All Rights Reserved.
著作権(C)インターネット協会(2000)。全著作権所有。
Abstract
抽象
This document describes a method for making random selections in such a way that the unbiased nature of the choice is publicly verifiable. As an example, the selection of the voting members of the IETF Nominations Committee from the pool of eligible volunteers is used. Similar techniques would be applicable to other cases.
この文書では、選択肢の公平な性質が公開検証であるようにランダム選択を行うための方法を説明します。例として、適格なボランティアのプールからIETF指名委員会の投票メンバーの選択が使用されています。同様の技術は、他のケースに適用可能です。
Acknowledgement
謝辞
Matt Crawford made major contributions to this document.
マット・クロフォードは、この文書に大きな貢献をしました。
Table of Contents
目次
1. Introduction............................................2 2. General Flow of a Publicly Verifiable Process...........2 2.1 Determination of the Pool..............................2 2.2 Publication of the Algorithm...........................2 2.3 Publication of Selection...............................3 3. Randomness..............................................3 3.1 Sources of Randomness..................................3 3.2 Skew...................................................4 3.3 Entropy Needed.........................................4 4. A Suggested Precise Algorithm...........................5 5. Fully Worked Example....................................6 6. Security Considerations.................................7 7. Reference Code.........................................8 Appendix: History of NomCom Member Selection..............14 References................................................15 Author's Address..........................................15 Full Copyright Statement..................................16
Under the IETF rules, each year 10 persons are randomly selected from among the eligible persons who volunteer to be the voting members of the nominations committee (NomCom) to nominate members of the Internet Engineering Steering Group (IESG) and the Internet Architecture Board (IAB) [RFC 2727]. The number of eligible volunteers in recent years has varied in the approximate range of 40 to 60.
IETFの規則の下では、毎年10人を無作為にIAB(インターネットエンジニアリング運営グループ(IESG)とインターネットアーキテクチャ委員会のメンバーを指名する指名委員会(NomCom)の議決権メンバーであるとボランティア資格者の中から選択され、 )[RFC 2727]。近年の資格ボランティアの数が40〜60のおおよその範囲で変化しています。
It is highly desireable that the random selection of the voting NomCom be done in a unimpeachable fashion so that no reasonable charges of bias or favoritism can be brought. This is for the protection of the IETF from bias and protection of the administrator of the selection (currently, the appointed non-voting NomCom chair) from suspicion of bias.
バイアスやえこひいきのない合理的な電荷を持っていないことができるように、投票NomComのランダムな選択が申し分のない形で行われることが非常に望ましいです。これは、バイアスとバイアスの疑いから選択(現在は、任命無議決権NomCom椅子)の管理者の保護から、IETFの保護のためです。
A method such that public information will enable any person to verify the randomness of the selection meets this criterion. This document gives an example of such a method.
公開情報は、選択のランダム性を確認するために、すべての人を可能にするような方法は、この基準を満たしています。この文書では、このような方法の例を示します。
In general, a selection of NomCom members publicly verifiable as unbiased or similar selection could follow the three steps given below.
一般的に、公平または同様の選択のような公的に検証可能NomComメンバーの選択は、以下に示す3つのステップを従うことができます。
First, you need to determine the pool from which the selection is to be made.
まず、あなたが選択がなされるべきでプールを決定する必要があります。
Volunteers are solicited by the appointed (non-voting) NomCom chair. Their names are then passed through the IETF Secretariat to check eligibility. (Current eligibility criteria relate to IETF meeting attendance, records of which are maintained by the Secretariat.) The full list of eligible volunteers is made public early enough that there is a reasonable time to resolve any disputes as to who should be in the pool, probably a week to ten days before the selection.
ボランティアを任命(非議決権)NomCom議長によって募集されています。彼らの名前は、適格性を確認するためにIETF事務局を通過しています。 (現在の適格基準は、のレコードが事務局によって維持され、IETF会議の出席に関連しています。)対象とボランティアの完全なリストは、プールにする必要があります誰にとして紛争を解決するための合理的な時間があることを十分に早期に公開され、おそらく選択の前に10日までの週。
The exact algorithm to be used, including the public future sources of randomness, is made public. For example, the members of the final list of eligible volunteers are ordered by publicly numbering them, several public future sources of randomness such as government run lotteries are specified, and an exact algorithm is specified whereby eligible volunteers are selected based on a strong hash function [RFC 1750] of these future sources of randomness.
正確なアルゴリズムは、ランダムの公開将来ソースを含む、使用される公開されています。例えば、対象とボランティアの最終リストのメンバーが公にそれらを番号順に並べ替えられ、こうした政府の実行宝くじのようにランダム性のいくつかの公共の将来のソースが指定され、かつ適格なボランティアが強いハッシュ関数に基づいて選択されることにより、正確なアルゴリズムが指定されていますランダムこれらの将来の供給源の[RFC 1750]。
When the prespecified sources of randomness produce their output, those values plus a summary of the execution of the algorithm for selection should be announced so that anyone can verify that the correct randomness source values were used and the algorithm properly executed. A cut off time for any complaint that the algorithm was run with the wrong inputs or not faithfully executed should be specified to finalize the output and provide a stable NomCom.
ランダム性の予め指定されたソースは、それらの出力を生成するとき、誰もが正しいランダムソース値が使用され、アルゴリズムが適切に実行されたことを確認できるように、それらの値を加えた選択のためのアルゴリズムの実行の概要が発表されるはずです。アルゴリズムは間違った入力で実行するか、忠実に実行されなかった苦情のためのカットオフ時間は出力を確定し、安定したNomComを提供するために指定する必要があります。
The crux of the unbiased nature of the selection is that it is based exactly on random information which will be revealed in the future and thus can not be known to the person specifying the algorithm by which that random information will be used to select the NomCom members. The random information must be such that it will be publicly revealed in a timely fashion.
選択の公平な性質の核心は、それが正確にランダムな情報がNomComメンバーを選択するために使用されることにより、アルゴリズムを指定した人に知られていることができないので、将来的には明らかにされ、ランダムな情報に基づいていることです。ランダムな情報は、それが公にタイムリーに明らかにされるようなものでなければなりません。
The random sources should not include anything that any reasonable person would believe to be under the control or influence of the IETF or its components, such as IETF meeting attendance statistics, numbers of documents issued, or the like.
ランダムソースは合理的な人は、IETFや、IETF会議出席の統計情報としてその構成要素、発行された文書の数などの制御または影響下にあることを信じるものを含めるべきではありません。
Examples of good information to use are lottery winning numbers for specified runnings of specified lotteries. Particularly for government run lotteries, great care is usually taken to see that they produce random quantities. Even in the unlikely case one were to have been rigged, it would almost certainly be in connection with winning money in the lottery, not in connection with IETF use.
使用するための良い情報の例としては、指定された宝くじの指定されたランニングのための当選番号宝くじです。特に、政府の実行宝くじのために、細心の注意は通常、彼らはランダムな量を生産することを確認するためにとられています。でもそうする場合には1が不正に操作されたとあったが、それはほぼ確実ではないIETF使用に関連して、宝くじでお金を獲得に関連してだろう。
Other possibilities are such things as the closing price of a stock on a particular day, daily balance in the US Treasury on a specified day, the volume of trading on the New York Stock exchange on a specified day, etc. (However, the reference code given below will not handle integers that are too large.) Sporting events can be used but only with care to specify exactly what quantities are being presumed random and what will be done if they are cancelled or delayed.
他の可能性は、しかし(など、指定した日にニューヨーク証券取引所での取引のボリューム、指定した日に、米国財務省では、毎日のバランス、参照特定の日の株式の終値のようなものです下記のコードは大きすぎる整数を処理しません。)スポーツイベントは、量はランダムと推定されており、それらはキャンセルまたは遅延された場合に何をされます正確に何を指定するだけ注意して使用することができます。
It is important that the last source of randomness, chronologically, produce a substantial amount of the entropy needed. If most of the randomness has come from the earlier of the specified sources, and someone has even limited influence on the final source, they might do an exhaustive analysis and exert such influence so as to bias the selection in the direction they wanted. Thus it is best for the last source to be an especially strong and unbiased source of a large amount of randomness such as a government run lottery.
ランダム性の最後のソースは、年代順に、必要なエントロピーのかなりの量を生産することが重要です。ランダム性のほとんどは、指定されたソースの以前から来ている、と誰かが、最終的なソースにも、限られた影響力を持っている場合、彼らは徹底的な分析を行う可能性がありますし、方向選択は、彼らが望んでいたバイアスになるような影響を与えます。したがって、このような政府の実行宝くじとしてランダムの大量の特に強いと公平なソースであることを最後のソースに最適です。
It is best not to use too many different sources. Every additional source increases the probability that it might be delayed or cancelled calling into play contingency plans or, worst of all, possibly creating a situation that was not anticipated. This would either require arbitrary judgement by the Nomcom chair, defeating the randomness of the selection, or a re-run with a new set of sources, causing much delay. Probably a good number of sources is three.
それはあまりにも多くの異なるソースを使用しないことをお勧めです。すべての追加のソースは、それが遅れたりキャンセルプレーティンジェンシープランを呼び出すか、すべての最悪、おそらく予想していなかった状況を作り出す可能性があること確率を高めます。これは非常に遅れが生じ、選択のランダム性、または再実行ソースの新しいセットとを破り、Nomcomの椅子によって恣意的な判断を必要とするのいずれか。おそらく源の良い数は3です。
Many of the sources of randomness suggested above produce data which is not uniformly distributed. This is certainly true of stock prices and horse race results, for example. However, use of a strong mixing function [RFC 1750] will extract the available entropy and produce a hash value whose bits, remainder modulo a small divisor, etc., are uniformly distributed.
ランダム性の源の多くは、均一に分布されていない商品データ上に示唆しました。これは、例えば、株価や競馬のレース結果の確かに真実です。しかし、強力な混合機能の使用[RFC 1750]利用可能なエントロピーを抽出し、そのビット、余り小さい除数を法としてハッシュ値を生成する、等であろう、一様に分布しています。
What we are doing is selection N items without replacement from a population of P items. The number of different ways to do this is as follows, where "!" represents the factorial function:
私たちがやっていることはP項目の母集団から交換せずに選択N項目です。次のようにこれを行うには、いくつかの異なる方法があり、ここで、「!」階乗関数を表しています。
P! ------------- N! * (P - N)!
To do this in a completely random fashion requires as many random bits as the logarithm base 2 of that quantity. Some sample calculated approximate number of random bits for the selection of 10 nomcom members from various pool sizes is given below:
完全にランダムな方法でこれを行うには、その量の対数の底2と同数のランダムビットを必要とします。種々のプール・サイズから10人のnomcomメンバーの選択のためのランダムビットのいくつかのサンプル計算概数を以下に示します:
Random Selection of Ten Items From Pool
プールからの10の項目をランダムに選択
Pool size 20 25 30 35 40 50 60 75 100 Bits needed 18 22 25 28 30 34 37 40 44
プールサイズ20 25 30 35 40 50 60 75 100ビットは18 22 25 28 30 34 37 40 44が必要
Using an inadequate number of bits means that not all of the possible selections would be available. For a substantially inadequate amount of entropy, there would be substantial correlations between the selection of two members of the pool, for example. However, as a practical matter, for pool sizes likely to be encountered in IETF nomcom membership selection, 40 bits of entropy should always be adequate. Even if there is a large pool and theoretically more bits are needed for complete randomness, 40 bits of entropy will assure that the probability of selection of each pool member differs from that of other pool members, the correlation between the selection of any pair of pool members, etc., differs only insignificantly from that for completely random selection.
ビットの不十分な数を使用すると、可能な選択の全てではないが、利用可能であることを意味します。エントロピーの実質的に不十分な量のために、例えばプールの2人のメンバーの選択の間に実質的な相関関係が存在することになります。しかし、実際問題として、プールのためにIETF nomcom会員の選択に直面する可能性が高いサイズ、エントロピーの40ビットは常に十分なはずです。そこに大きなプールであり、理論的にはより多くのビットが完全にランダムに必要とされる場合であっても、エントロピーの40ビットは、各プールメンバの選択の確率が他のプールのメンバーとは異なることを保証する、プールの任意の対の選択との間の相関メンバーなど、完全にランダムな選択のためにのみわずかに異なっています。
An MD5 [RFC 1321] hash has 128 bits and therefore can produce no more than that number of bits of entropy. However, this is three times what is likely to ever been needed for IETF nomcom membership selection.
MD5 [RFC 1321]ハッシュは128ビットであり、したがって、エントロピーのビットの数よりも多くを生成することができません。しかし、これは今までIETF nomcomメンバーシップの選択のために必要とされてする可能性があるものを三回です。
It is important that a precise algorithm be given for mixing the random sources specified and making the selection based thereon. Sources suggested above each produce either a single positive number (i.e., closing price for a stock) or a small set of positive numbers (many lotteries provide 6 numbers in the range of 1 through 40 or the like, a sporting event could produce the scores of two teams, etc.). A sample precise algorithm is as follows:
正確なアルゴリズムは、ランダムソースが指定された混合および選択基づいてその上に製造するために与えられることが重要です。各上記で示唆源は、単一の正の数のいずれかを生成する(すなわち、株式の価格閉じる)または正数の小さなセットを(多くの宝くじは、40を介して1の範囲内の6つの番号を提供するなど、スポーツイベントのスコアを生成することができ2つのチームなど)の。次のようにサンプルの正確なアルゴリズムがあります。
For each source producing multiple numeric values, represent each as a decimal number terminated by a period (or with a period separating the whole from the fractional part) and without leading zeroes (except for a single leading zero if the integer part is zero) or trailing zeroes after the period. Order them from smallest to the largest and concatenate them and follow the results by a "/". For each source producing a single number, simply represent it as above with a trailing "/". At this point you have a string for each source, say s1/, s2/, ... Concatenate these strings in a pre-specified order and represent each character as its ASCII code producing s1/s2/.../.
複数の数値を生成する各ソースに対して、(整数部がゼロである場合、単一の先行ゼロを除く)(又は小数部から全体を分離する周期)の期間によって、および先行ゼロなしで終了10進数としてそれぞれ表し、または期間後にゼロを末尾。最小から最大にそれらを注文し、それらを連結して「/」によって結果に従ってください。単一の番号を生成する各ソースに対して、単に末尾「/」で、上記のように表します。この時点では、各ソースの文字列を持って、S1 /、S2 /、...を連結あらかじめ指定された順序でこれらの文字列を言うと、S1 / S2 /.../を生産するそのASCIIコードとして各文字を表します。
You can then produce a sequence of random values derived from a strong mixing of these sources by calculating the MD5 hash [RFC 1321] of this string prefixed and suffixed with a zero byte for the first value, the string prefixed and suffixed by a 0x01 byte for the second value, etc. Treat each of these derived random values as a positive multiprecision integer. If there are P eligible volunteers, select the first voting member by dividing the first derived random value by P and using the remainder plus one as the position of the selectee in the ordered list or volunteers. Select the second voting member by dividing the second derived random value by P-1 and using the remainder plus one as the position of the selectee in the list with the first selectee eliminated. Etc.
あなたが最初の値の0バイトの接頭辞と接尾辞この文字列のMD5ハッシュ[RFC 1321]計算することにより、これらのソースの強力な混合に由来するランダム値のシーケンスを生成することができ、文字列が接頭辞と0x01のバイトサフィックス第二値、等について陽性多倍精度整数としてこれら由来のランダムな値の各々を扱います。 P適格なボランティアがある場合、最初はPでランダムな値を派生除算と剰余プラス順序リスト又はボランティアにおけるselecteeの位置などのいずれかを使用して最初の投票メンバーを選択します。 P-1によって第2由来のランダムな値を除算し、余りプラス除去最初selectee付きリスト内selecteeの位置などのいずれかを使用して第二の投票メンバーを選択します。等。
It is recommended that alphanumeric random sources be avoided due to the greater difficulty in canonicalizing them in an independently repeatable fashion; however, if any are used, all white space, punctuation, and special characters should be removed and all letters set to upper case. This will leave only an unbroken sequence of letters A-Z and digits 0-9 which can be treated as a canonicalized number above and suffixed with a "/".
英数字のランダムソースが原因独立して再現可能な方法でそれらをcanonicalizingで大きな困難に回避することが推奨されます。いずれかが使用されている場合は、すべての空白、句読点、特殊文字を削除する必要があり、すべての文字が大文字に設定します。これは、文字上記正規化数として扱われ、「/」で付加でき-Zと数字0-9の唯一切れ目のない配列を残します。
Assume the following ordered list of 25 eligible volunteers is published in advance of selection:
25人の適格なボランティアの次の順序のリストは、選択の前に公開されていると仮定します。
1. John 11. Pollyanna 21. Pride 2. Mary 12. Pendragon 22. Sloth 3. Bashful 13. Pandora 23. Envy 4. Dopey 14. Faith 24. Anger 5. Sleepy 15. Hope 25. Kasczynski 6. Grouchy 16. Charity 7. Doc 17. Love 8. Sneazy 18. Longsuffering 9. Handsome 19. Chastity 10. Cassandra 20. Smith
Assume the following (fake example) ordered list of randomness sources:
ランダムソースのリストを命じ、次の(偽の例)を想定します。
1. The People's Democracy of Betastani State Lottery six winning numbers (ignoring the seventh "extra" number) for 1 October 1998. 2. Numbers of the winning horses at Hialeia for all races for the first day on or after x September 1998 on which at least two races are run. 3. The Republic of Alphaland State Lottery daily number for 1 October 1998 treated as a single four digit integer. 4. Closing price of Example Corporation stock on the Lunar Stock Exchange for the first business day after x September 1998 when it trades.
1. 1用Betastani州の宝くじ6つの当選番号の人民民主主義(第七「余分な」数を無視して)1998年10月に1998年9月にまたはXの後の最初の日のすべてのレースのためにHialeiaで優勝馬の2数字少なくとも2つのレースが実行されます。単一の4桁の整数として扱わ1998年10月1日3.共和国Alphaland州の宝くじ毎日数。それは取引のx 1998年9月後の最初の営業日の月面証券取引所の例(株)の株式の4終値。
Randomness publicly produced:
ランダム性は公に生産します:
Source 1: 9, 18, 26, 34, 41, 45 Source 2: 2, 5, 12, 8, 10 Source 3: 9319 Source 4: 13 11/16
Resulting key string:
キーの文字列を結果として生じます。
The table below gives the hex of the MD5 of the above key string bracketed with a byte whose value is successively 0x00, 0x01, 0x02, through 0x09. The divisor for the number size of the remaining pool at each stage is given and the index of the selectee as per the original number of those in the pool.
以下の表は0x00で、0x01の、0x02の、0x09のを通して連続的であり、その値はバイトで括弧上記キーストリングのMD5の六角を与えます。各段階で残りのプールの個数サイズの除数は、プール内のそれらの元の数に従って与えられselecteeの指標です。
index hex value of MD5 div selected 1 746612D0A75D2A2A39C0A957CF825F8D 25 -> 12 <- 2 95E31A4429ED5AAF7377A15A8E10CD9D 24 -> 6 <- 3 AFB2B3FD30E82AD6DC35B4D2F1CFC77A 23 -> 8 <- 4 06821016C2A2EA14A6452F4A769ED1CC 22 -> 3 <- 5 94DA30E11CA7F9D05C66D0FD3C75D6F7 21 -> 2 <- 6 2FAE3964D5B1DEDD33FDA80F4B8EF45E 20 -> 24 <- 7 F1E7AB6753A773EFE46393515FDA8AF8 19 -> 11 <- 8 700B81738E07DECB4470879BEC6E0286 18 -> 19 <- 9 1F23F8F8F8E5638A29D332BC418E0689 17 -> 15 <- 10 61A789BA86BF412B550A5A05E821E0ED 16 -> 22 <-
> 2 < - - > 12 < - - 2 95E31A4429ED5AAF7377A15A8E10CD9D 24 - > 6 < - 3 AFB2B3FD30E82AD6DC35B4D2F1CFC77A 23 - > 8 < - 4 06821016C2A2EA14A6452F4A769ED1CC 22 - > 3 < - 5 94DA30E11CA7F9D05C66D0FD3C75D6F7 21 6 2FAE3964D5B1DEDD33FDA80F4B8EF45E 20 MD5のDIVのインデックス進値が1 746612D0A75D2A2A39C0A957CF825F8D 25を選択しました - > 24 < - 7 F1E7AB6753A773EFE46393515FDA8AF8 19 - > 11 < - 8 700B81738E07DECB4470879BEC6E0286 18 - > 19 < - 9 1F23F8F8F8E5638A29D332BC418E0689 17 - > 15 < - 10 61A789BA86BF412B550A5A05E821E0ED 16 - > 22 < -
Resulting selection, in order selected:
順番に選択して、選択しました:
1. Pendragon (12) 6. Anger (24) 2. Grouchy (6) 7. Pollyanna (11) 3. Sneazy (8) 8. Chastity (19) 4. Bashful (3) 9. Hope (15) 5. Mary (2) 10. Sloth (22)
Careful choice of should be made of randomness inputs so that there is no reasonable suspicion that they are under the control of the administrator. Guidelines given above to use a small number of inputs with a substantial amount of entropy from the last shoud be followed. And equal care needs to be given that the algorithm selected is faithfully executed with the designated inputs values. Publication of the results and a week or so window for the community of interest to duplicate the calculations should give a reasonable assurance against implementation tampering.
彼らは、管理者の管理下にあることは合理的な疑いがないように注意深く選択はランダム入力のなされるべきです。最後からエントロピーの相当量と入力の小さな数を使用する上記のガイドラインに従うことshoud。そして、同じ注意が選択されたアルゴリズムを忠実に指定された入力値を使用して実行されることを考慮する必要があります。計算を複製する興味のあるコミュニティのための結果の公表と一週間ほどウィンドウが改ざん実装に対する合理的な保証を与えるべきです。
To maintain the unpredictable character of selections, should a member of the nomcom need to be replaced due to death, resignation, expulsion, etc., new publicly announced future random sources should be used for the selection of their replacement.
選択の予測不可能な文字を維持するために、nomcomのメンバーは等により死亡、辞任、追放に交換する必要がある必要があり、新しいは公に未来のランダム源は彼らの交換を選択するために使用すべきであると発表しました。
This code makes use of the MD5 reference code from [RFC 1321] ("RSA Data Security, Inc. MD5 Message-Digest Algorithm"). The portion of the code dealing with multiple floating point numbers was written by Matt Crawford.
このコードは、[RFC 1321](「RSA Data Security社のMD5メッセージダイジェストアルゴリズム」)からMD5参照コードを利用します。複数の浮動小数点数を扱うコードの一部がマットクロフォードによって書かれました。
/**************************************************************** * * Reference code for * "Publicly Verifiable Nomcom Random Selection" * Donald E. Eastlake 3rd * ****************************************************************/ #include <limits.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h>
#include "global.h" #include "MD5.h"
#include "GLOBAL.H" の#include "MD5.h"
/* local prototypes */ int longremainder ( unsigned char divisor, unsigned char dividend[16] ); int getinteger ( char *string ); double NPentropy ( int N, int P );
/* limited to 16 inputs of up to sixteen integers each */ /****************************************************************/
main () { int i, j, k, k2, err, keysize, pool, selection; unsigned char unch, uc16[16], remaining, *selected; long int temp, array[16]; MD5_CTX ctx; char buffer[257], key [800], sarray[16][256];
pool = getinteger ( "Type size of pool:\n" ); if ( pool > 255 )
プール=はgetInteger( "プールのタイプサイズ:\ nの"); (プール> 255)であれば
{ printf ( "Pool too big.\n" ); exit ( 1 ); }
selected = (unsigned char *) malloc ( pool ); if ( !selected ) { printf ( "Out of memory.\n" ); exit ( 1 ); } selection = getinteger ( "Type number of items to be selected:\n" ); if ( selection > pool ) { printf ( "Pool too small.\n" ); exit ( 1 ); } if ( selection == pool ) { printf ( "All of the pool is selected.\n" ); exit ( 0 ); } err = printf ( "Approximately %.1f bits of entropy needed.\n", NPentropy ( selection, pool ) + 0.1 ); if ( err <= 0 ) exit ( 1 ); for ( i = 0, keysize = 0; i < 16; ++i ) { if ( keysize > 500 ) { printf ( "Too much input.\n" ); exit ( 1 ); } /* get the "random" inputs. echo back to user so the user may be able to tell if truncation or other glitches occur. */ err = printf ( "\nType #%d randomness or 'end' followed by new line.\n" "Up to 16 integers or the word 'float' followed by up\n" "to 16 x.y format reals.\n", i+1 ); if ( err <= 0 ) exit ( 1 ); gets ( buffer ); j = sscanf ( buffer, "%ld%ld%ld%ld%ld%ld%ld%ld%ld%ld%ld%ld%ld%ld%ld%ld", &array[0], &array[1], &array[2], &array[3], &array[4], &array[5], &array[6], &array[7], &array[8], &array[9], &array[10], &array[11], &array[12], &array[13], &array[14], &array[15] ); if ( j == EOF ) exit ( j ); if ( !j ) if ( buffer[0] == 'e' ) break;
else
他
{ /* floating point code by Matt Crawford */ j = sscanf ( buffer, "float %ld.%[0-9]%ld.%[0-9]%ld.%[0-9]%ld.%[0-9]" "%ld.%[0-9]%ld.%[0-9]%ld.%[0-9]%ld.%[0-9]" "%ld.%[0-9]%ld.%[0-9]%ld.%[0-9]%ld.%[0-9]" "%ld.%[0-9]%ld.%[0-9]%ld.%[0-9]%ld.%[0-9]", &array[0], sarray[0], &array[1], sarray[1], &array[2], sarray[2], &array[3], sarray[3], &array[4], sarray[4], &array[5], sarray[5], &array[6], sarray[6], &array[7], sarray[7], &array[8], sarray[8], &array[9], sarray[9], &array[10], sarray[10], &array[11], sarray[11], &array[12], sarray[12], &array[13], sarray[13], &array[14], sarray[14], &array[15], sarray[15] ); if ( j == 0 || j & 1 ) printf ( "Bad format." ); else { for ( k = 0, j /= 2; k < j; k++ ) { /* strip trailing zeros */ for ( k2=strlen(sarray[k]); sarray[k][--k2]=='0';) sarray[k][k2] = '\0'; err = printf ( "%ld.%s\n", array[k], sarray[k] ); if ( err <= 0 ) exit ( 1 ); keysize += sprintf ( &key[keysize], "%ld.%s", array[k], sarray[k] ); } keysize += sprintf ( &key[keysize], "/" ); } } else { /* sort values, not a very efficient algorithm */ for ( k2 = 0; k2 < j - 1; ++k2 ) for ( k = 0; k < j - 1; ++k ) if ( array[k] > array[k+1] ) { temp = array[k]; array[k] = array[k+1]; array[k+1] = temp; } for ( k = 0; k < j; ++k ) { /* print for user check */ err = printf ( "%ld ", array[k] ); if ( err <= 0 ) exit ( 1 ); keysize += sprintf ( &key[keysize], "%ld.", array[k] ); } keysize += sprintf ( &key[keysize], "/" ); }
} /* end for i */
/* have obtained all the input, now produce the output */ err = printf ( "Key is:\n %s\n", key ); if ( err <= 0 ) exit ( 1 ); for ( i = 0; i < pool; ++i ) selected [i] = i + 1; printf ( "index hex value of MD5 div selected\n" ); for ( unch = 0, remaining = pool; unch < selection; ++unch, --remaining ) { MD5Init ( &ctx ); MD5Update ( &ctx, &unch, 1 ); MD5Update ( &ctx, (unsigned char *)key, keysize ); MD5Update ( &ctx, &unch, 1 ); MD5Final ( uc16, &ctx ); k = longremainder ( remaining, uc16 ); /* printf ( "Remaining = %d, remainder = %d.\n", remaining, k ); */ for ( j = 0; j < pool; ++j ) if ( selected[j] ) if ( --k < 0 ) { printf ( "%2d " "%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X " "%2d -> %2d <-\n", unch+1, uc16[0],uc16[1],uc16[2],uc16[3],uc16[4],uc16[5],uc16[6], uc16[7],uc16[8],uc16[9],uc16[10],uc16[11],uc16[12],uc16[13],uc16[14], uc16[15], remaining, selected[j] ); selected[j] = 0; break; } } printf ( "\nDone, type any character to exit.\n" ); getchar (); return 0; }
/* prompt for an integer input */ /****************************************************************/ int getinteger ( char *string ) { int i, j; char tin[257];
while ( 1 ) { printf ( string );
(1){のprintf(文字列)、一方、
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 */
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 */
Appendix: History of NomCom Member Selection
付録:NomComメンバー選択の歴史
For reference purposes, here is a list of the IETF Nominations Committee member selection techniques and chairs so far:
参考のため、ここではこれまでにIETF指名委員会メンバーの選択技術と椅子のリストは、次のとおりです。
YEAR CHAIR SELECTION METHOD
YEAR CHAIR選択方法
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
1993/1994ジェフケース聖職者1994/1995フレッド・ベイカー聖職者1995/1996ガイAlmes聖職者1996/1997ジェフ・ヒューストン配偶者1997/1998マイクSt.Johnsアルゴリズム1998/1999ドナルドイーストレイク第三このアルゴリズム1999/2000 AvriドリアこのAlogrithm
Clergy = Names were written on pieces of paper, placed in a receptacle, and a member of the clergy picked the Nomcom members.
聖職者=名前は、容器内に配置された紙の片に書かれ、そして聖職者のメンバーはNomcomメンバーを採取しました。
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.
本明細書に記載されたアルゴリズムと参照コード(ただし乱数の偽例ソース)を使用して、このアルゴリズム=アルゴリズムの選択。
References
リファレンス
RFC 1321 Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, April 1992.
RFC 1321のRivest、R.、 "MD5メッセージダイジェストアルゴリズム"、RFC 1321、1992年4月。
RFC 1750 Eastlake, D., 3rd, Crocker, S. and J. Schiller, "Randomness Recommendations for Security", RFC 1750, December 1994.
RFC 1750イーストレイク、D.、第三、クロッカー、S.とJ.シラー、 "セキュリティのためのランダム性に関する推奨事項"、RFC 1750、1994年12月。
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.
RFC 2727ガルビン、J.、 "IABとIESGの選択、確認、およびリコール処理:指名の動作とリコール委員会"、BCP 10、RFC 2727、2000年2月。
Author's Address
著者のアドレス
Donald E. Eastlake, 3rd Motorola 65 Shindegan Hill Road, RR #1 Carmel, NY 10512 USA
ドナルドE.イーストレイク、第三モトローラ65 Shindeganヒルロード、RR#1カーメル、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
電話番号:+ 1-914-276-2668(H)+ 1-508-261-5434(W)ファックス:+ 1-508-261-4447(W)メール:Donald.Eastlake@motorola.com
Full Copyright Statement
完全な著作権声明
Copyright (C) The Internet Society (2000). All Rights Reserved.
著作権(C)インターネット協会(2000)。全著作権所有。
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.
RFC Editor機能のための基金は現在、インターネット協会によって提供されます。