Translation

(itstool) path: sect1/programlisting
English
/*
ULISCAN.c ---blocksize of 8

1 Oct 98
1 Dec 98
21 Dec 98 uliscan.c derived from ueli8.c

This version has // comments removed for Sun cc

This implements Ueli M Maurer's "Universal Statistical Test for Random
Bit Generators" using L=8

Accepts a filename on the command line; writes its results, with other
info, to stdout.

Handles input file exhaustion gracefully.

Ref: J. Cryptology v 5 no 2, 1992 pp 89-105
also on the web somewhere, which is where I found it.

-David Honig
honig@sprynet.com

Usage:
ULISCAN filename
outputs to stdout
*/

#define L 8
#define V (1<<L)
#define Q (10*V)
#define K (100 *Q)
#define MAXSAMP (Q + K)

#include <stdio.h>
#include <math.h>

int main(argc, argv)
int argc;
char **argv;
{
FILE *fptr;
int i,j;
int b, c;
int table[V];
double sum = 0.0;
int iproduct = 1;
int run;

extern double log(/* double x */);

printf("Uliscan 21 Dec 98 \nL=%d %d %d \n", L, V, MAXSAMP);

if (argc < 2) {
printf("Usage: Uliscan filename\n");
exit(-1);
} else {
printf("Measuring file %s\n", argv[1]);
}

fptr = fopen(argv[1],"rb");

if (fptr == NULL) {
printf("Can't find %s\n", argv[1]);
exit(-1);
}

for (i = 0; i < V; i++) {
table[i] = 0;
}

for (i = 0; i < Q; i++) {
b = fgetc(fptr);
table[b] = i;
}

printf("Init done\n");

printf("Expected value for L=8 is 7.1836656\n");

run = 1;

while (run) {
sum = 0.0;
iproduct = 1;

if (run)
for (i = Q; run && i < Q + K; i++) {
j = i;
b = fgetc(fptr);

if (b < 0)
run = 0;

if (run) {
if (table[b] > j)
j += K;

sum += log((double)(j-table[b]));

table[b] = i;
}
}

if (!run)
printf("Premature end of file; read %d blocks.\n", i - Q);

sum = (sum/((double)(i - Q))) / log(2.0);
printf("%4.4f ", sum);

for (i = 0; i < (int)(sum*8.0 + 0.50); i++)
printf("-");

printf("\n");

/* refill initial table */
if (0) {
for (i = 0; i < Q; i++) {
b = fgetc(fptr);
if (b < 0) {
run = 0;
} else {
table[b] = i;
}
}
}
}
}
2280/22800
Context English Spanish State
In the <quote>secure</quote> window, run the <trademark class="registered">UNIX</trademark> command <citerefentry><refentrytitle>yes</refentrytitle><manvolnum>1</manvolnum></citerefentry>, which will stream the <literal>y</literal> character. After a while, stop this. Switch to the insecure window, and repeat. After a while, stop. En la ventana <quote>segura</quote>, ejecute el comando <trademark class="registered">UNIX</trademark> <citerefentry><refentrytitle>yes</refentrytitle><manvolnum>1</manvolnum></citerefentry>, que transmitirá el carácter <literal>y</literal>. Después de un rato, detenga el comando. Cambie a la ventana insegura, y repita. Espere un poco, detenga el comando.
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. Ahora ejecute <link linkend="code">MUST</link> en los paquetes capturados. Debería ver algo como lo siguiente. Lo importante a tener en cuenta es que la conexión segura tiene un 93% (6,7) del valor esperado (7,18), y la conexión <quote>normal</quote> tiene un 29% (2,1) del valor esperado.
<prompt>%</prompt> <userinput>tcpdump -c 4000 -s 10000 -w <replaceable>ipsecdemo.bin</replaceable></userinput>
<prompt>%</prompt> <userinput>uliscan <replaceable>ipsecdemo.bin</replaceable></userinput>

Uliscan 21 Dec 98
L=8 256 258560
Measuring file ipsecdemo.bin
Init done
Expected value for L=8 is 7.1836656
6.9396 --------------------------------------------------------
6.6177 -----------------------------------------------------
6.4100 ---------------------------------------------------
2.1101 -----------------
2.0838 -----------------
2.0983 -----------------
<prompt>%</prompt> <userinput>tcpdump -c 4000 -s 10000 -w <replaceable>ipsecdemo.bin</replaceable></userinput>
<prompt>%</prompt> <userinput>uliscan <replaceable>ipsecdemo.bin</replaceable></userinput>

Uliscan 21 Dec 98
L=8 256 258560
Measuring file ipsecdemo.bin
Init done
Expected value for L=8 is 7.1836656
6.9396 --------------------------------------------------------
6.6177 -----------------------------------------------------
6.4100 ---------------------------------------------------
2.1101 -----------------
2.0838 -----------------
2.0983 -----------------
Caveat Advertencia
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. Este experimento muestra que IPsec <emphasis>parece</emphasis> estar distribuyendo los datos de la carga útil <emphasis>uniformemente</emphasis>, como debe hacerlo el cifrado. Sin embargo, el experimento aquí descrito <emphasis>puede no</emphasis> detectar muchas de las posibles fallas del sistema (para las cuales no tengo evidencias). Esto incluye la generación o intercambio de claves deficientes, datos o claves visibles para otros, uso de algoritmos débiles, subversión del kernel, etc. Estudie el código; conozca el código.
IPsec---Definition IPsec---Definición
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. Extensiones de seguridad del Protocolo de Internet para IPv4; requerido para IPv6. Un protocolo para negociar el cifrado y la autenticación a nivel de IP (host a host). SSL solo protege un socket de aplicación. <application>SSH</application> protege solo el login. <application>PGP</application> protege un archivo o mensaje específico. IPsec encripta todo entre dos hosts.
Installing IPsec Instalando IPsec
Most of the modern versions of FreeBSD have IPsec support in their base source. So you will need to include the <option>IPSEC</option> option in your kernel config and, after kernel rebuild and reinstall, configure IPsec connections using <citerefentry><refentrytitle>setkey</refentrytitle><manvolnum>8</manvolnum></citerefentry> command. La mayoría de las versiones modernas de FreeBSD soportan IPsec en su código base. Por lo tanto, deberá incluir la opción <option>IPSEC</option> en la configuración de su kernel y, después de recompilar y reinstalar el kernel, configure las conexiones de IPsec usando el comando <citerefentry><refentrytitle>setkey</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
A comprehensive guide on running IPsec on FreeBSD is provided in <link xlink:href="@@URL_RELPREFIX@@/doc/en_US.ISO8859-1/books/handbook/ipsec.html">FreeBSD Handbook</link>. En el <link xlink:href="@@URL_RELPREFIX@@/doc/es_ES.ISO8859-1/books/handbook/ipsec.html">Manual de FreeBSD</link> se proporciona una guía completa sobre cómo ejecutar IPsec en FreeBSD.
src/sys/i386/conf/KERNELNAME src/sys/i386/conf/KERNELNAME
This needs to be present in the kernel config file in order to capture network data with <citerefentry><refentrytitle>tcpdump</refentrytitle><manvolnum>1</manvolnum></citerefentry>. Be sure to run <citerefentry><refentrytitle>config</refentrytitle><manvolnum>8</manvolnum></citerefentry> after adding this, and rebuild and reinstall. Esto debe estar presente en el archivo de configuración del kernel para capturar datos de red con <citerefentry><refentrytitle>tcpdump</refentrytitle><manvolnum>1</manvolnum></citerefentry>. Asegúrese de ejecutar <citerefentry><refentrytitle>config</refentrytitle><manvolnum>8</manvolnum></citerefentry> después de agregar esto, recompilar y reinstalar.
device bpf device bpf
Maurer's Universal Statistical Test (for block size=8 bits) Maurer's Universal Statistical Test (tamaño de bloque=8 bits)
You can find the same code at <link xlink:href="https://web.archive.org/web/20031204230654/http://www.geocities.com:80/SiliconValley/Code/4704/uliscanc.txt"> this link</link>. Puede encontrar el mismo código fuente en <link xlink:href="https://web.archive.org/web/20031204230654/http://www.geocities.com:80/SiliconValley/Code/4704/uliscanc.txt">este enlace</link>.
/*
ULISCAN.c ---blocksize of 8

1 Oct 98
1 Dec 98
21 Dec 98 uliscan.c derived from ueli8.c

This version has // comments removed for Sun cc

This implements Ueli M Maurer's "Universal Statistical Test for Random
Bit Generators" using L=8

Accepts a filename on the command line; writes its results, with other
info, to stdout.

Handles input file exhaustion gracefully.

Ref: J. Cryptology v 5 no 2, 1992 pp 89-105
also on the web somewhere, which is where I found it.

-David Honig
honig@sprynet.com

Usage:
ULISCAN filename
outputs to stdout
*/

#define L 8
#define V (1&lt;&lt;L)
#define Q (10*V)
#define K (100 *Q)
#define MAXSAMP (Q + K)

#include &lt;stdio.h&gt;
#include &lt;math.h&gt;

int main(argc, argv)
int argc;
char **argv;
{
FILE *fptr;
int i,j;
int b, c;
int table[V];
double sum = 0.0;
int iproduct = 1;
int run;

extern double log(/* double x */);

printf("Uliscan 21 Dec 98 \nL=%d %d %d \n", L, V, MAXSAMP);

if (argc &lt; 2) {
printf("Usage: Uliscan filename\n");
exit(-1);
} else {
printf("Measuring file %s\n", argv[1]);
}

fptr = fopen(argv[1],"rb");

if (fptr == NULL) {
printf("Can't find %s\n", argv[1]);
exit(-1);
}

for (i = 0; i &lt; V; i++) {
table[i] = 0;
}

for (i = 0; i &lt; Q; i++) {
b = fgetc(fptr);
table[b] = i;
}

printf("Init done\n");

printf("Expected value for L=8 is 7.1836656\n");

run = 1;

while (run) {
sum = 0.0;
iproduct = 1;

if (run)
for (i = Q; run &amp;&amp; i &lt; Q + K; i++) {
j = i;
b = fgetc(fptr);

if (b &lt; 0)
run = 0;

if (run) {
if (table[b] &gt; j)
j += K;

sum += log((double)(j-table[b]));

table[b] = i;
}
}

if (!run)
printf("Premature end of file; read %d blocks.\n", i - Q);

sum = (sum/((double)(i - Q))) / log(2.0);
printf("%4.4f ", sum);

for (i = 0; i &lt; (int)(sum*8.0 + 0.50); i++)
printf("-");

printf("\n");

/* refill initial table */
if (0) {
for (i = 0; i &lt; Q; i++) {
b = fgetc(fptr);
if (b &lt; 0) {
run = 0;
} else {
table[b] = i;
}
}
}
}
}
/*
ULISCAN.c ---blocksize of 8

1 Oct 98
1 Dec 98
21 Dec 98 uliscan.c derived from ueli8.c

This version has // comments removed for Sun cc

This implements Ueli M Maurer's "Universal Statistical Test for Random
Bit Generators" using L=8

Accepts a filename on the command line; writes its results, with other
info, to stdout.

Handles input file exhaustion gracefully.

Ref: J. Cryptology v 5 no 2, 1992 pp 89-105
also on the web somewhere, which is where I found it.

-David Honig
honig@sprynet.com

Usage:
ULISCAN filename
outputs to stdout
*/

#define L 8
#define V (1&lt;&lt;L)
#define Q (10*V)
#define K (100 *Q)
#define MAXSAMP (Q + K)

#include &lt;stdio.h&gt;
#include &lt;math.h&gt;

int main(argc, argv)
int argc;
char **argv;
{
FILE *fptr;
int i,j;
int b, c;
int table[V];
double sum = 0.0;
int iproduct = 1;
int run;

extern double log(/* double x */);

printf("Uliscan 21 Dec 98 \nL=%d %d %d \n", L, V, MAXSAMP);

if (argc &lt; 2) {
printf("Usage: Uliscan filename\n");
exit(-1);
} else {
printf("Measuring file %s\n", argv[1]);
}

fptr = fopen(argv[1],"rb");

if (fptr == NULL) {
printf("Can't find %s\n", argv[1]);
exit(-1);
}

for (i = 0; i &lt; V; i++) {
table[i] = 0;
}

for (i = 0; i &lt; Q; i++) {
b = fgetc(fptr);
table[b] = i;
}

printf("Init done\n");

printf("Expected value for L=8 is 7.1836656\n");

run = 1;

while (run) {
sum = 0.0;
iproduct = 1;

if (run)
for (i = Q; run &amp;&amp; i &lt; Q + K; i++) {
j = i;
b = fgetc(fptr);

if (b &lt; 0)
run = 0;

if (run) {
if (table[b] &gt; j)
j += K;

sum += log((double)(j-table[b]));

table[b] = i;
}
}

if (!run)
printf("Premature end of file; read %d blocks.\n", i - Q);

sum = (sum/((double)(i - Q))) / log(2.0);
printf("%4.4f ", sum);

for (i = 0; i &lt; (int)(sum*8.0 + 0.50); i++)
printf("-");

printf("\n");

/* refill initial table */
if (0) {
for (i = 0; i &lt; Q; i++) {
b = fgetc(fptr);
if (b &lt; 0) {
run = 0;
} else {
table[b] = i;
}
}
}
}
}

Loading…

User avatar None

New source string

FreeBSD Doc / articles_ipsec-mustSpanish

New source string a year ago
Browse all component changes

Things to check

Unchanged translation

Source and translation are identical

Reset

Glossary

English Spanish
No related strings found in the glossary.

Source information

Source string comment
(itstool) path: sect1/programlisting
Flags
no-wrap
Source string location
article.translate.xml:213
String age
a year ago
Source string age
a year ago
Translation file
articles/es_ES/ipsec-must.po, string 44