ES2613881B1 - HYBRID METHOD OF ENCRYPTING AND DEFRYING ELECTRONIC DOCUMENTS - Google Patents
HYBRID METHOD OF ENCRYPTING AND DEFRYING ELECTRONIC DOCUMENTS Download PDFInfo
- Publication number
- ES2613881B1 ES2613881B1 ES201630804A ES201630804A ES2613881B1 ES 2613881 B1 ES2613881 B1 ES 2613881B1 ES 201630804 A ES201630804 A ES 201630804A ES 201630804 A ES201630804 A ES 201630804A ES 2613881 B1 ES2613881 B1 ES 2613881B1
- Authority
- ES
- Spain
- Prior art keywords
- encrypted
- key
- identifier
- document
- hash
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 83
- 230000008569 process Effects 0.000 claims abstract description 42
- VBMOHECZZWVLFJ-GXTUVTBFSA-N (2s)-2-[[(2s)-6-amino-2-[[(2s)-6-amino-2-[[(2s,3r)-2-[[(2s,3r)-2-[[(2s)-6-amino-2-[[(2s)-2-[[(2s)-6-amino-2-[[(2s)-2-[[(2s)-2-[[(2s)-2,6-diaminohexanoyl]amino]-5-(diaminomethylideneamino)pentanoyl]amino]propanoyl]amino]hexanoyl]amino]propanoyl]amino]hexan Chemical compound NC(N)=NCCC[C@@H](C(O)=O)NC(=O)[C@H](CCCCN)NC(=O)[C@H](CCCCN)NC(=O)[C@H]([C@@H](C)O)NC(=O)[C@H]([C@H](O)C)NC(=O)[C@H](CCCCN)NC(=O)[C@H](C)NC(=O)[C@H](CCCCN)NC(=O)[C@H](C)NC(=O)[C@H](CCCN=C(N)N)NC(=O)[C@@H](N)CCCCN VBMOHECZZWVLFJ-GXTUVTBFSA-N 0.000 claims description 19
- 108010068904 lysyl-arginyl-alanyl-lysyl-alanyl-lysyl-threonyl-threonyl-lysyl-lysyl-arginine Proteins 0.000 claims description 19
- 230000000295 complement effect Effects 0.000 claims description 4
- 238000012795 verification Methods 0.000 claims 1
- 230000029087 digestion Effects 0.000 description 7
- 239000008186 active pharmaceutical agent Substances 0.000 description 4
- 238000004883 computer application Methods 0.000 description 4
- 238000003908 quality control method Methods 0.000 description 4
- 238000006243 chemical reaction Methods 0.000 description 3
- 238000005538 encapsulation Methods 0.000 description 3
- 238000004377 microelectronic Methods 0.000 description 3
- 230000003213 activating effect Effects 0.000 description 2
- 230000007812 deficiency Effects 0.000 description 2
- 230000008520 organization Effects 0.000 description 2
- 241001589086 Bellapiscis medius Species 0.000 description 1
- 101100217298 Mus musculus Aspm gene Proteins 0.000 description 1
- 230000004913 activation Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 238000009482 thermal adhesion granulation Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
- H04L63/045—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply hybrid encryption, i.e. combination of symmetric and asymmetric encryption
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Storage Device Security (AREA)
Abstract
Método híbrido de cifrado y descifrado de documentos electrónicos.#Se genera una clave con un algoritmo aleatorio de generación de números (20); Se cifra el documento empleando la clave y un algoritmo simétrico (31); Se descifra el documento y se obtiene su hash comparándolo con el primer hash; si el producto a cifrar asimétricamente es mayor que la clave pública, se divide en bloques enteros de bytes; la clave simétrica o los bloques son cifrados con un algoritmo asimétrico (32) y una o varias claves públicas; un identificador de aplicación es etiquetado para ser encapsulado; la información para revertir el proceso es etiquetada y encapsulada en el documento cifrado; se comprueba el identificador de aplicación; se extrae la información encapsulada; con el par de clave privada se descifra la clave simétrica o sus bloques; los bloques son unidos; con la clave simétrica se descifra el documento.Hybrid method of encryption and decryption of electronic documents. # A key is generated with a random number generation algorithm (20); The document is encrypted using the key and a symmetric algorithm (31); The document is decrypted and its hash is obtained by comparing it with the first hash; if the product to be encrypted asymmetrically is larger than the public key, it is divided into whole blocks of bytes; the symmetric key or blocks are encrypted with an asymmetric algorithm (32) and one or more public keys; An application identifier is tagged to be encapsulated; the information to reverse the process is labeled and encapsulated in the encrypted document; the application identifier is checked; encapsulated information is extracted; the symmetric key or its blocks are decrypted with the private key pair; the blocks are united; the document is decrypted with the symmetric key.
Description
MÉTODO HíBRIDO DE CIFRADO Y DESCIFRADO DE DOCUMENTOS ELECTRONICOS HYBRID METHOD OF ENCRYPTING AND DEFRYING ELECTRONIC DOCUMENTS
SECTOR DE LA TÉCNICA SECTOR OF THE TECHNIQUE
La presente invención pertenece al seclor de la seguridad informática. La presente invención se refiere a un nuevo procedimiento que hace posible el cifrado híbrido sin límite del número o del tamaño de las claves asimétricas empleadas, y desarrolla nuevos procedimientos que son mejoras de la técnica actual haciendo posible: asociar los documentos electrónicos procesados, con las aplicaciones informáticas que los procesan; generar automáticamente claves simétricas sin límite de tamaño; realizar un control de calidad del cifrado mediante la obtención y comparación de huellas digitales hash; incluir y encapsular en el documento electrónico cifrado toda la información The present invention belongs to the IT security department. The present invention relates to a new method that makes hybrid encryption without limit of the number or size of the asymmetric keys used possible, and develops new procedures that are improvements of the current technique making it possible to: associate the processed electronic documents with the computer applications that process them; automatically generate symmetric keys with no size limit; Perform quality control of encryption by obtaining and comparing hash fingerprints; include and encapsulate in the encrypted electronic document all the information
criptográfica necesaria para revertir el proceso de cifrado; codificar de forma segura el documento electrónico cifrado para su envío por internet; utilizar claves públicas que no están sometidas a periodos de vigencia limitados, pero sí que están asociadas a claves privadas almacenadas en token de hardware criptográficos de sistemas PKI. cryptographic necessary to reverse the encryption process; securely encrypt the encrypted electronic document for online submission; use public keys that are not subject to limited periods of validity, but are associated with private keys stored in cryptographic hardware tokens of PKI systems.
ANTECEDENTES DE LA INVENCiÓN BACKGROUND OF THE INVENTION
Existe extensa documentación que describe sistemas de cifrado híbridos, no obstante todos ellos padecen importantes limitaciones que esta invención resuelve definitivamente. Las limitaciones son: There is extensive documentation describing hybrid encryption systems, however all of them suffer from important limitations that this invention definitely resolves. The limitations are:
1.-En criptografía asimétrica el documento que se va a cifrar no puede ser mayor que el par de clave pública que se va a utilizar, en el caso de esta invención el documento a cifrar asimétricamente es la clave simétrica. Si una clave simétrica es cifrada por una asimétrica, el producto resultante es de tal tamaño que generalmente ya no puede volver a ser cifrado por otras claves asimétricas, salvo que la clave simétrica sea de tan reducida longitud que no puede ser calificada criptográficamente segura. La limitación de la técnica actual se evidencia cuando se desea cifrar con varias claves públicas una clave simétrica de un tamaño que pueda ser considerado criptográficamente seguro. Por ejemplo, una clave simétrica de 256 bits al ser cifrada 1.-In asymmetric cryptography the document to be encrypted cannot be larger than the public key pair to be used, in the case of this invention the document to be encrypted asymmetrically is the symmetric key. If a symmetric key is encrypted by an asymmetric one, the resulting product is of such size that it can no longer be re-encrypted by other asymmetric keys, unless the symmetric key is of such a short length that it cannot be cryptographically safe. The limitation of the current technique is evident when it is desired to encrypt with several public keys a symmetric key of a size that can be considered cryptographically secure. For example, a 256-bit symmetric key when encrypted
con una clave pública de 2048 bits, genera una clave simétrica cifrada de 256 bytes (1 byte = a 8 bits), es decir 2048 bits. Si la clave pública fuera de 1024 bits y la simétrica de 128 bits, se obtendría una clave cifrada de 128 bytes, es decir 1024 bits. Por lo tanto, el producto cifrado resultante ya no se puede volver a cifrar con claves de similar longitud. Existen numerosos entornos en los que el requerimiento de múltiples operadores es necesario, por ejemplo para controlar el acceso a documentos electrónicos altamente confidenciales, en los que se requiere la presencia de dos o más personas autorizadas. 2.-Otra de las limitaciones que presenta el estado actual de la técnica, viene igualmente derivada de la limitación de tamaño. Aunque se documenta en la Patente CN102404120 (A) la obtención automatica de claves simétricas mediante algoritmos de generación de números aleatorios, estos algoritmos se restringen específicamente a 32 bits, un tamaño considerado criptográficamente como inseguro. Es de gran interés la posibilidad de obtener automáticamente, mediante el uso algoritmos de generación aleatoria de números, claves simétricas sin limitación de tamaño, puesto que al tratarse de un cifrado híbrido no es necesario que el usuario conozca la clave de cifrado simétrico empleada para cifrar el documento, de esta forma la protección de los documentos se puede realizar sin intervención humana. 3.-Una nueva limitación de los sistemas de cifrado híbridos actuales, es que solo son capaces de encapsular una única clave simétrica cifrada, no existe ningún procedimiento que permita encapsular productos cifrados por múltiples claves asimétricas, o añadir otra información necesaria para revertir este proceso de cifrado. Al encapsular exclusivamente los bytes de cifrado, la información debe de tener siempre la misma longitud, lo cual condiciona el propio proceso de cifrado. 4.-Otra de las limitaciones que presenta la técnica actual, es que solo ofrece dos modalidades de uso para acceder a una clave pública, cada una de ellas con importantes carencias funcionales: With a 2048-bit public key, it generates an encrypted symmetric key of 256 bytes (1 byte = 8-bit), that is 2048 bits. If the public key were 1024 bits and the symmetric one was 128 bits, an encrypted key of 128 bytes would be obtained, that is 1024 bits. Therefore, the resulting encrypted product can no longer be re-encrypted with keys of similar length. There are numerous environments in which the requirement of multiple operators is necessary, for example to control access to highly confidential electronic documents, in which the presence of two or more authorized persons is required. 2.-Another of the limitations presented by the current state of the art is also derived from the size limitation. Although it is documented in Patent CN102404120 (A) the automatic obtaining of symmetric keys by means of random number generation algorithms, these algorithms are specifically restricted to 32 bits, a size considered cryptographically as insecure. It is of great interest the possibility of automatically obtaining, through the use of random number generation algorithms, symmetric keys without size limitation, since since it is a hybrid encryption it is not necessary for the user to know the symmetric encryption key used to encrypt the document, in this way the protection of the documents can be carried out without human intervention. 3.-A new limitation of the current hybrid encryption systems is that they are only capable of encapsulating a single encrypted symmetric key, there is no procedure that allows encapsulating products encrypted by multiple asymmetric keys, or adding other information necessary to reverse this process Encryption When encapsulating the encryption bytes exclusively, the information must always be the same length, which determines the encryption process itself. 4.-Another of the limitations presented by the current technique is that it only offers two modes of use to access a public key, each of them with significant functional deficiencies:
a) Pretty Good Privacy (PGP). Este programa permite la generación de un par de claves, pública y privada, sin que la clave pública tenga que estar asociada a un certificado electrónico. El problema radica en que el sistema no es compatible con los actuales token hardware criptográficos. Esto presupone una importante carencia funcional dado que solo estos token garantizan que la clave privada es inaccesible e iduplicable. a) Pretty Good Privacy (PGP). This program allows the generation of a public and private key pair, without the public key having to be associated with an electronic certificate. The problem is that the system is not compatible with current cryptographic hardware token. This presupposes a significant functional lack since only these tokens guarantee that the private key is inaccessible and iduplicable.
b) Infraestructuras de Clave Pública (PKI). Este sistema aunque es compatible con la práctica totalidad de token hardware criptográficos, requiere la emisión del certificado electrónico x509v3 , lo cual plantea un grave problema funcional. La legislación internacional en materia de certificados electrónicos y las normas técnicas relativas a los mismos, desde la RFC 2459 a la RFC 5280 entre otras, determinan la obligación de establecer un periodo de vigencia, de hecho el titular del certificado suele firmar un documento comprometiéndose a cesar en el uso de la clave privada a partir del momento en que caduca el certificado. En un entorno en el que la clave privada es necesaria para poder acceder a la información a lo largo del tiempo, el problema tiene un alcance extremadamente grave. b) Public Key Infrastructures (PKI). Although this system is compatible with almost all cryptographic hardware tokens, it requires the issuance of the x509v3 electronic certificate, which poses a serious functional problem. International legislation on electronic certificates and the technical standards related to them, from RFC 2459 to RFC 5280 among others, determine the obligation to establish a period of validity, in fact the certificate holder usually signs a document committing to cease to use the private key from the moment the certificate expires. In an environment where the private key is necessary to be able to access the information over time, the problem has an extremely serious scope.
En ambos supuestos, cada clave pública está almacenada en un único contenedor, lo cual presupone una limitación en procesos automatizados al tener que manejar tantos contenedores como claves públicas intervienen. In both cases, each public key is stored in a single container, which presupposes a limitation in automated processes by having to handle as many containers as public keys intervene.
5.-Una carencia que presentan los procesos de cifrado es el control de la calidad del cifrado, que pese a su importancia es prácticamente inexistente. Es esencial garantizar la recuperación del documento sin que el mismo pierda su esencia guardando su total integridad respecto al original. Son numerosos los factores que pueden ocasionar la corrupción de un documento al ser cifrado, desde un error en la codificación, hasta un fallo fortuito de hardware. Muchos de estos fallos son indetectables en el momento del cifrado, se afloran cuando se desea recuperar el documento electrónico. 6.-Otra carencia es la transferencia de documentos electrónicos cifrados a través de Internet, generalmente se emplea la técnica de codificarlos previamente a Base 64, pero esta codificación aunque altamente fiable presenta también importantes carencias, tal y como reconoce la recomendación internacional RFC 1521 de la organización internacional Internet Engineering Task Force (lETF), que en su apartado 5.-A lack of encryption processes is the quality control of encryption, which despite its importance is virtually non-existent. It is essential to ensure the recovery of the document without losing its essence while maintaining its complete integrity with respect to the original. There are numerous factors that can cause the corruption of a document when it is encrypted, from an error in coding, to a fortuitous hardware failure. Many of these failures are undetectable at the time of encryption, they emerge when you want to recover the electronic document. 6.-Another lack is the transfer of encrypted electronic documents through the Internet, the technique of encoding them previously to Base 64 is generally used, but this coding although highly reliable also presents important deficiencies, as recognized by the international recommendation RFC 1521 of the international organization Internet Engineering Task Force (lETF), which in its section
7.1 .1., indica que se debe de prestar máxima atención a los caracteres multibyte (MBCS), p.ej. caracteres chinos, o el kanji chino, que entre otros muchos idiomas no pueden ser representados por 8 bites, invariablemente requieren 16 bits. Y se deja para futuras revisiones resolver este problema. 7.-Otra carencia que presentan los procesos de cifrado es que la aplicación empleada y los documentos por ella procesados no están íntimamente asociados. En contextos de alta seguridad es esencial tener un control de las aplicaciones informáticas que pueden ser empleadas para acceder a la información. 7.1 .1., Indicates that maximum attention should be given to multibyte characters (MBCS), eg Chinese characters, or Chinese Kanji, which among many other languages cannot be represented by 8 bits, invariably require 16 bits . And it is left for future revisions to solve this problem. 7.-Another lack of encryption processes is that the application used and the documents processed by it are not closely associated. In high security contexts it is essential to have a control of the computer applications that can be used to access the information.
Se ha realizado un amplio estudio sobre las patentes existentes. Ninguna de ellas describe los métodos reivindicados en esta invención. Y alguna de las analizadas no hacen sino confirmar las limitaciones que padece el estado de la técnica actual. Concretamente: An extensive study on existing patents has been carried out. None of them describe the methods claimed in this invention. And some of those analyzed only confirm the limitations of the state of the art. Specifically:
La publicación "Moderne Verfahren der Kryptographie" ("Procedimientos modernos de criptografía") Beutelspacher, Schwenk, Wolfenstetter, 3. Edición, 1999, Vieweg Verlag, contiene una descripción detallada de los procedimientos criptográficos de clave pública. The publication "Moderne Verfahren der Kryptographie" ("Modern Cryptography Procedures") Beutelspacher, Schwenk, Wolfenstetter, 3. Edition, 1999, Vieweg Verlag, contains a detailed description of the public key cryptographic procedures.
El sistema criptográfico RSA que se describe en la Patente de EE.U U. N° 4.405.829 concedida a Rivest y otros describe un ejemplo de metodología de un sistema criptográfico de clave pública. The RSA cryptographic system described in U.S. Patent No. 4,405,829 issued to Rivest et al. Describes an example of a public key cryptographic system methodology.
La Patente CN102404120 (A) -Encryption method and encryption system for electronic documents Que incluye un modulo de generación aleatoria de números, que son utilizados para cifrar simétricamente un documento electrónico; la clave simétrica es cifrada con una clave pública que obtiene de un certificado electrónico, único procedimiento posible según la descripción que se realiza en la patente; edita el documento electrónico e incluye en él la clave simétrica cifrada, sin ningún orden ni estructura especifico. La Reivindicación 1, limita expresamente el algoritmo de generación de números aleatorio al tamaño de 32 bits, es decir una clave simétrica de 4 bytes, algo que critográficamente se considera en la actualidad un cifrado de baja seguridad. Es evidente que los autores en el momento de la redacción, eran conscientes del problema de la longitud de claves que tiene la criptiografía simétrica, y no lograron resolver esta limitación . Patent CN102404120 (A) -Encryption method and encryption system for electronic documents That includes a module for random number generation, which are used to symmetrically encrypt an electronic document; The symmetric key is encrypted with a public key obtained from an electronic certificate, the only possible procedure according to the description made in the patent; edit the electronic document and include the encrypted symmetric key, without any specific order or structure. Claim 1 expressly limits the algorithm of random number generation to the size of 32 bits, that is to say a symmetric 4-byte key, something that is critically considered a low security encryption today. It is clear that the authors at the time of writing were aware of the problem of the length of keys that symmetric cryptography has, and failed to resolve this limitation.
.EXPLlCACIÓN DE LA INVENCiÓN . EXPLANATION OF THE INVENTION
Con el fin de alcanzar los objetivos y evitar los inconvenientes mencionados en los apartados anteriores, esta invención desarrolla los siguientes procedimientos: In order to achieve the objectives and avoid the inconveniences mentioned in the previous sections, this invention develops the following procedures:
1.-La limitación de tamaño de la clave simétrica respecto a la clave pública, y la limitación de emplear múltiples claves públicas en un cifrado por capas, se resuelve mediante el procedimiento de calcular antes de cada proceso de cifrado el tamaño del producto a cifrar asimétricamente y, si es de mayor tamaño que la clave asimétrica, el producto a cifrar se divide en bloques enteros de bytes 0, incluso, según necesidad, esos bloques se pueden subdividir con el fin de que el producto a cifrar sea siempre de menor tamaño que la clave pública que se va a emplear, no existe limitación de longitud o numero de claves a emplear. Para revertir el proceso, primero se descifra cada bloque siguiendo el orden inverso al del cifrado, y empleando el par de clave privada asociada a la clave pública que se empleó para cifrar; una vez descifrado cada grupo de bloques, se van uniendo siguiendo el orden inverso en que fueron subdivididos o divididos hasta obtener la clave simétrica. Todos los lenguajes de programación tienen la capacidad de editar, dividir y subdividir en bloques enteros de bytes una clave simétrica, para el cifrado asimétrico se emplea un algoritmo de cifrado asimétrico y el mismo algoritmo para descifrar, existen numerosos algoritmos de libre uso, p.ej. RSA, EIGamal, DSA, etc., extensamente documentados en Internet; 2.-Una vez resuelta la limitación de tamaño de la clave simétrica, esta invención presenta la novedad de generar automáticamente, empleando un algoritmo de generación de números aleatorios, una clave simétrica sin limitación de tamaño; existen múltiples algoritmos que permiten obtener claves seguras, por ejemplo de tamaño igualo superior a los 128 bits, extensamente documentados en Internet p. ej. 1.-The limitation of the size of the symmetric key with respect to the public key, and the limitation of using multiple public keys in a layered encryption, is resolved by the procedure of calculating before each encryption process the size of the product to be encrypted asymmetrically and, if it is larger than the asymmetric key, the product to be encrypted is divided into whole blocks of bytes 0, even, as required, those blocks can be subdivided so that the product to be encrypted is always smaller that the public key to be used, there is no limitation of length or number of keys to be used. To reverse the process, each block is first decrypted in the reverse order of encryption, and using the private key pair associated with the public key that was used to encrypt; once each block group has been deciphered, they are joined in the reverse order in which they were subdivided or divided until the symmetric key was obtained. All programming languages have the ability to edit, divide and subdivide whole blocks of bytes with a symmetric key, an asymmetric encryption algorithm and the same algorithm for decryption are used for asymmetric encryption, there are numerous free-use algorithms, e.g. eg RSA, EIGamal, DSA, etc., extensively documented on the Internet; 2.-Once the size limitation of the symmetric key is resolved, this invention presents the novelty of automatically generating, using a random number generation algorithm, a symmetric key without size limitation; There are multiple algorithms that allow secure keys to be obtained, for example of a size equal to or greater than 128 bits, extensively documented on the Internet p. ex.
Blum Blum Shub, Fortuna, o Mersenne twister, además la práctica totalidad de token de hardware criptográficos integran una función de generación aleatoria de números que también puede ser utilizada; 3.-Para poder revertir el sofisticado proceso de cifrado de esta invención, se utilizan etiquetas identificativas que posibilitan estructurar la información necesaria para descifrar el documento electrónico, y que actúan como separadores de datos; el conjunto de información y etiquetas conforma uno o varios contenedores de datos que son encapsulados en el cuerpo del documento electrónico cifrado. Los contenidos informativos son asociados a etiquetas identificativas, e incluso se pueden incluir etiquetas que no tienen asociado contenido informativo, p.ej. inicio y final del encapsulado. Este procedimiento permite desarrollar una lógica de proceso que no solo trata cada información de forma independiente, sino que además convierte las etiquetas en separadores lógicos, que permiten encapsular la información en cualquier parte del documento cifrado y posteriormente extraer los bytes exactos de la información encapsulada. Este procedimiento es extremadamente versátil, no tiene limitación alguna en cuanto al formato, longitud, número, o código de identificación de las etiquetas, la estructura que se considere necesaria según el tipo de cifrado a realizar es implementada en una lógica informática, siendo de esta forma capaz de automatizar la generación de contendedores de datos y su encapsulado; la información al estar estructurada puede ser consultada y los dalos necesarios empleados para revertir fácilmente el proceso criptográfico realizado; todos los lenguajes de programación tienen la capacidad de editar documentos, implementar la lógica de etiquetado de información, crear contenedores de datos y encapsularlos. 4.-Esta invención define un nuevo procedimiento que almacena los bytes de una clave pública en un contenedor de información estructurada, junto con el identificador que comparte con su par de clave privada. Para ello se ha desarrollado un procedimiento que partiendo del habitual sistema de elaboración de un certificado x509v3, se interrumpe el proceso en un paso previo, concretamente en el momento de creación del fichero en formato PKCS#10, también llamado certificado autofirmado o de petición; en ese paso la clave privada ya ha sido generada, y está contenida en un token de hardware criptográfico o en almacén de claves por software en el que la clave privada está asociada con un identificador que comparte con la clave pública; este fichero PKCS#10 es editado y su información es cargada en un contenedor de información estructurada, p.ej. un XML, que permite guardar como mínimo: [KEY] bytes de la clave pública; [1 D] identificador que comparte con su par de clave privada ; además puede almacenar otros datos como:[TYPE] tipo de clave; [SIZE] tamaño de la clave en Bits. Una peculiaridad de la información criptográfica del fichero PKCS#10, es que aun no se ha sometido a periodo de vigencia, por lo tanto, se puede utilizar indefinidamente. La práctica totalidad de lenguajes de programación tienen la capacidad de crear contenedores de información estructurada como un XML, y pueden utilizar criptosistemas que incluyen esta funcionalidad, son libre uso y están extensamente documentados en internet como Open SSL o Bouncy Castell; 5.-Este método incorpora un control de calidad del cifrado, basado en la generación y comparación de resúmenes hash. Utilizando un algoritmo de digestión que se aplica sobre el documento electrónico original, se obtiene un primer hash que puede ser etiquetado y encapsulado en el cuerpo del documento cifrado, después de cada descifrado se obtiene un hash del documento descifrado, el cual es comparado con el primer hash para determinar su integridad; existen diversos algoritmos de digestión o resumen hash de libre uso ampliamente documentados en Internet, p. ej. SHA1 , SHA256, entre otros, 6.-Se ha creado una tabla de conversión que contiene todos los caracteres reconocidos de forma estándar por la codificación Base64, esta tabla además contiene caracteres no reconocidos en Base64 habiendo incluido equivalencias que se caracterizan por ser de 16 bits; esta tabla permite realizar una codificación segura que garantiza la transmisión por internet del documento cifrado y encapsulado sin correr el riesgo de que se corrompa ; el procedimiento lee todos los caracteres contenidos en el documento electrónico cifrado y encapsulado, si alguno de los caracteres no está incluido en la tabla de conversión, el documento no será codificado evitando así su corrupción, y si todos los caracteres son reconocidos aunque alguno de ellos no tenga correspondencia con el estándar Base64, es posible codificarlo con la equivalencia de 16 bits implementada en la tabla. Todos los lenguajes de programación pueden implementar este procedimiento sin que ello presuponga reto alguno relevante. 7.-Se ha desarrollado un procedimiento por el cual la aplicación informática que se emplea para procesar el documento dispone de un identificador o clave de uso, cada documento procesado por esta aplicación incorpora el identificador cifrado o su hash en una etiqueta del contenedor de datos que es encapsulado en el documento electrónico cifrado. Este identificador o clave de uso asocia íntimamente el documento procesado con una determinada aplicación licenciada, la cual a su vez puede estar instalada en n equipos informáticos que conforman una infraestructura asociada por ese elemento común, este identificador puede ser determinado a voluntad del administrador que gestiona la infraestructura, o por el fabricante que la comercializa, o ser generada automáticamente a partir de otro valor que compartan todos los equipos informáticos, p.ej. nombre de la organización, razón de IP, etc. no existe otra limitación que el de seleccionar un identificador que sea univoco, y tampoco existe restricción para almacenar el identificador, el cual puede ser grabado en una posición de memoria del equipo en el que se instala la aplicación, en un fichero electrónico, en el propio código de la aplicación, etc. no existe otra limitación que el seleccionar una ubicación específica. El procedimiento contempla la posibilidad de que el identificador cifrado o el hash ya estén procesados y almacenados, de esta forma la aplicación no tiene que realizar en cada ocasión la transformación, con el consiguiente ahorro de proceso. En cualquier supuesto, el hash se obtiene aplicando al identificador un algoritmo de digestión, y para el cifrado del identificador se puede emplear un algoritmo de cifrado simétrico o asimétrico y cla ve que como única limitación es que deben de ser siempre la misma. Previo al proceso de descifrado, la aplicación informática determina si el identificador de la aplicación está asociado al identificador incluido en el documento cifrado, para ello edita el contenedor de datos y obtiene la etiqueta e información Blum Blum Shub, Fortuna, or Mersenne twister, in addition to almost all cryptographic hardware tokens integrate a random number generation function that can also be used; 3.-In order to reverse the sophisticated encryption process of this invention, identification tags are used that make it possible to structure the information necessary to decrypt the electronic document, and act as data separators; The set of information and labels forms one or more data containers that are encapsulated in the body of the encrypted electronic document. Informational contents are associated with identifying tags, and you can even include tags that have no associated informational content, eg start and end of encapsulation. This procedure allows to develop a process logic that not only treats each information independently, but also converts the labels into logical separators, which allow encapsulating the information in any part of the encrypted document and subsequently extracting the exact bytes of the encapsulated information. This procedure is extremely versatile, it has no limitation as to the format, length, number, or identification code of the labels, the structure considered necessary according to the type of encryption to be performed is implemented in a computer logic, being of this way capable of automating the generation of data containers and their encapsulation; the information being structured can be consulted and the necessary data used to easily reverse the cryptographic process carried out; All programming languages have the ability to edit documents, implement information labeling logic, create data containers and encapsulate them. 4.-This invention defines a new procedure that stores the bytes of a public key in a structured information container, together with the identifier that it shares with its private key pair. For this purpose, a procedure has been developed that, starting from the usual system for preparing an x509v3 certificate, the process is interrupted in a previous step, specifically at the time of creation of the file in PKCS # 10 format, also called self-signed or petition certificate; in that step the private key has already been generated, and is contained in a cryptographic hardware token or in a software keystore in which the private key is associated with an identifier that it shares with the public key; This PKCS # 10 file is edited and its information is loaded into a structured information container, eg an XML, which allows saving at least: [KEY] bytes of the public key; [1 D] identifier that you share with your private key pair; You can also store other data such as: [TYPE] type of key; [SIZE] key size in Bits. A peculiarity of the cryptographic information of the PKCS # 10 file is that it has not yet undergone a period of validity, therefore, it can be used indefinitely. Almost all programming languages have the ability to create structured information containers such as XML, and can use cryptosystems that include this functionality, are free to use and are widely documented on the Internet such as Open SSL or Bouncy Castell; 5.-This method incorporates an encryption quality control, based on the generation and comparison of hash summaries. Using a digestion algorithm that is applied to the original electronic document, a first hash is obtained that can be labeled and encapsulated in the body of the encrypted document, after each decryption a hash of the decrypted document is obtained, which is compared with the first hash to determine its integrity; There are various free-use hash digest or digest algorithms widely documented on the Internet, e.g. ex. SHA1, SHA256, among others, 6.-A conversion table has been created that contains all the characters recognized in a standard way by Base64 encoding, this table also contains characters not recognized in Base64 having included equivalences that are characterized by being 16 bits; This table allows a secure coding that guarantees the transmission of the encrypted and encapsulated document over the Internet without the risk of being corrupted; the procedure reads all the characters contained in the encrypted and encapsulated electronic document, if any of the characters is not included in the conversion table, the document will not be encoded thus preventing corruption, and if all the characters are recognized even if any of them does not correspond to the Base64 standard, it is possible to encode it with the 16-bit equivalence implemented in the table. All programming languages can implement this procedure without presupposing any relevant challenge. 7.-A procedure has been developed whereby the computer application used to process the document has an identifier or use key, each document processed by this application incorporates the encrypted identifier or its hash in a data container label which is encapsulated in the encrypted electronic document. This identifier or usage code intimately associates the processed document with a certain licensed application, which in turn can be installed on n computer equipment that makes up an infrastructure associated by that common element, this identifier can be determined at the will of the managing administrator the infrastructure, or by the manufacturer that markets it, or be automatically generated from another value shared by all computer equipment, eg organization name, IP reason, etc. there is no other limitation than to select an identifier that is univocal, and there is no restriction to store the identifier, which can be recorded in a memory location of the equipment in which the application is installed, in an electronic file, in the own application code, etc. There is no other limitation than selecting a specific location. The procedure contemplates the possibility that the encrypted identifier or hash are already processed and stored, so the application does not have to carry out the transformation every time, with the consequent process savings. In any case, the hash is obtained by applying a digestion algorithm to the identifier, and for the encryption of the identifier a symmetric or asymmetric encryption algorithm can be used and it is clear that the only limitation is that they must always be the same. Prior to the decryption process, the computer application determines if the application identifier is associated with the identifier included in the encrypted document, for this purpose it edits the data container and obtains the label and information
etiqueta e información asociada al identificador; si el identificador está cifrado debe de descifrarlo empleando la misma clave caso de ser simétrica, o clave privada asociada al par de pública empleada para cifrar, caso de ser cifrado asimétrico, utilizando 5 siempre el mismo algoritmo que los cifró, se procede a comparar el identificador descifrado con el identificador de aplicación; si se trata del hash del identificador aplicará un algoritmo de digestión sobre el identificador de la aplicación, y comparará el hash obtenido con el hash etiquetado en el contenedor de datos del documento cifrado. La realización de estas comparaciones no presupone reto alguno, y sigue los label and information associated with the identifier; if the identifier is encrypted, it must be decrypted using the same key case if it is symmetric, or private key associated with the public pair used to encrypt, if it is asymmetric encryption, always using the same algorithm that encrypted them, we proceed to compare the identifier decrypted with the application identifier; if it is the hash of the identifier, it will apply a digestion algorithm on the identifier of the application, and compare the hash obtained with the hash labeled in the data container of the encrypted document. Making these comparisons does not presuppose any challenge, and follows the
10 mismos procesos criptográficos que los ya descritos anteriormente. 8.-Para cifrar el documento emplea una clave simétrica sin limitación de tamaño y un algoritmo simétrico, existen numerosos algoritmos de cifrado simétrico de libre uso, extensamente documentados en Internet, su uso no presupone reto alguno, p.ej. CAST, IDEA, TripleDES, AES, etc; y criptosistemas que facilitan su uso como Open 10 same cryptographic processes as previously described. 8.-To encrypt the document uses a symmetric key without size limitation and a symmetric algorithm, there are numerous free-use symmetric encryption algorithms, widely documented on the Internet, its use does not presuppose any challenge, eg CAST, IDEA, TripleDES, AES, etc; and cryptosystems that facilitate its use as Open
15 SSL o Bouncy Castell; para descifrar se emplea la misma clave simétrica y el algoritmo simétrico empleado para cifrar. 15 SSL or Bouncy Castell; to decipher the same symmetric key and the symmetric algorithm used to encrypt is used.
BREVE DESCRIPCiÓN DE LOS DIBUJOS BRIEF DESCRIPTION OF THE DRAWINGS
20 Para complementar la descripción que se está realizando y con objeto de ayudar a una mejor comprensión de las características de la invención, se acompaña como parte integrante de dicha descripción un juego de dibujos, en los que se ha representado lo siguiente: To complement the description that is being made and in order to help a better understanding of the characteristics of the invention, a set of drawings is attached as an integral part of said description, in which the following has been represented:
25 Figura 1 ilustra un esquema de cifrado simétrico. Figura 2 ilustra un esquema de cifrado asimétrico. Figura 3 ilustra un esquema de generador de números aleatorios, según patente de invención Número de Solicitud: P200702299. Figura 4 ilustra un esquema de encapsulado de datos con separadores. 25 Figure 1 illustrates a symmetric encryption scheme. Figure 2 illustrates an asymmetric encryption scheme. Figure 3 illustrates a random number generator scheme, according to the invention patent Application Number: P200702299. Figure 4 illustrates a data encapsulation scheme with separators.
REALIZACiÓN PREFERENTE DE LA INVENCiÓN PREFERRED EMBODIMENT OF THE INVENTION
Una primera realización preferente del sistema aquí descrito, comprende esencialmente, los siguientes elementos: A first preferred embodiment of the system described herein essentially comprises the following elements:
a) Una Terminal informática, que dispone de una memoria de almacenamiento de a) A computer terminal, which has a storage memory of
datos no volátil (1). Se ha conectado a este terminal un token criptográfico PKI, también conocido como dispositivo de firma electrónica HSM (modulo de seguridad hardware (5), con conector USB que ensambla un procesador criptográfico del fabricante ST Microelectrónics. En el ejemplo de aplicación preferente se utiliza un ordenador marca HP modelo Pavilion con procesador Intel® Atom ™ 2 Z8300, y con sistema operativo Windows 8, con disco duro SATA de 500 Gb. non volatile data (1). A PKI cryptographic token, also known as the HSM electronic signature device (hardware security module (5), has been connected to this terminal with a USB connector that assembles a cryptographic processor from the manufacturer ST Microelectronics. In the preferred application example a HP Pavilion model computer with Intel® Atom ™ 2 Z8300 processor, and with Windows 8 operating system, with 500 Gb SATA hard drive.
La unidad de almacenamiento (1) contiene un fichero PKCS#10 (2) con la clave pública (7) etiquetada con un identificador (19) que es compartido con la clave privada (6); una API PKCS#11 (16) del fabricante ST Microelectronics ; un documento electrónico (8); un XML que contiene el identificador (29) del programa de usuario (4) introducido por el propio usuario; un programa de usuario (4); un criptosistema (3), Bouncy Castle, el cual ofrece una amplia colección de API's que contienen los principales algoritmos para procesos criptográficos simétricos (31) y asimétricos (32), e incluso implementa la capacidad para hacer llamadas según el estándar PKCS#11 (16), leer el contenido de certificados electrónicos X509, leer ficheros PKCS#10 (2), y store software según estándar PKCS#15 que contienen clave privada , además dispone de algoritmos de generación aleatoria de números (20) de tamaño igualo superior a 128 bits. También dispone de algoritmos de digestión (25) para la obtención de hash. Dispone de versión para Java. The storage unit (1) contains a PKCS # 10 file (2) with the public key (7) labeled with an identifier (19) that is shared with the private key (6); an API PKCS # 11 (16) of the manufacturer ST Microelectronics; an electronic document (8); an XML containing the identifier (29) of the user program (4) entered by the user himself; a user program (4); a cryptosystem (3), Bouncy Castle, which offers a wide collection of APIs that contain the main algorithms for symmetric (31) and asymmetric (32) cryptographic processes, and even implements the ability to make calls according to the PKCS # 11 standard ( 16), read the content of X509 electronic certificates, read PKCS # 10 (2) files, and store software according to PKCS # 15 standard that contain a private key, and it also has algorithms for random generation of numbers (20) equal to or greater than 128 bits It also has digestion algorithms (25) for obtaining hash. It has a version for Java.
b) Un programa de usuario (4). Se ha desarrollado una aplicación en Java. Este software contiene un interface de usuario y toda la lógica requerida: b) A user program (4). An application has been developed in Java. This software contains a user interface and all the required logic:
- • •
- Interface que permite al usuario navegar por la unidad de almacenamiento (1), Y seleccionar un documento electrónico independientemente de su estado, original (8) o cifrado (12), o encapsulado 15). Interface that allows the user to navigate through the storage unit (1), and select an electronic document regardless of its status, original (8) or encrypted (12), or encapsulated 15).
- • •
- Navegar por la unidad de almacenamiento (1) Y seleccionar un fichero PKCS#10 (2). Browse the storage unit (1) and select a PKCS # 10 file (2).
- • •
- Hacer llamadas al criptosistema (3) para todos los procesos criptográficos contemplados en esta invención, incluso llamadas a la librería PKCS#11 (16) para acceder al token criptográfico (5) Make calls to the cryptosystem (3) for all cryptographic processes contemplated in this invention, including calls to the PKCS # 11 library (16) to access the cryptographic token (5)
- • •
- Capacidad para crear, alimentar y consultar una tabla de conversión (34) que tiene al menos dos campos: campo carácter y campo equivalencia hasta 16 bits. Esta tabla (34) es alimentada con todos los caracteres que son reconocidos de forma estándar por la codificación Base 64, si han añadido Ability to create, feed and query a conversion table (34) that has at least two fields: character field and equivalence field up to 16 bits. This table (34) is fed with all the characters that are recognized as standard by Base 64 encoding, if they have added
caracteres multibyte (MBCS), que no son reconocidos por esta codificación Base 64 multibyte characters (MBCS), which are not recognized by this Base 64 encoding
- • •
- Capacidad para editar, leer y contar los bytes que componen una clave simétrica y una clave asimétrica. Incluyendo la lógica necesaria para valorar, según el proceso de cifrado requerido en cada ocasión, si los bytes que se desean cifrar asimétricamente tienen un tamaño mayor que la clave pública que se desea emplear, determinando en cada supuesto si se debe o no dividir en bloques el producto a cifrar para obtener un tamaño inferior que la clave pública. y capacidad de revertir la operación de división de bloques realizada. Este es un proceso elemental, disponible en cualquier lenguaje de programación de uso común. Ability to edit, read and count the bytes that make up a symmetric key and an asymmetric key. Including the logic necessary to assess, according to the encryption process required on each occasion, if the bytes that are to be encrypted asymmetrically have a size larger than the public key that you want to use, determining in each case whether or not to divide into blocks the product to be encrypted to obtain a size smaller than the public key. and ability to reverse the block division operation performed. This is an elementary process, available in any commonly used programming language.
- • •
- Introducir un PIN (10) Y una clave simétrica (9) Enter a PIN (10) and a symmetric key (9)
- • •
- Capacidad para comparar los bytes varios hash y determinar si son idénticos o distintos. Ability to compare several hash bytes and determine if they are identical or different.
- • •
- Editar un documento electrónico cifrado (12) e introducir el contenedor de datos Edit an encrypted electronic document (12) and enter the data container
(21) que contiene la información de los procesos criptográficos llevados a cabo, y que han sido etiquetados (13) conforme a la lógica definida en esta invención: 1.-cada contenido informativo tiene está asociado a una etiqueta identificativa (13), y 2.-pueden haber etiquetas (13) que no tengan contenido informativo. Se ha elaborado la siguiente estructura de etiquetas (26) para este ejemplo de aplicación práctica: (21) that contains the information of the cryptographic processes carried out, and that have been labeled (13) according to the logic defined in this invention: 1.-each informative content has is associated with an identification tag (13), and 2.-there may be tags (13) that do not have informative content. The following label structure (26) has been developed for this example of practical application:
[INICIO] [START]
[H] Hash del documento original [H] Hash of the original document
[O] cantidad de pares de operadores [01]: identificador (19) del operador 1 del par i (i<=O) (01 bytes): los bytes de la clave pública (7) del operador 1 [02]: identificador (19) del operador 2 del par i (i<=O) (02 bytes): los bytes de la clave pública (7) del operador 2 [O] number of operator pairs [01]: identifier (19) of operator 1 of pair i (i <= O) (01 bytes): bytes of the public key (7) of operator 1 [02]: identifier (19) of operator 2 of pair i (i <= O) (02 bytes): bytes of the public key (7) of operator 2
[P] (entero de 4 bytes): cantidad de partes de 64 bytes del cifrado hecho con el operador 1 [P] (4-byte integer): number of 64-byte parts of encryption done with operator 1
[T] (entero de 4 bytes): el tamano del cifrado hecho con el operador 1 (P * Tbytes) : cada parte de 64 bytes se cifra con el operador 2 y se escribe una parte cifrada de tamaño T [T] (4-byte integer): the size of the encryption done with operator 1 (P * Tbytes): each part of 64 bytes is encrypted with operator 2 and an encrypted part of size T is written
[Al AES [To the AES
[A2) RSA [A2) RSA
[FIN) [FINISH)
Las etiquetas (13) actúan como separadores de la información, a la vez que The labels (13) act as information separators, while
identifican cada contenido, el conjunto de etiquetas y la información que identify each content, the set of labels and the information that
contienen conforman el contenedor de datos (21 ). contain make up the data container (21).
- • •
- Editar el documento con la lógica necesaria para extraer el contenedor de dalos (21) del documento electrónico cifrado encapsulado (15), dejando el documento electrónico cifrado (12) libre de bytes del contenedor de dalos (21). Edit the document with the logic necessary to extract the data container (21) from the encapsulated encrypted electronic document (15), leaving the encrypted electronic document (12) free of bytes from the data container (21).
- • •
- Crear un archivo capaz de contener información estructurada, se ha elegido el formato XML (22). Hacer la llamada correspondiente al criptosistema (3) para acceder a la información de la clave pública (7) contenida en un fichero PKCS#10 (2), y obtener: [KEY] bytes de la clave pública, [ID] identificador que comparte con su par de clave privada [TYPE] tipo de clave, [SIZE] tamaño de la clave en Bits. Esta información es almacenada en el contenedor XML (22) Create a file capable of containing structured information, the XML format (22) has been chosen. Make the corresponding call to the cryptosystem (3) to access the public key information (7) contained in a PKCS # 10 file (2), and obtain: [KEY] bytes of the public key, [ID] identifier that shares with its private key pair [TYPE] key type, [SIZE] key size in Bits. This information is stored in the XML container (22)
- • •
- Capacidad para introducir y leer un string de datos que contiene identificador o clave de uso (29), que está almacenado en un fichero XML. Ability to enter and read a data string containing identifier or usage key (29), which is stored in an XML file.
- • •
- Capacidad de comparar los bytes de dos hash, valorando si son idénticos o no. Ability to compare the bytes of two hashes, assessing whether they are identical or not.
- • •
- Capacidad comparar dos string de datos. Ability to compare two data strings.
c) Un dispositivo de firma electrónica (5). Se trata de un token HSM (modulo de seguridad harware), con conector USB que ensambla un procesador criptográfico de ST Microelectrónics. Este token dispone de un generador de números aleatorio (20) validado por el NIST, capaz de elaborar números de un tamaño igualo superior a 128 bits, y un contenedor seguro de claves criptográficas, que almacena el par de clave privada (6) asociada a su par de clave pública(7) con un identificador (19) que comparten ambas claves. Además integra algoritmos criptográficos simétricos (31 ) Y asimétricos (32), la lógica necesaria y la capacidad para realizar procesos de cifrado y descifrado sin que la clave privada (6) abandone el contenedor de seguridad. Este token por hardware (5) es interoperable mediante la API PKCS#11 (16) que suministra su fabricante STMicroelectronics. c) An electronic signature device (5). It is an HSM token (harware security module), with a USB connector that assembles a cryptographic processor from ST Microelectronics. This token has a random number generator (20) validated by the NIST, capable of producing numbers of a size equal to or greater than 128 bits, and a secure container of cryptographic keys, which stores the private key pair (6) associated with its public key pair (7) with an identifier (19) that both keys share. It also integrates symmetric (31) and asymmetric (32) cryptographic algorithms, the necessary logic and the ability to perform encryption and decryption processes without the private key (6) leaving the security container. This hardware token (5) is interoperable using the PKCS API # 11 (16) supplied by its manufacturer STMicroelectronics.
d) Dos ficheros PKCS#1 O (2) que en conformidad con ese estándar internacional, cada fichero contiene su respectiva clave pública (7) asociada a su par de clave privada (6) por el identificador que comparten (19) d) Two PKCS # 1 files OR (2) that in accordance with that international standard, each file contains its respective public key (7) associated with its private key pair (6) by the identifier they share (19)
e) Un documento electrónico (8) en formato pdf, que contiene como único texto de prueba uHola mundo". e) An electronic document (8) in pdf format, which contains as the only test text uHola mundo ".
Se realiza el siguiente procedimiento: The following procedure is performed:
Cifrado del documento electrónico: Encryption of the electronic document:
1. Los usuarios (17), conectan en el terminal informático sus respectivos dispositivos de firma electrónica HSM (5), cada uno de ellos contiene una clave privada (6) etiquetada con un identificador (19) que comparte con su par de clave pública (7); 2.-Se disponen de dos ficheros PKCS#10 (2), cada uno de ellos contiene una clave pública (7) etiquetada con un identificador (19) que comparte con su par de clave privada (6), también es posible utilizar un certificado electrónico según estándar X509; 1. Users (17), connect their respective HSM electronic signature devices (5) to the computer terminal, each containing a private key (6) labeled with an identifier (19) that it shares with its public key pair (7); 2.-Two PKCS # 10 files (2) are available, each one containing a public key (7) labeled with an identifier (19) that it shares with its private key pair (6), it is also possible to use a electronic certificate according to X509 standard;
3. Mediante el programa de usuario (4), se selecciona el documento electrónico (8) que se desea cifrar, se selecciona el algoritmo de cifrado simétrico (31 ) AES, se introduce una clave simétrica (9) de tamaño 256 bits, se especifican los identificadores 3. Using the user program (4), the electronic document (8) to be encrypted is selected, the symmetric encryption algorithm (31) AES is selected, a symmetric key (9) of 256 bit size is entered, specify the identifiers
(19) "prueba1 " y uprueba2" de las claves públicas (7) que serán empleadas para cifrar asimétrica mente la clave simétrica, se especifica que se requiere cifrado multicapa, y da la orden de iniciar el proceso. El programa de usuario (4) realiza el siguiente proceso: (19) "test1" and uprueba2 "of the public keys (7) that will be used to asymmetrically encrypt the symmetric key, specify that multilayer encryption is required, and give the order to start the process. The user program (4 ) perform the following process:
a) Lee una clave simétrica (9) de tamaño de 256 bits que ha sido introducida por el usuario. b) Utiliza el criptosistema (3), para que empleando la clave simétrica (9) y habiendo seleccionado el algoritmo simétrico (31) AES, cifre el documento electrónico (8). El criptosistema (3) genera el documento electrónico cifrado a) Read a symmetric key (9) of 256-bit size that has been entered by the user. b) Use the cryptosystem (3), so that using the symmetric key (9) and having selected the symmetric algorithm (31) AES, encrypt the electronic document (8). The cryptosystem (3) generates the encrypted electronic document
(12) c) Se procede a la lectura de las claves públicas (7) seleccionando aquellas cuyo identificador (19) corresponda a los dos seleccionados por el usuario. Se consulta el tamaño de cada clave pública (2048 bits) (7) y el tamaño de la clave simétrica (256 bits) (9), y teniendo en cuenta que se ha solicitado un cifrado multicapa, evalúa la necesidad de tener que dividir la clave simétrica (9) en bloques enteros de bytes. Confirmando que la clave simétrica, una vez cifrada será dividida en cuatro bloques de 64 bits. d) La clave simétrica (9) es cifrada con la primera clave pública (7) indicada por el usuario, identificador (19) "prueba1 ". e) La clave simétrica cifrada (11) es editada y dividida en cuatro bloques de 64 (12) c) The public keys (7) are read by selecting those whose identifier (19) corresponds to the two selected by the user. The size of each public key (2048 bits) (7) and the size of the symmetric key (256 bits) (9) are consulted, and taking into account that a multilayer encryption has been requested, it assesses the need to have to divide the symmetric key (9) in whole blocks of bytes. Confirming that the symmetric key, once encrypted, will be divided into four 64-bit blocks. d) The symmetric key (9) is encrypted with the first public key (7) indicated by the user, identifier (19) "test1". e) The encrypted symmetric key (11) is edited and divided into four blocks of 64
bits. f) Los cuatro bloques (14) obtenidos de la división realizada de la clave simétrica cifrada (11 ) son cifrados con la segunda clave pública (7) indicada por el usuario, identificador (19) "prueba2". g) Se edita la estructura de etiquetas (26) y se carga cada etiqueta con la información relativa al proceso criptográfico realizado: bits f) The four blocks (14) obtained from the division made of the key Symmetric encrypted (11) are encrypted with the second public key (7) indicated by the user, identifier (19) "test2". g) The label structure (26) is edited and each label is loaded with the information related to the cryptographic process carried out:
[INICia l [START l
[H] Hash del documento original (23) [H] Hash of the original document (23)
[O]: 1 (par de operadores) [01]: Prueba1 (19) (01 bytes): los bytes de la clave pública (7) del operador 1 [02]: Prueba2 (19) [O]: 1 (pair of operators) [01]: Test 1 (19) (01 bytes): bytes of the public key (7) of operator 1 [02]: Test2 (19)
[P] 4 bloques de 64 bytes del cifrado hecho con el operador 1 [P] 4 blocks of 64 bytes of encryption done with operator 1
(T]256 bytes el tamaño del cifrado hecho con el operador 1 (T] 256 bytes the size of the encryption done with the operator 1
(P * Tbytes) . cada parte de 64 bytes se cifra con el operador 2 y se escri be una parte cifrada de tamaño T (14) (P * Tbytes). each 64-byte part is encrypted with operator 2 and an encrypted part of size T (14) is written
[A] AES [A] AES
[A2] RSA [FIN] [A2] RSA [FINISH]
Este conjunto de información conforma el contenedor de datos (21) h) Se edita el documento electrónico cifrado (12), y se encapsula en su interior el contenedor de datos (21) This set of information forms the data container (21) h) The encrypted electronic document (12) is edited, and the data container (21) is encapsulated inside
- 1. one.
- Los usuarios (17) conectan en el terminal informático sus respecti vos dispositivos de firma electrónica HSM (5), Users (17) connect their respective electronic signature devices HSM (5) to the computer terminal,
- 2. 2.
- Los usuarios (17) mediante el programa de usuario (4 ), introducen su PIN (10) de activación de clave privada (6) y ordenan al criptosistema (3) que realice el descifrado del documento electrónico cifrado (12) y control de calidad del cifrado. El programa de usuario realiza el siguiente proceso: The users (17) through the user program (4), enter their PIN (10) for activating the private key (6) and order the cryptosystem (3) to perform the decryption of the encrypted electronic document (12) and quality control Encryption The user program performs the following process:
etiquetas [INICIO] y [FIN]. b) Habiendo localizado las etiquetas [INICIO] y [FIN], procede a extraer el [START] and [END] tags. b) Having located the [START] and [END] tags, proceed to extract the
contenedor de datos (21), obteniendo así el documento electrónico cifrado (12). e) Edita el contenedor de datos (21) Y obtiene los identificadores de clave pública (19), los bloques cifrados (14) y los algoritmos de cifrado empleados. data container (21), thus obtaining the encrypted electronic document (12). e) Edit the data container (21) and obtain the public key identifiers (19), the encrypted blocks (14) and the encryption algorithms used.
- 3. 3.
- Se ordena al criptosistema que realice el descifrado de los bloques cifrados (14) utilizando el dispositivo de firma (5), para realizar esta operación además de transferir los bloques cifrados (14) se facilita: PIN (10) de activación de la segunda clave privada (6), utilizada al cifrar los bloques, y su identificador de clave "Prueba2" (19). The cryptosystem is ordered to decrypt the encrypted blocks (14) using the signing device (5), to perform this operation in addition to transferring the encrypted blocks (14) it is provided: PIN (10) for activating the second key private (6), used when encrypting the blocks, and their key identifier "Test2" (19).
- 4. Four.
- Los bloques descifrados son editados y unidos, obteniendo así la clave simétrica cifrada (11 ). Se ordena al criptosistema que realice el descifrado de la clave simétrica cifrada (11) utilizando el dispositivo de firma (5), para realizar esta operación además de transferir la clave simétrica cifrada (11 ) se facilita: PIN (10) de activación de la primera clave privada (6), utilizada al cifrar los bloques, y su identificador de clave "Prueba1 " (19). Se obtiene la clave simétrica (9) The decrypted blocks are edited and linked, thus obtaining the encrypted symmetric key (11). The cryptosystem is ordered to decrypt the encrypted symmetric key (11) using the signing device (5), to perform this operation in addition to transferring the encrypted symmetric key (11) it is provided: PIN (10) for activation of the first private key (6), used when encrypting the blocks, and its key identifier "Test1" (19). The symmetric key is obtained (9)
- 5. 5.
- Se ordena al criptosistema (3) que proceda al descifrado el documento electrónico cifrado (12), para realizar esta operación se facilita ademas del documento electrónico cifrado (12), la clave simétrica (9) y el algoritmo de cifrado simétrico The cryptosystem (3) is ordered to decrypt the encrypted electronic document (12), to perform this operation it is also provided in addition to the encrypted electronic document (12), the symmetric key (9) and the symmetric encryption algorithm
(31) empleado. Obteniendo el documento electrónico descifrado (33) (31) employee. Obtaining the decrypted electronic document (33)
Según una segunda realización del sistema, además de todos los elementos indicados en la primera realización, para mejorar el acceso a las claves públicas se procede a: According to a second embodiment of the system, in addition to all the elements indicated in the first embodiment, in order to improve access to public keys, we proceed to:
1. Complementar el paso 2 del proceso de cifrado, con el siguiente procedimiento: 1. Complement step 2 of the encryption process, with the following procedure:
a) Mediante el programa de usuario (4), se crea un archivo XML (22) con los TAG: [KEYI, [ID],[TYPE], [SIZE], y ordena al Criptosistema (3) la lectura de los datos contenidos en dos ficheros PKCS#10 (2). La información contenida en esos dos ficheros PKCS#10 (2) es cargada en los lAG del archivo XML (22): [KEY] bytes de la clave pública (7), [ID] "prueba1 " "pruebaT identificador que comparte con su par de clave privada (19) [TYPE] "RSA" tipo de clave [SIZE] "2048" tamaño de la clave en Bits. a) Using the user program (4), an XML file (22) is created with the TAGs: [KEYI, [ID], [TYPE], [SIZE], and orders the cryptosystem (3) to read the data contained in two PKCS # 10 files (2). The information contained in these two PKCS # 10 files (2) is loaded into the lAGs of the XML file (22): [KEY] bytes of the public key (7), [ID] "test1" "testT identifier that you share with your private key pair (19) [TYPE] "RSA" key type [SIZE] "2048" key size in Bits.
Según una tercera realización del sistema, además de todos los elementos indicados en la primera realización, para garantizar la calidad del cifrado, se procede a: According to a third embodiment of the system, in addition to all the elements indicated in the first embodiment, in order to guarantee the quality of the encryption, we proceed to
1. Introducir un paso previo (a) al Paso 3 del proceso de cifrado, con el siguiente procedimiento: a) Solicita al criptosistema (3) que obtenga un hash (23) del documento 1. Enter a previous step (a) to Step 3 of the encryption process, with the following procedure: a) Ask the cryptosystem (3) to obtain a hash (23) of the document
electrónico original (8) aplicando el algoritmo de digestión (25) SHA256. original electronic (8) applying the digestion algorithm (25) SHA256.
2. Introducir unos paso previos (a) (b) y (e) al Paso 3 e) del proceso de cifrado, con el siguiente procedimiento: a) Solicita al criptosistema (3) que utilizando la clave simétrica (9) y el 2. Enter some previous steps (a) (b) and (e) to Step 3 e) of the encryption process, with the following procedure: a) Ask the cryptosystem (3) to use the symmetric key (9) and the
algoritmo simétrico (31) AES empleado para cifrar documento electrónico original (8) descifre el documento (12). symmetric algorithm (31) AES used to encrypt original electronic document (8) decrypt the document (12).
b) Solicita al criptosistema (3) que obtenga un hash (24) del documento electrónico descifrado, utilizando el mismo algoritmo de digestión (25) SHA256 que se empleo para obtener el primer hash (23). b) Ask the cryptosystem (3) to obtain a hash (24) of the decrypted electronic document, using the same digestion algorithm (25) SHA256 that was used to obtain the first hash (23).
c) Se compara el primera hash (23) obtenido del original, con el hash (24) obtenido del documento descifrado (33). Si el resultado es que son idénticos, se considera que el proceso de cifrado y descifrado ha sido correcto. Si por el contrario los hash son distintos, el documento descifrado c) The first hash (23) obtained from the original is compared with the hash (24) obtained from the decrypted document (33). If the result is that they are identical, the encryption and decryption process is considered to have been correct. If on the contrary the hashes are different, the decrypted document
(33) no es integro. (33) is not integral.
3. Si el proceso de cifrado y descifrando ha sido correcto, en el paso 3 g) carga el hash (23) en la etiqueta [HI 3. If the encryption and decryption process was successful, in step 3 g) load the hash (23) in the [HI] tag
4. Introduce un último paso 6 al proceso de descifrado, con el siguiente procedimiento: a) Se solicita al criptosistema (3) que aplique, sobre el documento electrónico descifrado, el mismo algoritmo de digestión (25) SHA256 que se empleo para obtener el primer hash (23), obteniendo el hash (24). 4. Enter a final step 6 to the decryption process, with the following procedure: a) The cryptosystem (3) is requested to apply, on the decrypted electronic document, the same digestion algorithm (25) SHA256 that was used to obtain the first hash (23), obtaining the hash (24).
b) Se compara el primera hash (23) obtenido del original, con el hash (24) obtenido del documento descifrado (33). Si el resultado es que son idénticos, se considera que el proceso de cifrado y descifrado ha sido correcto. Si por el contrario los hash son distintos, el documento descifrado (33) no es integro. b) The first hash (23) obtained from the original is compared with the hash (24) obtained from the decrypted document (33). If the result is that they are identical, the encryption and decryption process is considered to have been correct. If on the contrary the hashes are different, the decrypted document (33) is not integral.
Según una cuarta realización del sistema, además de todos los elementos indicados en la primera realización, para obtener de forma automática una clave simétrica segura, se procede a: According to a fourth embodiment of the system, in addition to all the elements indicated in the first embodiment, to automatically obtain a secure symmetric key, we proceed to:
1. Introducir un paso que sustituye el paso 3 a) del proceso de cifrado, con el siguiente procedimiento: a) Se genera de forma automática y desasistida una clave simétrica (9) 1. Enter a step that replaces step 3 a) of the encryption process, with the following procedure: a) A symmetric key is automatically generated and unassisted (9)
5 empleando un algoritmo de generación de número aleatorios (20) capaz de generar números de un tamaño igualo superior a los 128 bits. Para realizar este proceso emplea la capacidad criptográfica del token criptográfico hardware (5): 5 using a random number generation algorithm (20) capable of generating numbers of a size equal to or greater than 128 bits. To perform this process, it uses the cryptographic capability of the hardware cryptographic token (5):
8. El programa de usuario (4) mediante el criptosistema (3) ordena a la 8. The user program (4) through the cryptosystem (3) orders the
10 API PKCS#11 (16) que mediante un algoritmo aleatorio de generación de números (20) obtenga un número aleatorio de tamaño 256 bits, el cual es utilizado como clave simétrica (9). 10 PKCS API # 11 (16) that through a random number generation algorithm (20) obtains a random number of 256 bit size, which is used as a symmetric key (9).
Según una quinta realización del sistema, además de todos los elementos indicados 15 en la primera realización , para asociar el programa de usuario (4) con los documentos que procesa, procede a: According to a fifth embodiment of the system, in addition to all the elements indicated 15 in the first embodiment, to associate the user program (4) with the documents it processes, it proceeds to:
1. Introducir un paso previo al paso 3 g) Y que lo complementa con el siguiente procedimiento· a) Lee el identificador (29) del programa de usuario (4) que está almacenado 1. Enter a step prior to step 3 g) And that complements it with the following procedure · a) Read the identifier (29) of the user program (4) that is stored
20 en un fichero XML. 20 in an XML file.
b) Utilizando el criptosistema (3) saca el hash (28) del identificador (29), y lo incluye en una etiqueta [H1] del contenedor de datos (21) que es encapsulado en el documento electrónico cifrado (12) b) Using the cryptosystem (3), remove the hash (28) from the identifier (29), and include it in a label [H1] of the data container (21) that is encapsulated in the encrypted electronic document (12)
2. Introducir un paso complementario al Paso 2. e) del descifrado del documento, 2. Enter a complementary step to Step 2. e) decryption of the document,
25 y que lo complementa con el siguiente procedimiento: a) Lee el hash (28) del identificador (29) de la etiqueta [H1], b) Lee el identificador (29) del programa de usuario (4) que está 25 and which complements it with the following procedure: a) Read the hash (28) of the identifier (29) of the tag [H1], b) Read the identifier (29) of the user program (4) that is
almacenado en un fichero XML, y utilizando el criptosistema (3) saca el hash (31) del identificador (29) stored in an XML file, and using the cryptosystem (3) take out the hash (31) of the identifier (29)
30 c) Compara el hash (28) contenido en la etiqueta, con el hash (30) obtenido de identificador (29), si son idénticos el documento está asociado a este programa de usuario. 30 c) Compare the hash (28) contained in the tag, with the hash (30) obtained from identifier (29), if they are identical, the document is associated with this user program.
Claims (6)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| ES201630804A ES2613881B1 (en) | 2016-06-13 | 2016-06-13 | HYBRID METHOD OF ENCRYPTING AND DEFRYING ELECTRONIC DOCUMENTS |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| ES201630804A ES2613881B1 (en) | 2016-06-13 | 2016-06-13 | HYBRID METHOD OF ENCRYPTING AND DEFRYING ELECTRONIC DOCUMENTS |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| ES2613881A1 ES2613881A1 (en) | 2017-05-26 |
| ES2613881B1 true ES2613881B1 (en) | 2018-04-02 |
Family
ID=58718203
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| ES201630804A Active ES2613881B1 (en) | 2016-06-13 | 2016-06-13 | HYBRID METHOD OF ENCRYPTING AND DEFRYING ELECTRONIC DOCUMENTS |
Country Status (1)
| Country | Link |
|---|---|
| ES (1) | ES2613881B1 (en) |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5870470A (en) * | 1996-02-20 | 1999-02-09 | International Business Machines Corporation | Method and apparatus for encrypting long blocks using a short-block encryption procedure |
| US7484107B2 (en) * | 2004-04-15 | 2009-01-27 | International Business Machines Corporation | Method for selective encryption within documents |
| US20090097657A1 (en) * | 2007-10-05 | 2009-04-16 | Scheidt Edward M | Constructive Channel Key |
| JP5393038B2 (en) * | 2008-03-04 | 2014-01-22 | キヤノン株式会社 | Information processing apparatus, information processing method and system |
| AU2011289239B2 (en) * | 2010-08-12 | 2016-02-25 | Security First Corp. | Systems and methods for secure remote storage of data |
| US20120179909A1 (en) * | 2011-01-06 | 2012-07-12 | Pitney Bowes Inc. | Systems and methods for providing individual electronic document secure storage, retrieval and use |
-
2016
- 2016-06-13 ES ES201630804A patent/ES2613881B1/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| ES2613881A1 (en) | 2017-05-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10536272B2 (en) | Encryption system with double key wrapping | |
| CN110490008B (en) | Security device and security chip | |
| CN106778205A (en) | Verified with the no data storehouse of physics unclonable function | |
| US9537657B1 (en) | Multipart authenticated encryption | |
| US9043610B2 (en) | Systems and methods for data security | |
| EP2506488B1 (en) | Secure dynamic on-chip key programming | |
| CN109756343A (en) | Authentication method, device, computer equipment and the storage medium of digital signature | |
| CN109981255B (en) | Method and system for updating key pool | |
| CN108780548A (en) | Using Elliptic Curve Cryptography for Personal Device Security to Share Secrets | |
| US10630474B2 (en) | Method and system for encrypted data synchronization for secure data management | |
| TWI629608B (en) | Method for copy-protected storage of information on a data carrier | |
| US20100031045A1 (en) | Methods and system and computer medium for loading a set of keys | |
| US7499552B2 (en) | Cipher method and system for verifying a decryption of an encrypted user data key | |
| CN112036881A (en) | Software and hardware implementation mode for getting through different system accounts by using block chain | |
| CN117692134A (en) | Key update management system and key update management method | |
| US8995653B2 (en) | Generating a secret key from an asymmetric private key | |
| CN110008724B (en) | Solid state hard disk controller safe loading method and device and storage medium | |
| CN114679299B (en) | Communication protocol encryption method, device, computer equipment and storage medium | |
| ES2613881B1 (en) | HYBRID METHOD OF ENCRYPTING AND DEFRYING ELECTRONIC DOCUMENTS | |
| CN120602325A (en) | Configuration parameter processing method, electronic device and storage medium | |
| CN114143098A (en) | Data storage method and data storage device | |
| BRPI0811911B1 (en) | AUTHENTICATION METHOD FOR SAFE DATA TRANSMISSION, ELECTRONIC DEVICE, SYSTEM AND MEDIA LEGIBLE BY COMPUTER | |
| ES3038459T3 (en) | Key generation in secure electronic payment systems | |
| JPS62134679A (en) | Encrypted document creation/reading device | |
| CN104092537B (en) | A kind of device and its method of work for realizing key information encoding and decoding |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| FG2A | Definitive protection |
Ref document number: 2613881 Country of ref document: ES Kind code of ref document: B1 Effective date: 20180402 |