Sign in Join
Wiki copytemporary

DCPcrypt/es: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: DCPcrypt/es

OldNewLine
1+### Sobre
2+
3+- [DCPcrypt](http://www.cityinthesky.co.uk/cryptography.html) es una colección de componentes criptográficos para Lazarus.
4+
5+- La idea subyacente de DCPcrypt es que debería ser posible "dejar caer" cualquier implementación de un algoritmo para sustituir a otro con un mínimo o ningún cambio en el código. Para ayudar en este objetivo todos los componentes criptográficos son descendientes de una clase base, TDCP_cipher en el caso de los algoritmos de cifrado y de TDCP_hash para los algoritmos de resumen.
6+
7+### Los componentes en el IDE de Lazarus
8+
9+<figure>
10+<img src="Dcp1.png" title="Dcp1.png" />
11+<figcaption>Dcp1.png</figcaption>
12+</figure>
13+
14+<figure>
15+<img src="Dcp2.png" title="Dcp2.png" />
16+<figcaption>Dcp2.png</figcaption>
17+</figure>
18+
19+### Autores
20+
21+- David Barton [home page](http://www.cityinthesky.co.uk)
22+
23+- Adpatación a Lazarus por barko, 2006
24+
25+### Licencias
26+
27+   Licencia del MIT
28+
29+   Por razones legales, no se traduce el texto en inglés de la licencia, para una mejor comprensión ver [1](http://es.wikipedia.org/wiki/Licencia_MIT):
30+
31+   Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
32+
33+   The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
34+
35+   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
36+
37+### Descarga
38+
39+   El paquete se puede descargar desde [el sitio Lazarus CCR SourceForge](http://sourceforge.net/project/showfiles.php?group_id=92177&package_id=179842).
40+
41+### Dependencias / Requirimientos de sistema
42+
43+   Probado en Linux y Windows XP.
44+
45+### Instalación
46+
47+- En Componentes/Abrir Archivo de paquete (.lpk), localizar y abrir dcplazarus.lpk.
48+- Compilar el paquete para verificar que todo está correcto.
49+- Instalar y construir Lazarus (los paquetes son estáticos a día de hoy).
50+
51+### Utilización
52+
53+   Tenga en cuenta que un conocimiento de los principios básicos de cifrado / descifrado y de la gestión de claves es necesario para garantizar la correcta utilización de los algoritmos de cifrado implemetnados en este paquete. Una buena introducción sobre este tema se proporciona por Bruce Schneier en "Applied Cryptography" (ISBN: 0-471-11709-9) ver también la publicación NIST SP800-38 para obtener información sobre los modos de encadenamiento de bloques de cifrado.
54+
55+- Cifradores (Ciphers) - El componente básico de DCPcrypt, el componente **TDCP_cipher**.
56+- Cifradores de bloque (Block Ciphers) - la base de todos los Cifradores de bloque, el componente **TDCP_blockcipher**.
57+- Resúmenes (Hashes) - la base de todos los algoritmos de resumen, el componente **TDCP_hash**.
58+
59+Ver la documentación incluida.
60+
61+### Fallos
62+
63+   Si está utilizando **DCPrijndael**, hay que tener presente que tamaños de las claves distintas de las del estándar AES producen cuadros clave que **no** son intercambiables con otras implementaciones de Rijndael. Pocos proporcionan implementaciones no estándar del tamaño de la clave (o bloque). [Brian Gladman](http://fp.gladman.plus.com/cryptography_technology/rijndael/) y [Jeffrey Clement](http://jclement.ca/software/pyrijndael/) proporcionan implementaciones (C y Python) que se sabe que son incompatibles con DCPrijndael para tamaños no estándar de clave. El Programa de prueba comentado que sigue muestra los resultados esperados:
64+
65+``` pascal
66+ program ctst;
67+ {$mode objfpc}{$H+}
68+ uses
69+ {$IFDEF UNIX}{$IFDEF UseCThreads}
70+ cthreads,
71+ {$ENDIF}{$ENDIF}
72+ Sysutils, DCPrijndael;
73+ const
74+ InData: array[0..15] of byte=
75+ ($32,$43,$f6,$a8,$88,$5a,$30,$8d,$31,$31,$98,$a2,$e0,$37,$07,$34);
76+ Key1: array[0..19] of byte=
77+ ($2b,$7e,$15,$16,$28,$ae,$d2,$a6,$ab,$f7,$15,$88,$09,$cf,$4f,$3c,$76,$2e,$71,$60);
78+ Key2: array[0..31] of byte=
79+ ($2b,$7e,$15,$16,$28,$ae,$d2,$a6,$ab,$f7,$15,$88,$09,$cf,$4f,$3c,$76,$2e,$71,$60,
80+ $f3,$8b,$4d,$a5,$6a,$78,$4d,$90,$45,$19,$0c,$fe);
81+ OutData1: array[0..15] of byte=
82+ ($23,$1d,$84,$46,$39,$b3,$1b,$41,$22,$11,$cf,$e9,$37,$12,$b8,$80);
83+ OutData2: array[0..15] of byte=
84+ ($1a,$6e,$6c,$2c,$66,$2e,$7d,$a6,$50,$1f,$fb,$62,$bc,$9e,$93,$f3);
85+ var
86+ Cipher: TDCP_rijndael;
87+ Block: array[0..15] of byte;
88+ begin
89+ // lengths: block = 16 bytes, key = 20 bytes
90+ // key = 2b7e151628aed2a6abf7158809cf4f3c762e7160
91+ // input = 3243f6a8885a308d313198a2e0370734
92+ // encrypt = 231d844639b31b412211cfe93712b880
93+ // decrypt = 3243f6a8885a308d313198a2e0370734
94+ Cipher:= TDCP_rijndael.Create(nil);
95+ Cipher.Init(Key1,Sizeof(Key1)*8,nil);
96+ Cipher.EncryptECB(InData,Block);
97+ writeln('128-bit block & 160-bit key results:');
98+ writeln(boolean(CompareMem(@Block,@OutData1,16)));
99+ Cipher.DecryptECB(Block,Block);
100+ writeln(boolean(CompareMem(@Block,@InData,16)));
101+ // lengths: block = 16 bytes, key = 32 bytes
102+ // key = 2b7e151628aed2a6abf7158809cf4f3c762e7160f38b4da56a784d9045190cfe
103+ // input = 3243f6a8885a308d313198a2e0370734
104+ // encrypt = 1a6e6c2c662e7da6501ffb62bc9e93f3
105+ // decrypt = 3243f6a8885a308d313198a2e0370734
106+ Cipher:= TDCP_rijndael.Create(nil);
107+ Cipher.Init(Key2,Sizeof(Key2)*8,nil);
108+ Cipher.EncryptECB(InData,Block);
109+ writeln('128-bit block & 256-bit key results:');
110+ writeln(boolean(CompareMem(@Block,@OutData2,16)));
111+ Cipher.DecryptECB(Block,Block);
112+ writeln(boolean(CompareMem(@Block,@InData,16)));
113+ end.
114+```
115+
116+   La salida que freepascal 2.2.0 produce es :
117+
118+```text
119+ 128-bit block & 160-bit key results:
120+ FALSE
121+ TRUE
122+ 128-bit block & 256-bit key results:
123+ TRUE
124+ TRUE
125+```
126+
127+   Esto muestra que usando de claves de 160 bits sólo se puede descifrar la salida con DCPrijndael, pero no va a trabajar con otras implementaciones. Por otra parte, 256 bits son interoperables. El caso de 160-bits es importante porque SHA-1 produce resúmenes de 160-bits, lo que lo convierte en una manera adecuada para generar una clave de una contraseña, por lo que es utilizado por algunos sistemas (hardware).
128+
129+## Colaboradores
130+
131+- Traducción al castellano por Iskraelectrica. Diciembre de 2008
132+
133+---
134+*From the Free Pascal wiki, page "DCPcrypt/es", as it stood on 2020-02-12 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
135+Category: Castellano
136+Category: Español

Back to history