We also need a way to capture the raw network data. A program called <citerefentry><refentrytitle>tcpdump</refentrytitle><manvolnum>1</manvolnum></citerefentry> lets you do this, if you have enabled the <emphasis>Berkeley Packet Filter</emphasis> interface in your <link linkend="kernel">kernel's config file</link>.
ما همچنین به روشی نیاز داریم تا بتوانیم دادههای خام شبکه را ضبط کنیم. برنامهای به نام <citerefentry><refentrytitle>tcpdump</refentrytitle><manvolnum>1</manvolnum></citerefentry> اجازه انجام چنین کاری را به ما میدهد. برای استفاده از آن نیاز است تا در <link linkend="kernel">فایلپرونده پیکربندی هسته</link> <emphasis>Berkeley Packet Filter</emphasis> را فعال کرده باشید.
Ueli Maurer's <quote>Universal Statistical Test for Random Bit Generators</quote>(<link xlink:href="https://web.archive.org/web/20011115002319/http://www.geocities.com/SiliconValley/Code/4704/universal.pdf"> <acronym>MUST</acronym></link>) quickly measures the entropy of a sample. It uses a compression-like algorithm. <link linkend="code">The code is given below</link> for a variant which measures successive (~quarter megabyte) chunks of a file.
ابزار <quote>Universal Statistical Test for Random Bit Generators</quote>(<link xlink:href="https://web.archive.org/web/20011115002319/http://www.geocities.com/SiliconValley/Code/4704/universal.pdf"> <acronym>MUST</acronym></link>) یولی مائورر میتواند آنتروپی یک نمونه را به سرعت اندازهگیری کند. این ابزار از یک الگوریتم شبه-فشردهسازی استفاده میکند. کد گونهای از این ابزار که قادر است به طور پیاپی (تقریبا یک چارک مگابایت) قطعات یک فایلپرونده را اندازهگیری کند، <link linkend="code"> در زیر آورده شده است</link>.
Suppose you could measure the entropy of the data to- and from- your network interface. Then you could see the difference between unencrypted data and encrypted data. This would be true even if some of the data in <quote>encrypted mode</quote> was not encrypted---as the outermost IP header must be if the packet is to be routable.
فرض کنید که میتوانستید آنتروپی دادههای ارسالی به کارت شبکه و دریافتی از آن را اندازهگیری کنید. آنگاه میتوانستید تفاوت بین دادههای رمزنگاریشده و رمزنگارینشده را ببینید. این گفته حتی وقتی که مقداری از دادهها در <quote>حالت رمزنگاری</quote> عملا رمزنگارینشده باشند هم درست است. مثلا اگر قرار باشد بسته قابل مسیریابی باشد، آنگاه بیرونیترین هدرسرایند IP نباید رمزنگاریشده باشد.
Internet Protocol security extensions to IPv4; required for IPv6. A protocol for negotiating encryption and authentication at the IP (host-to-host) level. SSL secures only one application socket; <application>SSH</application> secures only a login; <application>PGP</application> secures only a specified file or message. IPsec encrypts everything between two hosts.
افزونههای امنیتی پروتکلقرارداد اینترنت برای IPv4؛ که در IPv6 الزامی است، پروتکلیقراردادی است برای مذاکره کردن روشهای رمزنگاری و احراز هویت در لایه IP (هاست به هاستمیزبان به میزبان). SSL تنها یک سوکت را ایمن میکند؛ <application>SSH</application> تنها یک لاگینورود را ایمن میکند؛ <application>PGP</application> تنها یک فایلپرونده یا پیغام را ایمن میکند. ولی IPsec همه چیز را بین دو هاست رامیزبان ایمن میکند.
This experiment shows that IPsec <emphasis>does</emphasis> seem to be distributing the payload data <emphasis>uniformly</emphasis>, as encryption should. However, the experiment described here <emphasis>cannot</emphasis> detect many possible flaws in a system (none of which do I have any evidence for). These include poor key generation or exchange, data or keys being visible to others, use of weak algorithms, kernel subversion, etc. Study the source; know the code.
این آزمایش نشان میدهد که IPsec ظاهرا دارد دادهها را <emphasis>به طور یکنواخت</emphasis> <emphasis>توزیع میکند</emphasis>، همانطور که از یک رمزنگاری انتظار میرود. با این حال، آزمایشی که در اینجا شرح آن رفت <emphasis>نمیتواند</emphasis> هیچگونه نقص احتمالی را در سیستم راامانه تشخیص دهد (که برای هیچکدام از آنها هیچ نشانهای ندارم). این نقوصها میتوانند چیزهایی مثل تولید کلید ضعیف یا تبادل نادرست کلیدها، در معرض نمایش بودن کلیدها یا دادهها برای بقیه، استفاده از الگوریتم ضعیف، تخریب هسته از درون و غیره باشند. کدمنبع را بخوانید و با آن آشنا شوید.
Now run <link linkend="code">MUST</link> on the captured packets. You should see something like the following. The important thing to note is that the secure connection has 93% (6.7) of the expected value (7.18), and the <quote>normal</quote> connection has 29% (2.1) of the expected value.
حالا <link linkend="code">MUST</link> را روی بستههای ضبط شده اجرا کنید. باید چیزی مثلشبیه خروجی زیر را ببینید. نکته مهم این است که کانکشناتصال امن ۹۳٪ (۶٫.۷) از مقدار مورد انتظار (۷٫.۱۸) را دارد، و کانکشناتصال <quote>عادی</quote> تنها ۲۰۹٪ (۲٫.۱) از مقدار مورد انتظار را دارد.