Difference between revisions of "DCPcrypt/es"

From Lazarus wiki
Jump to navigationJump to search
m (New page: {{DCPcrypt}} === About === * [http://www.cityinthesky.co.uk/cryptography.html DCPcrypt] is a collection of cryptographic components for the Lazarus. * The idea behind DCPcrypt is that it...)
 
Line 1: Line 1:
{{DCPcrypt}}
+
{{DCPcrypt}}[[category:Castellano|P]][[category:Español|P]]
  
=== About ===
+
=== Sobre ===
* [http://www.cityinthesky.co.uk/cryptography.html DCPcrypt] is a collection of cryptographic components for the Lazarus.
+
* [http://www.cityinthesky.co.uk/cryptography.html DCPcrypt] es una colección de componentes criptográficos para Lazarus.
  
* The idea behind DCPcrypt is that it should be possible to "drop in" any algorithm implementation to replace another with minimum or no code changes. To aid in this goal all cryptographic components are descended from one of several base classes, TDCP_cipher for encryption algorithms and TDCP_hash for message digest algorithms.
+
* 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.
  
=== Screenshot ===
+
=== Los componentes en el IDE de Lazarus ===
 
* [[Image:Dcp1.png]]
 
* [[Image:Dcp1.png]]
  
 
* [[Image:Dcp2.png]]
 
* [[Image:Dcp2.png]]
  
=== Authors ===
+
=== Autores ===
 
* David Barton [http://www.cityinthesky.co.uk home page]
 
* David Barton [http://www.cityinthesky.co.uk home page]
  
* Port to Lazarus by barko, 2006
+
* Adpatación a Lazarus por barko, 2006
  
=== License ===
+
=== Licencias ===
The MIT License
+
   Licencia del MIT
  
Permission is hereby granted, free of charge, to any person obtaining a  
+
   Por razones legales, no se traduce el texto en inglés de la licencia, para una mejor comprensión ver [http://es.wikipedia.org/wiki/Licencia_MIT]:
copy of this software and associated documentation files (the "Software"),  
+
 
 +
   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  
 
to deal in the Software without restriction, including without limitation  
 
the rights to use, copy, modify, merge, publish, distribute, sublicense,  
 
the rights to use, copy, modify, merge, publish, distribute, sublicense,  
Line 26: Line 27:
 
Software is furnished to do so, subject to the following conditions:
 
Software is furnished to do so, subject to the following conditions:
  
The above copyright notice and this permission notice shall be included in  
+
   The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
all copies or substantial portions of the Software.
 
  
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR  
+
   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,  
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,  
 
 
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL  
 
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL  
 
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER  
 
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER  
Line 37: Line 36:
 
DEALINGS IN THE SOFTWARE.
 
DEALINGS IN THE SOFTWARE.
  
=== Download ===
+
=== Descarga ===
The package can be downloaded from the [http://sourceforge.net/project/showfiles.php?group_id=92177&package_id=179842 Lazarus CCR SourceForge site].
+
   El paquete se puede descargar desde [http://sourceforge.net/project/showfiles.php?group_id=92177&package_id=179842 el sitio Lazarus CCR SourceForge].
 +
 
 +
=== Dependencias / Requirimientos de sistema ===
  
=== Dependencies / System Requirements ===
+
   Probado en Linux y Windows XP.
  
Tested on Linux and Windows XP.
+
=== Instalación ===
 +
* En Componentes/Abrir Archivo de paquete (.lpk), localizar y abrir dcplazarus.lpk.
 +
* Compilar el paquete para verificar que todo está correcto.
 +
* Instalar y construir Lazarus (los paquetes son estáticos a día de hoy).
  
=== Installation ===
+
=== Utilización ===
* In Components/Open Package File, open dcplazarus.lpk.
 
* Compile the component to verify that everything is ok.
 
* Install and let Lazarus rebuild.
 
  
=== Usage ===
+
   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.
Please note that an appreciation of the basic principles of encryption/decryption and key management is needed to ensure the correct usage of the ciphers implemented within this package. A good introduction on this subject is provided by Bruce Schneier's "Applied Cryptography" (ISBN: 0-471-11709-9) also see the NIST publication SP800-38A for information on the block cipher chaining modes.
 
  
* Ciphers - the basic building block of DCPcrypt, the TDCP_cipher component.
+
* Cifradores (Ciphers) - El componente básico de DCPcrypt, el componente '''TDCP_cipher'''.
* Block Ciphers - the base of all block ciphers, the TDCP_blockcipher component.
+
* Cifradores de bloque (Block Ciphers) - la base de todos los Cifradores de bloque, el componente '''TDCP_blockcipher'''.
* Hashes - the base of all hash algorithms, the TDCP_hash component.
+
* Resúmenes (Hashes) - la base de todos los algoritmos  de resumen, el componente '''TDCP_hash'''.
  
See included documentation.
+
Ver la documentación incluida.
  
=== Bugs ===
+
=== Fallos ===
If you are using DCPrijndael, be advised that key sizes that are not in the AES standard are known to produce key schedules
+
   Si está utilizando '''DCPrijndael''', hay que tener presente que tamaños de las claves distintas de las del estándar AES producen cuadros clave
that are '''not''' inter-operable with other Rijndael implementations. Few implementations provide the non-standard key (or block) sizes. [http://fp.gladman.plus.com/cryptography_technology/rijndael/ Brian Gladman] and [http://jclement.ca/software/pyrijndael/ Jeffrey Clement] provide implementations (C and Python) that are known to be incompatible with DCPrijndael for non-standard key sizes. Test program provided below with comments showing the expect
+
que '''no''' son intercambiables con otras implementaciones de Rijndael. Pocos proporcionan implementaciones no estándar del tamaño de la clave (o bloque). [http://fp.gladman.plus.com/cryptography_technology/rijndael/ Brian Gladman] y [http://jclement.ca/software/pyrijndael/ Jeffrey Clement] proporcionan implementaciones (C y Python) que se sabe que son incompatibles con DCPrijndael para no tamaños no estándar de clave. El Programa de prueba comentado que sigue muestra los resultdos espreados:
results:
 
  
 
   program ctst;
 
   program ctst;
Line 112: Line 111:
 
   end.
 
   end.
  
The output that freepascal 2.2.0 produces is:
+
La salida que freepascal 2.2.0 produce es :
  
 
   128-bit block & 160-bit key results:
 
   128-bit block & 160-bit key results:
Line 121: Line 120:
 
   TRUE
 
   TRUE
  
What this meas is that using 160-bit keys you can only decrypt the output with DCPrijndael, but it won't work with other implementations. On the other hand, 265-bit keys are interoperable. The 160-bit case is important because SHA-1 outputs 160-bit hashes, which makes it a convenient way to generate a key from a password, so it's used by some (hardware) systems.
+
 
 +
   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, 265 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).
 +
 
 +
== Colaboradores ==
 +
* Traducción al castellano por [[User:Iskraelectrica]]. Diciembre de 2008

Revision as of 16:03, 29 December 2008

Deutsch (de) English (en) español (es) suomi (fi) français (fr)

Sobre

  • DCPcrypt es una colección de componentes criptográficos para Lazarus.
  • 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.

Los componentes en el IDE de Lazarus

  • Dcp1.png
  • Dcp2.png

Autores

  • Adpatación a Lazarus por barko, 2006

Licencias

   Licencia del MIT

   Por razones legales, no se traduce el texto en inglés de la licencia, para una mejor comprensión ver [1]:

   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:

   The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

   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.

Descarga

   El paquete se puede descargar desde el sitio Lazarus CCR SourceForge.

Dependencias / Requirimientos de sistema

   Probado en Linux y Windows XP.

Instalación

  • En Componentes/Abrir Archivo de paquete (.lpk), localizar y abrir dcplazarus.lpk.
  • Compilar el paquete para verificar que todo está correcto.
  • Instalar y construir Lazarus (los paquetes son estáticos a día de hoy).

Utilización

   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.

  • Cifradores (Ciphers) - El componente básico de DCPcrypt, el componente TDCP_cipher.
  • Cifradores de bloque (Block Ciphers) - la base de todos los Cifradores de bloque, el componente TDCP_blockcipher.
  • Resúmenes (Hashes) - la base de todos los algoritmos de resumen, el componente TDCP_hash.

Ver la documentación incluida.

Fallos

   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 y Jeffrey Clement proporcionan implementaciones (C y Python) que se sabe que son incompatibles con DCPrijndael para no tamaños no estándar de clave. El Programa de prueba comentado que sigue muestra los resultdos espreados:

 program ctst;
 {$mode objfpc}{$H+}
 uses
   {$IFDEF UNIX}{$IFDEF UseCThreads}
   cthreads,
   {$ENDIF}{$ENDIF}
   Sysutils, DCPrijndael;
 const
   InData: array[0..15] of byte=
     ($32,$43,$f6,$a8,$88,$5a,$30,$8d,$31,$31,$98,$a2,$e0,$37,$07,$34);
   Key1: array[0..19] of byte=
     ($2b,$7e,$15,$16,$28,$ae,$d2,$a6,$ab,$f7,$15,$88,$09,$cf,$4f,$3c,$76,$2e,$71,$60);
   Key2: array[0..31] of byte=
     ($2b,$7e,$15,$16,$28,$ae,$d2,$a6,$ab,$f7,$15,$88,$09,$cf,$4f,$3c,$76,$2e,$71,$60,
      $f3,$8b,$4d,$a5,$6a,$78,$4d,$90,$45,$19,$0c,$fe);
   OutData1: array[0..15] of byte=
     ($23,$1d,$84,$46,$39,$b3,$1b,$41,$22,$11,$cf,$e9,$37,$12,$b8,$80);
   OutData2: array[0..15] of byte=
     ($1a,$6e,$6c,$2c,$66,$2e,$7d,$a6,$50,$1f,$fb,$62,$bc,$9e,$93,$f3);
 var
   Cipher: TDCP_rijndael;
   Block: array[0..15] of byte;
 begin
 // lengths:  block = 16 bytes, key = 20 bytes
 // key     = 2b7e151628aed2a6abf7158809cf4f3c762e7160
 // input   = 3243f6a8885a308d313198a2e0370734
 // encrypt = 231d844639b31b412211cfe93712b880
 // decrypt = 3243f6a8885a308d313198a2e0370734
   Cipher:= TDCP_rijndael.Create(nil);
   Cipher.Init(Key1,Sizeof(Key1)*8,nil);
   Cipher.EncryptECB(InData,Block);
   writeln('128-bit block & 160-bit key results:');
   writeln(boolean(CompareMem(@Block,@OutData1,16)));
   Cipher.DecryptECB(Block,Block);
   writeln(boolean(CompareMem(@Block,@InData,16)));
 // lengths:  block = 16 bytes, key = 32 bytes
 // key     = 2b7e151628aed2a6abf7158809cf4f3c762e7160f38b4da56a784d9045190cfe
 // input   = 3243f6a8885a308d313198a2e0370734
 // encrypt = 1a6e6c2c662e7da6501ffb62bc9e93f3
 // decrypt = 3243f6a8885a308d313198a2e0370734
   Cipher:= TDCP_rijndael.Create(nil);
   Cipher.Init(Key2,Sizeof(Key2)*8,nil);
   Cipher.EncryptECB(InData,Block);
   writeln('128-bit block & 256-bit key results:');
   writeln(boolean(CompareMem(@Block,@OutData2,16)));
   Cipher.DecryptECB(Block,Block);
   writeln(boolean(CompareMem(@Block,@InData,16)));
 end.

La salida que freepascal 2.2.0 produce es :

 128-bit block & 160-bit key results:
 FALSE
 TRUE
 128-bit block & 256-bit key results:
 TRUE
 TRUE


   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, 265 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).

Colaboradores