WO2004073253A2 - Encryption method and device using an rsa-type cryptosystem - Google Patents

Encryption method and device using an rsa-type cryptosystem Download PDF

Info

Publication number
WO2004073253A2
WO2004073253A2 PCT/ES2004/070007 ES2004070007W WO2004073253A2 WO 2004073253 A2 WO2004073253 A2 WO 2004073253A2 ES 2004070007 W ES2004070007 W ES 2004070007W WO 2004073253 A2 WO2004073253 A2 WO 2004073253A2
Authority
WO
WIPO (PCT)
Prior art keywords
mod
rsa
cryptosystem
encryption
exponent
Prior art date
Application number
PCT/ES2004/070007
Other languages
Spanish (es)
French (fr)
Other versions
WO2004073253A3 (en
Inventor
Araceli Queiruga Dios
Luis ENCINAS HERNÁNDEZ
Jaime MUÑOZ MASQUÉ
Original Assignee
Consejo Superior De Investigaciones Científicas
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Consejo Superior De Investigaciones Científicas filed Critical Consejo Superior De Investigaciones Científicas
Publication of WO2004073253A2 publication Critical patent/WO2004073253A2/en
Publication of WO2004073253A3 publication Critical patent/WO2004073253A3/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • H04L9/3006Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy underlying computational problems or public-key parameters
    • H04L9/302Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy underlying computational problems or public-key parameters involving the integer factorization problem, e.g. RSA or quadratic sieve [QS] schemes

Definitions

  • a procedure and device is presented to choose the keys of the RSA cryptosystem, with encryption exponent given in advance, which is invulnerable to attacks based on the length of the decryption exponents.
  • public or asymmetric cryptosystems characterized by the fact that two different key types are used.
  • the first one is that which allows a sender to encrypt the message that he wishes to send to a recipient, and that is publicly known;
  • the second private key, known only to the recipient of the message, is what enables the recipient to retrieve the original message.
  • the user's public key is the pair of numbers (n, e), while his private key is the number d. Obviously, should the values of prime numbers also be kept secret? and q.
  • n the size of the RSA module, n, be between 512 and 2048 bits, depending on the applications, which ensures the security of the cryptosystem against attacks based on module factorization.
  • d the length of the decryption exponent
  • the algorithm developed by Wiener allows to calculate the value of da from the public key (n, é) in a polynomial time, provided that the number of bits of d is less than a quarter of the number of bits of n, that is, if d ⁇ n 0 '25 .
  • Our invention makes it possible to guarantee a correct choice of the RSA cryptosystem keys, that is, the decryption exponent d and the prime numbers? and q, so that it is invulnerable against WBD-type attacks, once the encryption exponent e has been chosen beforehand.
  • the number of bits of d differs from that of n in, at most, one bit, which guarantees its security against the aforementioned attacks, even if the level d> n 0 ' 5 recommended in the literature is exceeded in the future.
  • the algorithm that we propose for the choice of the keys affects the choice of the prime factors of the module n, but not its size, so it does not jeopardize the cryptosystem against attacks by factorization.
  • the number of bits of d is the maximum possible (the same as the number of bits of the module n) or at most one bit less than the maximum.
  • the first two conditions for the choice of cousins p and q of the RSA private key do not need to be evaluated.
  • the only condition to be checked assuming that cousin p is chosen arbitrarily, is the second condition of cousin q, that is:
  • the algorithm for the execution of the described encryption procedure is implemented as a computer program, which in turn is stored in data storage devices or in general in the hardware or software of devices to be used to generate encryption keys by the method object of the present invention.
  • the RSA cryptosystem protocol is outlined, characterized by a first phase in which the keys (part A) of each user are generated, consisting of the public key, n and e, and the private key, p, q and d; a second phase in which the encryption of the message to be sent (part B) is carried out by the recipient's public key; another phase in which the encrypted message is transmitted (part C), and finally, a fourth phase (part D) in which the received message is decrypted, using both the public and private keys of the recipient.
  • Figure 5 presents the protocol proposed for the case where the encryption exponent is a prime number greater than 3.
  • the prime numbers verify some of the properties that are required to ensure that the size of the exponent of decryption is the same as that of the RSA module, and since one of them can be chosen arbitrarily, it is only necessary to check the remaining property for the other cousin.
  • n yphi (n) The values of n yphi (n) are determined below:
  • n 42137 05385 93582 46537 63075 08503 22022 56011 20970 30565 27299 67417 46746 43033 53103 77287 89217 79492 11878 92507 98771 92539 93307 28683 09293 0048627779 55060 33000 16214 0381.
  • phi (n) 42137 05385 93582 46537 63075 08503 22022 56011 20970 30565 27299 67417 46746 43033 53103 75988 94001 04299 39262 69085 97017 02901 83202 99788 4872929342 99855 79735 07826 70605 2092.
  • the public key is formed by the numbers (n, e), while the private one consists of d.
  • n 686293854068157357816099439675414869890960980147278833137895 836626083540928757986668300148 104595972683409247692904305241 5005604858988746776424166704035623.
  • phi ( ⁇ ) 6862938540681573578160994396754148698909609801472788331 378958366260835409287407806021 688775955049635234 9202638284 856201184194002360366502102755722207928.
  • the public key is formed by the numbers (n, e), while the private one is the number d, whose length is the same as that of n.
  • n 769530499628692511125805701417448426891699714970767103432966 4778486091 805594651791575795828892402485 70241 24094 1380551536 0534160152560877739040218786034167.
  • phi (n) 7695304996286925111258057014174484268916997149707671034 329664778486091 8055944757057444943079274529624901994791 99106 880480404734349340836854307929254116976.

Abstract

The invention relates to an encryption method and device using an RSA-type cryptosystem. More specifically, the invention relates to a method of selecting the private key of the RSA cryptosystem, once the encryption exponent e has been fixed, which, in addition to being secure against factoring attacks, is novel in that it is invincible to attacks based on the length of the W-B-D-type decryption exponents. The inventive private key selection method not only guarantees that e has the desired value and that the size of the decryption exponent d resists W-B-D-type attacks, but also that the size thereof is much greater than that recommended in order to prevent such attacks. In fact, the number of d bits is the maximum possible (the same as the number of bits of modulus n) or, at most, one bit less than the maximum.

Description

TÍTULOTITLE
PROCEDIMIENTO Y DISPOSITIVO DE ENCRIPTACIÓN MEDIANTE UN CRIPTOSISTEMA TIPO RSAENCRYPTION PROCEDURE AND DEVICE BY AN RSA TYPE CRYPTOSYSTEM
OBJETO DE LA INVENCIÓNOBJECT OF THE INVENTION
Se presenta un procedimiento y dispositivo para elegir las claves del criptosistema RSA, con exponente de cifrado dado de antemano, que es invulnerable a los ataques basados en la longitud de los exponentes de descifrado.A procedure and device is presented to choose the keys of the RSA cryptosystem, with encryption exponent given in advance, which is invulnerable to attacks based on the length of the decryption exponents.
SECTORES DE LA TÉCNICA EN LOS QUE TIENE APLICACIÓNSECTORS OF THE TECHNIQUE IN WHICH IT HAS APPLICATION
• Criptografía• Cryptography
• Tecnologías de las comunicaciones• Communications technologies
• Seguridad informática• Informatic security
• Banca electrónica • Comercio electrónico• Electronic banking • Electronic commerce
ESTADO DE LA TÉCNICASTATE OF THE TECHNIQUE
Existen en la actualidad diferentes métodos y algoritmos que permiten llevar a cabo, de modo seguro, el intercambio de información en redes de ordenadores. Entre ellos se encuentran los denominados criptosistemas de clave pública o asimétricos, caracterizados por el hecho de que se utilizan dos tipos claves diferentes. La primera de ellas (clave pública) es la que permite que un remitente cifre el mensaje que desea enviar a un destinatario, y que es públicamente conocida; la segunda (clave privada), sólo conocida por el destinatario del mensaje, es la que posibilita al destinatario recuperar el mensaj e original. ' There are currently different methods and algorithms that allow you to safely carry out the exchange of information in computer networks. Among them are the so-called public or asymmetric cryptosystems, characterized by the fact that two different key types are used. The first one (public key) is that which allows a sender to encrypt the message that he wishes to send to a recipient, and that is publicly known; the second (private key), known only to the recipient of the message, is what enables the recipient to retrieve the original message. '
Por otra parte, es bien conocido que el criptosistema de clave pública más utilizado en la actualidad es el denominado RSA ([RSA78]), cuyo nombre se deriva de las iniciales de sus tres autores. Debido a su gran robustez, es el criptosistema que más atención ha suscitado y sobre el que más investigaciones se han llevado a cabo con el fin de intentar romperlo, descubriendo sus posibles debilidades.On the other hand, it is well known that the most commonly used public key cryptosystem is called RSA ([RSA78]), whose name is derived from the initials of its three authors. Due to its great robustness, it is the cryptosystem that has received the most attention and on which more research has been carried out in order to try to break it, discovering its possible weaknesses.
El protocolo del criptosistema RSA consta de varias fases (ver Fig. 1). La primera de ellas consiste en determinar las claves que cada usuario va a utilizar (parte A de la Fig. 1); otras dos fases son las relativas al cifrado y descifrado de los mensajes que se deseen enviar o que se reciban (partes B y D de la Fig. 1, respectivamente), mientras que la fase intermedia corresponde a la de la transmisión del mensaje cifrado (parte C de la Fig. 1). Aquí nos detendremos exclusivamente en la primera de las fases, la del establecimiento de las claves. Para elegir las claves de un usuario se deben seleccionar dos números primos grandes, p y q, y multiplicarlos para obtener el módulo RSA: n = p q. Este número determina que el grupo que dicho usuario utilizará será Z„. A continuación se elige el exponente de cifrado, e, con 1 < e <phi(ή) = (p - \)(q - 1), de modo que sea un número primo con phi(ή), es decir, se debe verificar: mcd(e, phi(ή)) = 1. Una vez elegido e, se determina su inverso módulo phi( ), es decir, se calcula d con e d = 1 (mod phi(n)). Hecho esto, la clave pública del usuario es la pareja de números (n, e), mientras que su clave privada es el número d. Obviamente, también deben de mantenerse en secreto los valores de los números primos ? y q.The RSA cryptosystem protocol consists of several phases (see Fig. 1). The first one consists in determining the keys that each user will use (part A of Fig. 1); two other phases are those related to the encryption and decryption of the messages that they wish to send or receive (parts B and D of Fig. 1, respectively), while the intermediate phase corresponds to that of the transmission of the encrypted message (part C of Fig. 1). Here we will stop exclusively in the first phase, the establishment of the keys. To choose a user's keys, two large prime numbers, p and q, must be selected and multiplied to obtain the RSA module: n = p q. This number determines that the group that said user will use will be Z „. The encryption exponent is then chosen, e, with 1 <e <phi (ή) = (p - \) (q - 1), so that it is a prime number with phi (ή), that is, it must be verify: mcd (e, phi (ή)) = 1. Once e is chosen, its inverse module phi () is determined, that is, d is calculated with e d = 1 (mod phi (n)). This done, the user's public key is the pair of numbers (n, e), while his private key is the number d. Obviously, should the values of prime numbers also be kept secret? and q.
A la hora de llevar a cabo las implementaciones prácticas de este criptosistema, es fundamental que el exponente de cifrado, e, sea pequeño, de modo que el proceso de cifrado sea rápido y se mantenga eficiente cuando se utiliza en redes locales e Intranets ([MOV97]). De hecho, los valores más recomendados son e = 3 (= 2 + l) y e = 65537 = 216 + 1. Las razones de tales elecciones se basan en el hecho de que en ambos casos, la expresión binaria del exponente elegido es muy sencilla y sólo requiere de unas pocas operaciones matemáticas.When carrying out the practical implementations of this cryptosystem, it is essential that the encryption exponent, e, be small, so that the encryption process is fast and remains efficient when used in local and Intranets networks ([ MOV97]). In fact, the most recommended values are e = 3 (= 2 + l) and e = 65537 = 2 16 + 1. The reasons for such choices are based on the fact that in both cases, the binary expression of the chosen exponent is very Simple and only requires a few mathematical operations.
Por otra parte, el ataque más estudiado para intentar romper este criptosistema es el de analizar las diferentes formas de factorizar el módulo RSA, lo que permitiría recuperar la clave privada y descifrar, a partir de ella, cualquier mensaje cifrado con la clave pública. En efecto, si se logra la factorización de n, es fácil calcular el valor de phi( ) = (p - l)(q - 1), y a partir de dicho valor es inmediato calcular el exponente de descifrado d, puesto que la clave de cifrado es públicamente conocida; Para evitar este tipo de ataque se recomienda que las longitudes de los números primos p y q, sean lo suficientemente grandes como para que tal eventualidad requiera tiempos de computación inviables con la mejor tecnología disponible y el mejor algoritmo de factorización conocido. De ahí que en la actualidad se recomiende que el tamaño del módulo RSA, n, esté entre 512 y 2048 bits, dependiendo de las aplicaciones, lo que garantiza la seguridad del criptosistema contra los ataques basados en la factorización del módulo. Existen otros ataques al criptosistema RSA que no recurren a la búsqueda de los factores primos del módulo RSA. Estos ataques intentan explotar la debilidad que supone el hecho de que la longitud del exponente de descifrado, d, sea pequeña.On the other hand, the most studied attack to try to break this cryptosystem is to analyze the different ways of factoring the RSA module, which would allow to recover the private key and decipher, from it, any message encrypted with the public key. Indeed, if the factorization of n is achieved, it is easy to calculate the value of phi () = (p - l) (q - 1), and from that value it is immediate to calculate the decryption exponent d, since the key Encryption is publicly known; To avoid this type of attack it is recommended that the lengths of the prime numbers p and q, be large enough that such eventuality requires unfeasible computation times with the best available technology and the best known factorization algorithm. Hence, it is currently recommended that the size of the RSA module, n, be between 512 and 2048 bits, depending on the applications, which ensures the security of the cryptosystem against attacks based on module factorization. There are other attacks on the RSA cryptosystem that do not resort to the search for the prime factors of the RSA module. These attacks attempt to exploit the weakness of the fact that the length of the decryption exponent, d, is small.
Por lo dicho anteriormente acerca de la importancia de elegir un exponente de cifrado, e, verificando las condiciones de ser primo conphi(n) y además pequeño, queda claro que su elección determina de modo directo el valor del exponente de descifrado, d, puesto que es su inverso módulo phi(ή). Si este valor de d es relativamente pequeño comparado con el de n, existe un algoritmo desarrollado por Wiener ([Wie90])5 basado en la expresión de un número racional por medio de fracciones continuas, que permite calcular d de modo eficiente, es decir, en un tiempo razonable. De hecho, el algoritmo desarrollado por Wiener permite calcular el valor de d a partir de la clave pública (n, é) en un tiempo polinómico, siempre que el número de bits de d sea menor que la cuarta parte del número de bits de n, es decir, si d< n0'25.From what has been said above about the importance of choosing an encryption exponent, e, verifying the conditions of being cousin conphi (n) and also small, it is clear that your choice directly determines the value of the decryption exponent, d, put which is its inverse module phi (ή). If this value of d is relatively small compared to that of n, there is an algorithm developed by Wiener ([Wie90]) 5 based on the expression of a rational number by means of continuous fractions, which allows to calculate d efficiently , in a reasonable time. In fact, the algorithm developed by Wiener allows to calculate the value of da from the public key (n, é) in a polynomial time, provided that the number of bits of d is less than a quarter of the number of bits of n, that is, if d <n 0 '25 .
El interés por el ataque al exponente de descifrado ha ido en aumento en los últimos cinco años, erigiéndose como el criptoanalisis más efectivo del RSA, dado el estancamiento del ataque por factorización. Así, en [VT97] se prueba que es posible encontrar el exponente de descifrado d, si d < n°'5 en menos tiempo que con una búsqueda exahustiva, pero este algoritmo sólo es una ligera mejora al de Wiener puesto que requiere de tiempo exponencial si se tiene que d > n0 5. Por otra parte, en [Bon99], [BDF98], [BV98] y [DNOO] se han presentado otras alternativas para atacar el criptosistema RSA basadas en la debilidad que supone utilizar exponentes de descifrado pequeños. Sin embargo, hasta la aparición de la propuesta de Boneh y Durfee ([BD00]) no se ha mejorado realmente el algoritmo de Wiener, de modo que es posible recuperar la clave privada de un usuario a partir de su clave pública si el exponente de descifrado verifica la siguiente cota superior: d < n0292. Además, los experimentos llevados a cabo por estos dos autores, permiten suponer que el RSA puede ser roto de forma eficiente mediante este tipo de algoritmo si el número de bits de d es menor que la mitad del número de bits de n; es decir, si d < n0'5.Interest in the attack on the decryption exponent has been increasing in the last five years, becoming the most effective cryptanalysis of the RSA, given the stagnation of the factorization attack. Thus, in [VT97] it is proved that it is possible to find the decryption exponent d, if d <n ° ' 5 in less time than with an exhaustive search, but this algorithm is only a slight improvement to that of Wiener since it requires time exponential if you have to d> n 0 5 . On the other hand, in [Bon99], [BDF98], [BV98] and [DNOO] other alternatives have been presented to attack the RSA cryptosystem based on the weakness of using small decryption exponents. However, until the appearance of the proposal by Boneh and Durfee ([BD00]) the Wiener algorithm has not really been improved, so that it is possible to recover a user's private key from his public key if the exponent of decryption verifies the following upper bound : d <n 0292 . In addition, the experiments carried out by these two authors allow us to assume that the RSA can be broken efficiently by this type of algorithm if the number of bits of d is less than half of the number of bits of n; that is, if d <n 0'5 .
Contra estos ataques basados en el tamaño del exponente de descifrado sólo cabe una protección, seleccionar d de modo que su tamaño sea lo más próximo posible al del módulo n. No obstante, dada la estrecha relación existente entre los valores de d y de e, el valor de uno condiciona el valor del otro. Hasta la fecha no se ha propuesto ninguna alternativa que sea eficiente para protegerse de los ataques del tipo Wiener-Boneh-Durfee (W-B-D). De hecho, las dos únicas posibilidades que existen son: o bien repetir la elección del exponente de cifrado e, si su correspondiente exponente de descifrado no verifica la cota d > n05, hasta hallar un d que sí lo haga; o bien elegir en primer lugar el exponente de descifrado d, de modo que su número de bits sea mayor que la mitad del número de bits de n, tantas veces como sea necesario de modo que su correspondiente valor de e verifique la condición de ser primo con phi(ή). Cualquiera de estas dos alternativas, que asegura una correcta elección de los exponentes e y d (aunque pueda requerir un número elevado de iteraciones) no garantiza que el valor de e sea el que se desee o el más conveniente para determinados entornos reales de trabajo.Against these attacks based on the size of the decryption exponent there is only one protection, select d so that its size is as close as possible to that of module n. However, given the close relationship between the values of d and e, the value of one determines the value of the other. To date, no alternative that is efficient to protect against attacks of the Wiener-Boneh-Durfee (WBD) type has been proposed. In fact, the only two possibilities that exist are: either to repeat the choice of the encryption exponent e, if its corresponding decryption exponent does not verify the dimension d> n 05 , until a d is found that does; or choose first the decryption exponent d, so that its number of bits is greater than half the number of bits of n, as many times as necessary so that its corresponding value of e verifies the condition of being prime with phi (ή). Either of these two alternatives, which ensures a correct choice of the eyd exponents (although it may require a high number of iterations) does not guarantee that the value of e is as desired or the most convenient for certain real work environments.
Nuestra invención permite garantizar una correcta elección de las claves del criptosistema RSA, es decir, del exponente de descifrado dy de los números primos ? y q, de modo que sea invulnerable contra los ataques de tipo W-B-D, una vez que se ha elegido el exponente de cifrado e de antemano. De hecho, el número de bits de d difiere del de n en, a lo más, un bit, lo cual garantiza su seguridad contra los ataques mencionados, incluso aunque la cota d > n0'5 recomendada en la literatura sea superada en el futuro. El algoritmo que proponemos para la elección de las claves afecta a la elección de los factores primos del módulo n, pero no a su tamaño, por lo que no pone en peligro el criptosistema contra los ataques por factorización. Our invention makes it possible to guarantee a correct choice of the RSA cryptosystem keys, that is, the decryption exponent d and the prime numbers? and q, so that it is invulnerable against WBD-type attacks, once the encryption exponent e has been chosen beforehand. In fact, the number of bits of d differs from that of n in, at most, one bit, which guarantees its security against the aforementioned attacks, even if the level d> n 0 ' 5 recommended in the literature is exceeded in the future. The algorithm that we propose for the choice of the keys affects the choice of the prime factors of the module n, but not its size, so it does not jeopardize the cryptosystem against attacks by factorization.
REFERENCIASREFERENCES
[Bon99] D. Boneh, "Twenty years of attacks on the RSA cryptosystem", Notices Amer.[Bon99] D. Boneh, "Twenty years of attacks on the RSA cryptosystem", Notices Amer.
Math. Soc. 46, 2 (1999), 203-213. [BDOO] D. Boneh and G. Durfee, "Cryptanalysis of RSA with prívate key d less than n0292, IEEE Trans. Inform. Theory 36, 4 (2000), 1339-1349.Math Soc. 46, 2 (1999), 203-213. [BDOO] D. Boneh and G. Durfee, "Cryptanalysis of RSA with prívate key d less than n 0292, IEEE Trans. Inform. Theory 36, 4 (2000), 1339-1349.
[BDF98] D. Boneh, G. Durfee and Y. Frankel, "An attack on RSA given a small fraction of the prívate key bits", Proc. of Asiacrypt'98, LNCS 1514 (1998), 25-34. [BV98] D. Boneh and R. Venkatesan, "Breaking RSA may not be equivalent to factoring", Proc. ofE rocrypt'98, LNCS 1233 (1998), 59-71/[BDF98] D. Boneh, G. Durfee and Y. Frankel, "An attack on RSA given a small fraction of the prívate key bits", Proc. of Asiacrypt'98, LNCS 1514 (1998), 25-34. [BV98] D. Boneh and R. Venkatesan, "Breaking RSA may not be equivalent to factoring", Proc. ofE rocrypt'98, LNCS 1233 (1998), 59-71 /
[DNOO] G. Durfee and P. Q. Nguyen, "Cryptanalysis of the RSA schemes with short secret exponent from Asiacrypt'99", Proc. of Asiacrypt'00, LNCS 1976 (2000), 14-29. [LIP] htip://www.und.edu/org/cιypto/crypto/numbers/programs/freelip/ [MOV97] A. Menezes, P. van Oorschot and S.Vanstone, Handbook of Applied Cryptology, CRC Press, Boca Ratón, FL., 1997. [Rie94] H. Riesel, "Prime numbers and computer methods for factorization",[DNOO] G. Durfee and P. Q. Nguyen, "Cryptanalysis of the RSA schemes with short secret exponent from Asiacrypt'99", Proc. of Asiacrypt'00, LNCS 1976 (2000), 14-29. [LIP] htip: //www.und.edu/org/cιypto/crypto/numbers/programs/freelip/ [MOV97] A. Menezes, P. van Oorschot and S.Vanstone, Handbook of Applied Cryptology, CRC Press, Boca Mouse, FL., 1997. [Rie94] H. Riesel, "Prime numbers and computer methods for factorization",
Birkhauser, Boston, 1994. [RSA78] R. L. Rivest, A. Shamir and L. Adleman, "A method for obtaining digital signatures and public-key cryptosystem", Commun. ACM21 (1978), 120-126.Birkhauser, Boston, 1994. [RSA78] R. L. Rivest, A. Shamir and L. Adleman, "A method for obtaining digital signatures and public-key cryptosystem", Commun. ACM21 (1978), 120-126.
[VT97] E. R. Verheul and H.C. A. van Tilborg, "Cryptanalysis of less short' RSA secret exponents", Appl. Algebra Engrg. Comm. Comput. 8 (1997), 425-435. [Wie90] M. J. Wiener, "Cryptanalysis of short RSA secret exponents", IEEE Trans. Inform. Theory 36, 3 (1990), 553-558. [Wil] J. P. Williams, http://www.mindspring.com/~pate/ EXPLICACIÓN DE LA INVENCIÓN Breve descripción de la invención[VT97] ER Verheul and HCA van Tilborg, "Cryptanalysis of less short 'RSA secret exponents", Appl. Algebra Engrg. Comm. Comput 8 (1997), 425-435. [Wie90] MJ Wiener, "Cryptanalysis of short RSA secret exponents", IEEE Trans. Inform. Theory 36, 3 (1990), 553-558. [Wil] JP Williams, http://www.mindspring.com/~pate/ EXPLANATION OF THE INVENTION Brief description of the invention
Como ya hemos mencionado en la exposición del Estado de la Técnica, el esquema general de los dispositivos que permiten la elección de las claves de un usuario para el criptosistema RSA (ver Fig. 2), sigue los siguientes pasos:As we have already mentioned in the statement of the State of the Art, the general scheme of the devices that allow the choice of a user's keys for the RSA cryptosystem (see Fig. 2), follows the following steps:
1. Elección y verificación de los parámetros iniciales.1. Choice and verification of initial parameters.
2. Elección y verificación de la clave pública.2. Choice and verification of the public key.
3. Determinación de la clave privada. 4. Publicación de la clave pública.3. Determination of the private key. 4. Publication of the public key.
De forma más precisa, el protocolo que se sigue para la elección de las claves RSA es el siguiente (ver Fig. 3):More precisely, the protocol followed for the choice of RSA keys is as follows (see Fig. 3):
1. Elección aleatoria de dos números impares grandes p y q.1. Random choice of two large odd numbers p and q.
2. Comprobación de la primalidad de tales números.2. Verification of the primality of such numbers.
3. Cálculo del módulo RSA, n -p q, y del valor phi(ή) = (p - ϊ)(q - 1).3. Calculation of the RSA module, n -p q, and the value phi (ή) = (p - ϊ) (q - 1).
4. Elección del exponente de cifrado 1 < e <phi(rí).4. Choice of encryption exponent 1 <e <phi (rí).
5. Comprobación de la coprimalidad entre e yphi(n): mcd(e, phi(n)) = 1. 6. Cálculo del exponente de descifrado d, verificando e d- 1 (mod phi(ri)).5. Checking the coprimacy between e and phi (n): mcd (e, phi (n)) = 1. 6. Calculation of the decryption exponent d, verifying e d- 1 (mod phi (ri)).
7. Publicación de la clave pública (n, é).7. Publication of the public key (n, é).
En esta invención se presenta un procedimiento que permite elegir la clave privada del criptosistema RSA, una vez fijado de antemano el exponente, e, de cifrado, que además de ser seguro contra los ataques por factorización, presenta la novedad de que es invulnerable a los ataques basados en la longitud de los exponentes de descifrado del tipo W-B-D.In this invention a procedure is presented that allows the private key of the RSA cryptosystem to be chosen, once the exponent, and, of encryption, which in addition to being secure against attacks by factorization, is presented in advance, presents the novelty that it is invulnerable to attacks based on the length of the decryption exponents of the WBD type.
Con el método de elección de clave privada que presentamos no sólo se garantiza que el valor de e será el deseado y que el tamaño del exponente de descifrado d resistirá los ataques del tipo W-B-D, si no que, además, su tamaño es mucho mayor que el recomendado para evitar estos ataques. De hecho el número de bits de d es el máximo posible (el mismo que el número de bits del módulo n) o a lo sumo un bit menos que el máximo. Descripción detallada de la invenciónWith the method of choosing the private key that we present, it is not only guaranteed that the value of e will be the desired one and that the size of the decryption exponent d will resist attacks of the WBD type, but also that its size is much larger than the recommended to avoid these attacks. In fact, the number of bits of d is the maximum possible (the same as the number of bits of the module n) or at most one bit less than the maximum. Detailed description of the invention
Como ya se ha comentado, tanto la elección de la clave pública, (n, e), como de la privada, (p, q, d), del criptosistema RSA deben verificar determinadas condiciones: los números p y q han de ser primos grandes con el fin de evitar los ataques a la factorización del módulo n = p q, e debe ser primo con phi(ri) y d ha de verificar la condición e - d= 1 (mod phi(n)).As already mentioned, both the choice of the public key, (n, e), and the private one, (p, q, d), of the RSA cryptosystem must verify certain conditions: the numbers p and q must be large cousins with In order to avoid attacks on the factorization of the module n = p q, e must be a cousin with phi (ri) and d must verify the condition e - d = 1 (mod phi (n)).
Esta última condición puede reescribirse en la forma e d= 1 + k phi(ή), siendo k un número entero. Por otra parte, el mayor valor que puede tomar k es e - 1, en cuyo caso, se tiene que d > 2 phi(ή) / 3, de donde se puede asegurar que la longitud en bits de d es mayor o igual que la longitud en bits de n menos una unidad. Así pues, si se considera k = e - 1, se garantiza que la elección de la clave d hace el criptosistema invulnerable con relación a los ataques del tipo W-B-D.This last condition can be rewritten in the form e d = 1 + k phi (ή), where k is an integer. On the other hand, the greatest value that k can take is e - 1, in which case it is necessary to d> 2 phi (ή) / 3, from which it can be ensured that the bit length of d is greater than or equal to than the bit length of n minus one unit. Thus, if k = e - 1 is considered, it is guaranteed that the choice of the key d makes the cryptosystem invulnerable in relation to attacks of the WBD type.
Por otra parte, para que se verifique la igualdad k = e - 1, basta con elegir los primos p y q de forma adecuada. Esta elección es la que se propone como nuevo protocolo de elección de claves. En general, los números primos p y q deben verificar las siguientes condiciones, que pueden simplificarse para casos particulares del exponente de cifrado, dado que sólo dependen de sus restos al ser divididos por el número e:On the other hand, for the equality k = e - 1 to be verified, it is enough to choose the cousins p and q in an appropriate way. This choice is the one proposed as a new protocol for choosing keys. In general, the prime numbers p and q must verify the following conditions, which can be simplified for particular cases of the encryption exponent, since they only depend on their remains by being divided by the number e:
mcd((/? mod é) (( ? mod e) - 1) mod e, é) = 1,mcd ((/? mod é) ((? mod e) - 1) mod e, é) = 1,
cá((q mod é) ((q mod é) - 1) mod e, é) = 1,ca ((q mod é) ((q mod é) - 1) mod e, é) = 1,
q = ((p mod e) I ((p mod é) - 1)) (mod e).q = ((p mod e) I ((p mod é) - 1)) (mod e).
Obsérvese que las condiciones de los primos p y q son simétricas. Nótese además que la comprobación de estas propiedades necesita muy poco tiempo de computación, dado que sólo requieren de adiciones, multiplicaciones y divisiones modulares. Por simplicidad a la hora de presentar los protocolos y las figuras para la elección de la clave privada que proponemos, describiremos tres protocolos según los posibles valores que se elijan para el exponente de cifrado e: (1) e = 3, (2) e es primo y mayor que 3, y (3) e no es primo. oNote that the conditions of the cousins pyq are symmetric. Note also that the verification of these properties requires very little computing time, since they only require additions, multiplications and modular divisions. For simplicity when presenting the protocols and figures for the choice of the private key that we propose, we will describe three protocols according to the possible values chosen for the encryption exponent e: (1) e = 3, (2) e is a cousin and greater than 3, and (3) e is not a cousin. or
Caso (1): e = 3Case (1): e = 3
En esta situación, el protocolo que se presenta en la Fig. 4 es muy parecido al que se sigue de forma habitual y que se mostró en la Fig. 3. No obstante, el que nos ocupa en este caso es más eficiente que el estándar mencionado dado que, como se ha señalado más arriba, determina un exponente de descifrado d de un tamaño similar al de n y, por tanto, no es necesario chequear si cumple los requisitos para ser seguro contra los ataques de W-B-D. Nótese que en este caso se tiene p (mod é) = 2 y q (mod é) = 2 por ser/? y q primos, por lo que no existen restricciones a la hora de seleccionar ambos primos, salvo las propias del criptosistema RSA.In this situation, the protocol presented in Fig. 4 is very similar to the one that is followed in the usual way and that was shown in Fig. 3. However, the one that concerns us in this case is more efficient than the standard mentioned since, as noted above, it determines a decryption exponent d of a size similar to that of n, therefore, it is not necessary to check whether it meets the requirements to be safe against WBD attacks. Note that in this case you have p (mod é) = 2 and q (mod é) = 2 for being /? and q cousins, so there are no restrictions when selecting both cousins, except those of the RSA cryptosystem.
Caso (2): e es un número primo mayor que 3Case (2): e is a prime number greater than 3
Si e > 3 es un número primo, cualquier número primo s diferente de e verifica la condiciónIf e> 3 is a prime number, any prime number s other than e verifies the condition
mcd^s mod é) ((s mod é) - 1) (mod e), é) = 1,mcd ^ s mod é) ((s mod é) - 1) (mod e), é) = 1,
por lo que las dos primeras condiciones para la elección de los primos p y q de la clave privada del RSA no precisan ser evaluadas. Así pues, en este caso, la única condición que se debe comprobar, supuesto que el primo p se elige de forma arbitraria, es la segunda condición del primo q, esto es:Therefore, the first two conditions for the choice of cousins p and q of the RSA private key do not need to be evaluated. Thus, in this case, the only condition to be checked, assuming that cousin p is chosen arbitrarily, is the second condition of cousin q, that is:
q = ((p mod e) I ((p mod é) - 1)) (mod é).q = ((p mod e) I ((p mod é) - 1)) (mod é).
Nótese que, en virtud del Teorema de Dirichlet (véase, por ejemplo, [Rie94]) existen infinitos primos de la formaNote that, under the Dirichlet Theorem (see, for example, [Rie94]) there are infinite cousins of the form
q = ((p mod é) I ((p mod é) - 1)) (mod é) + k e,q = ((p mod é) I ((p mod é) - 1)) (mod é) + k e,
ya que ((p mod é) I (p mod e - 1)) (mod é) y e son primos entres sí. En la Fig. 5 se puede observar el protocolo que se propone para la elección de las claves en este caso. Caso (3): e no es primosince ((p mod é) I (p mod e - 1)) (mod é) ye are cousins, yes. In Fig. 5 you can see the protocol proposed for the selection of the keys in this case. Case (3): e is not a cousin
En el caso en que el exponente de cifrado se elija de modo que no sea un número primo, se deberá comprobar que se verifican las tres condiciones de los números primos p y q, presentadas más arriba, es decir,In the case where the encryption exponent is chosen so that it is not a prime number, it should be verified that the three conditions of the prime numbers p and q, presented above, are verified, that is,
mcd((/? mod é) ((p mod é) - 1) (mod e), e) = l,mcd ((/? mod é) ((p mod é) - 1) (mod e), e) = l,
cd((q mod é) ((q mod é) - 1) (mod é), e) = 1,cd ((q mod é) ((q mod é) - 1) (mod é), e) = 1,
q = ((p mod e) / ((p mod e) - 1)) (mod e).q = ((p mod e) / ((p mod e) - 1)) (mod e).
El protocolo correspondiente a este caso más general es el que aparece detallado en la Fig. 6.The protocol corresponding to this more general case is the one detailed in Fig. 6.
El algoritmo para la ejecución del procedimiento de encriptación descrito se implementa como un programa informático, el cual a su vez se almacena en dispositivos de almacenamiento de datos o en general en el hardware o el software de dispositivos que vayan a utilizarse para generar claves de encriptación mediante el procedimiento objeto de la presente invención. The algorithm for the execution of the described encryption procedure is implemented as a computer program, which in turn is stored in data storage devices or in general in the hardware or software of devices to be used to generate encryption keys by the method object of the present invention.
DESCRIPCIÓN DE LAS FIGURASDESCRIPTION OF THE FIGURES
Figura 1. Esquema general del criptosistema RSAFigure 1. General scheme of the RSA cryptosystem
En esta figura se esquematiza el protocolo del criptosistema RSA, que se caracteriza por una primera fase en la que se generan las claves (parte A) de cada usuario, constituidas por la clave pública, n y e, y la clave privada, p, q y d; una segunda fase en la que se lleva a cabo el cifrado del mensaje a enviar (parte B) mediante la clave pública del receptor; otra fase en la que se procede a la transmisión del mensaje cifrado (parte C), y finalmente, una cuarta fase (parte D) en la que se descifra el mensaje recibido, utilizando para ello tanto la clave pública como la privada del receptor.In this figure the RSA cryptosystem protocol is outlined, characterized by a first phase in which the keys (part A) of each user are generated, consisting of the public key, n and e, and the private key, p, q and d; a second phase in which the encryption of the message to be sent (part B) is carried out by the recipient's public key; another phase in which the encrypted message is transmitted (part C), and finally, a fourth phase (part D) in which the received message is decrypted, using both the public and private keys of the recipient.
Figura 2. Esquema general del dispositivo de elección de las claves RSAFigure 2. General scheme of the device for choosing RSA keys
Esta figura se presenta el proceso genérico que se propone en la literatura al uso (ver por ejemplo, [MOV97]) para la elección de las claves del criptosistema RSA.This figure presents the generic process that is proposed in the literature to use (see for example, [MOV97]) for the choice of RSA cryptosystem keys.
Figura 3. Protocolo para la elección de las claves RSAFigure 3. Protocol for the choice of RSA keys
La Figura 3 desarrolla de forma más precisa el proceso presentado en la Fig. 2.Figure 3 develops more precisely the process presented in Fig. 2.
En este caso, se indican las elecciones de los números que se deben llevar a cabo, así como las propiedades que deben verificar los mismos. Una vez concluido este protocolo, las claves seleccionadas garantizan la seguridad del criptosistema contra los ataques basados en la factorización de números enteros, no contra los del tipo W-B-D.In this case, the choices of the numbers to be carried out are indicated, as well as the properties that should verify them. Once this protocol is concluded, the selected keys guarantee the security of the cryptosystem against attacks based on the factorization of whole numbers, not against those of the W-B-D type.
Figura 4. Protocolo propuesto para la elección de las claves RSA si 6 = 3Figure 4. Proposed protocol for the choice of RSA keys if 6 = 3
En esta figura se presenta el protocolo que se propone en esta invención para el caso más sencillo, es decir, aquel en el que el exponente de cifrado es e = 3. En este caso, dado que se ha probado que para cualesquiera valores de los primos p y q, la longitud en bits de d garantiza la invulnerabilidad del criptosistema, no se requieren más cálculos que los necesarios para garantizar la seguridad del criptosistema contra los ataques por factorización. Figura 5. Protocolo propuesto para la elección de las claves RSA si e > 3 es primoThis figure presents the protocol proposed in this invention for the simplest case, that is, the one in which the encryption exponent is e = 3. In this case, since it has been proven that for any values of the cousins pyq, the bit length of d guarantees the invulnerability of the cryptosystem, no more calculations are needed than those necessary to ensure the security of the cryptosystem against attacks by factorization. Figure 5. Proposed protocol for the choice of RSA keys if e> 3 is a cousin
La Figura 5 presenta el protocolo que se propone para el caso en que el exponente de cifrado sea un número primo mayor que 3. En este caso, como los números primos verifican algunas de las propiedades que se exigen para garantizar que el tamaño del exponente de descifrado es el mismo que el del módulo RSA, y dado que uno de ellos se puede elegir de forma arbitraria, sólo es necesario hacer la comprobación de la propiedad restante para el otro primo.Figure 5 presents the protocol proposed for the case where the encryption exponent is a prime number greater than 3. In this case, as the prime numbers verify some of the properties that are required to ensure that the size of the exponent of decryption is the same as that of the RSA module, and since one of them can be chosen arbitrarily, it is only necessary to check the remaining property for the other cousin.
Figura 6. Protocolo propuesto para la elección de las claves RSA si e no es primo En esta última figura se muestra el protocolo que se debe seguir en el caso en que el exponente de cifrado sea un número compuesto. Puede observarse que en esta situación el número de operaciones a realizar es mayor que en los dos casos anteriores, dado que se deben verificar las tres condiciones señaladas más arriba.Figure 6. Proposed protocol for the choice of RSA keys if e is not a cousin This last figure shows the protocol to be followed in the case where the encryption exponent is a composite number. It can be observed that in this situation the number of operations to be carried out is greater than in the two previous cases, given that the three conditions indicated above must be verified.
EXPOSICIÓN DETALLADA DE UN MODO DE REALIZACIÓN DE LA INVENCIÓN DescripciónDETAILED EXHIBITION OF AN EMBODIMENT OF THE INVENTION Description
A continuación se describe una posible implementación de cómo seleccionar las claves del criptosistema RSA de modo que se garantice su invulnerabilidad a los ataques contra la longitud del exponente de descifrado. Además, se tendrán en cuenta las longitudes recomendadas de los números primos a emplear con el fin de evitar los ataques por la factorización del módulo. Para la generación de números primos probables y para la verificación de su primalidad, se hará uso de algoritmos ya publicados, como es el caso de los algoritmos de Maurer y de Miller-Rabin, respectivamente ([LIP], [MOV97, Section 4.2.3 ] y [Wil]).The following describes a possible implementation of how to select the keys of the RSA cryptosystem so that its invulnerability to attacks against the length of the decryption exponent is guaranteed. In addition, the recommended lengths of the prime numbers to be used will be taken into account in order to avoid attacks by module factorization. For the generation of probable prime numbers and for the verification of their primality, we will make use of already published algorithms, such as the Maurer and Miller-Rabin algorithms, respectively ([LIP], [MOV97, Section 4.2. 3] and [Wil]).
Por otra parte, dado que se han presentado 3 casos diferentes, en función de los tres tipos de posibles valores que pueden asignarse al exponente de cifrado e, se expondrán tres determinaciones prácticas de las claves, con valores reales, es decir, que pueden ser utilizados en cualquier implementación práctica real. Caso (1): e = 3.On the other hand, given that 3 different cases have been presented, depending on the three types of possible values that can be assigned to the encryption exponent e, three practical determinations of the keys will be presented, with real values, that is, they can be used in any real practical implementation. Case (1): e = 3.
Dado que para el caso en que e = 3 no hay condiciones sobre los números primos a considerar, bastará con generar dos números primos de tamaño adecuado. En este caso hemos generado dos números primos de 256 bits cada uno y hemos verificado su primalidad.Since in the case where e = 3 there are no conditions on the prime numbers to consider, it will be enough to generate two prime numbers of adequate size. In this case we have generated two prime numbers of 256 bits each and we have verified their primality.
p = 62829 48472 00557 61013 33297 33663 58267 27705 82457 48782 00223 43981 8431944253 36099 07.p = 62829 48472 00557 61013 33297 33663 58267 27705 82457 48782 00223 43981 8431944253 36099 07.
q = 67065 73203 18715 00610 08904 41826 05542 82723 07003 07589 14104 48393 48205 73092 24783 83.q = 67065 73203 18715 00610 08904 41826 05542 82723 07003 07589 14104 48393 48205 73092 24783 83.
A continuación se determinan los valores de n yphi(n):The values of n yphi (n) are determined below:
n = 42137 05385 93582 46537 63075 08503 22022 56011 20970 30565 27299 67417 46746 43033 53103 77287 89217 79492 11878 92507 98771 92539 93307 28683 09293 0048627779 55060 33000 16214 0381.n = 42137 05385 93582 46537 63075 08503 22022 56011 20970 30565 27299 67417 46746 43033 53103 77287 89217 79492 11878 92507 98771 92539 93307 28683 09293 0048627779 55060 33000 16214 0381.
phi(n) = 42137 05385 93582 46537 63075 08503 22022 56011 20970 30565 27299 67417 46746 43033 53103 75988 94001 04299 39262 69085 97017 02901 83202 99788 4872929342 99855 79735 07826 70605 2092.phi (n) = 42137 05385 93582 46537 63075 08503 22022 56011 20970 30565 27299 67417 46746 43033 53103 75988 94001 04299 39262 69085 97017 02901 83202 99788 4872929342 99855 79735 07826 70605 2092.
Posteriormente se determina el exponente de descifrado del criptosistema:Subsequently, the cryptosystem decryption exponent is determined:
d = 28091 36923 95721 64358 42050 05668 81348 37340 80646 87043 51533 11611 64497 62022 35402 50659 29334 02866 26175 12723 98011 35267 88801 99858 99152 86228 66570 53156 7188447070 1395,d = 28091 36923 95721 64358 42050 05668 81348 37340 80646 87043 51533 11611 64497 62022 35402 50659 29334 02866 26175 12723 98011 35267 88801 99858 99152 86228 66570 53156 7188447070 1395,
que, como se puede apreciar, tiene un tamaño parecido al de n. De hecho, el número de bits de n es [log2(n)] + 1 = 511, mientras que el de ¿/es [log2(¿t)] + 1 = 510.which, as you can see, has a size similar to that of n. In fact, the number of bits of n is [log 2 (n)] + 1 = 511, while that of ¿/ is [log 2 (¿t)] + 1 = 510.
Así pues, la clave pública la forman los números (n, e), mientras que la privada está constituida por d. Caso (2): e es un número primo mayor que 3, por ejemplo e = 65537 = 216 + 1.Thus, the public key is formed by the numbers (n, e), while the private one consists of d. Case (2): e is a prime number greater than 3, for example e = 65537 = 2 16 + 1.
Para este caso, como uno de los números primos puede elegirse de forma arbitraria, seleccionamos el primer número primo como uno de los empleados en el caso anterior, es decir,For this case, as one of the prime numbers can be chosen arbitrarily, we select the first prime number as one of the employees in the previous case, that is,
p = 62829 48472 00557 61013 33297 33663 58267 27705 82457 48782 00223 43981 8431944253 36099 07.p = 62829 48472 00557 61013 33297 33663 58267 27705 82457 48782 00223 43981 8431944253 36099 07.
Para elegir el otro número primo, sólo debemos asegurarnos de que cumple la condición señalada anteriormente, es decir,To choose the other prime number, we just have to make sure that it meets the condition outlined above, that is,
q = (p mod 65537) / (( ? mod 65537) - 1) (mod 65537).q = (p mod 65537) / ((? mod 65537) - 1) (mod 65537).
Por tanto, se busca un número primo con la condiciónTherefore, a prime number with the condition is searched
q = ((p mod 65537) / ((p mod 65537) - 1)) (mod 65537) + k 65537,q = ((p mod 65537) / ((p mod 65537) - 1)) (mod 65537) + k 65537,
para determinado k, de modo que el tamaño de q sea de 256 bits, aproximadamente, y se analiza su primalidad. Hecho esto, se obtiene el número primofor certain k, so that the size of q is approximately 256 bits, and its primality is analyzed. Done this, you get the prime number
q = 10923 11765 92649 32989 67586 26626 91602 34811 37968 07262 88543 93982 09000 1968448217789,q = 10923 11765 92649 32989 67586 26626 91602 34811 37968 07262 88543 93982 09000 1968448217789,
que corresponde al valorcorresponding to the value
k= 166671005069883165077374043100715662116267098086010733469615k = 166671005069883165077374043100715662116267098086010733469615
7742984397336.7742984397336.
Más tarde se determinan los valores de n yphi(n)Later the values of n yphi (n) are determined
n = 686293854068157357816099439675414869890960980147278833137895 836626083540928757986668300148 104595972683409247692904305241 5005604858988746776424166704035623. phi(ή) = 6862938540681573578160994396754148698909609801472788331 378958366260835409287407806021 688775955049635234 9202638284 856201184194002360366502102755722207928.n = 686293854068157357816099439675414869890960980147278833137895 836626083540928757986668300148 104595972683409247692904305241 5005604858988746776424166704035623. phi (ή) = 6862938540681573578160994396754148698909609801472788331 378958366260835409287407806021 688775955049635234 9202638284 856201184194002360366502102755722207928.
Finalmente se calcula el exponente de descifrado del criptosistema:Finally, the cryptosystem decryption exponent is calculated:
d = 68628 33822 14791 04325 55028 89643 52944 00594 17104 76421 05315 85595 03103 78413 86366 57088 05338 01357 43319 06143 01389 94055 89249 37571 14425 03290 33506 23171 91909 89838 7457.d = 68628 33822 14791 04325 55028 89643 52944 00594 17104 76421 05315 85595 03103 78413 86366 57088 05338 01357 43319 06143 01389 94055 89249 37571 14425 03290 33506 23171 91909 89838 7457.
En este caso se verifica la igualdad de longitud en bits entre n y d, dado que el número de bits de n es [log2(π)] + 1 = 512, y el de es [log2(<f)] + 1 = 512.In this case the equality of length in bits between n and d is verified, since the number of bits of n is [log 2 (π)] + 1 = 512, and that of is [log 2 (<f)] + 1 = 512.
Así pues, la clave pública la forman los números (n, e), mientras que la privada es el número d, cuya longitud es la misma que la de n.Thus, the public key is formed by the numbers (n, e), while the private one is the number d, whose length is the same as that of n.
Caso (3): e no es primo, por ejemplo, e = 15.Case (3): e is not a cousin, for example, e = 15.
En este caso, hemos de generar un número primo p de aproximadamente 256 bits de modo que verifique la siguiente condición:In this case, we have to generate a prime number p of approximately 256 bits so as to verify the following condition:
mcd((/? mod e) ((p mod e) - 1) (mod e), e) = 1.mcd ((/? mod e) ((p mod e) - 1) (mod e), e) = 1.
Tal número puede ser el siguiente:Such number may be as follows:
p = 80542 15650 60482 74761 06106 65103 93174 00647 29016 00204 23661 47659 9103.p = 80542 15650 60482 74761 06106 65103 93174 00647 29016 00204 23661 47659 9103.
A continuación se genera un número primo q verificando las condiciones siguientes:A prime number is generated below, verifying the following conditions:
mcd((<7 mod é) ((q mod é) - 1) (mod e), e) = 1,mcd ((<7 mod é) ((q mod é) - 1) (mod e), e) = 1,
q = (p mod e) / ((p mod e) - 1) (mod e) + k e, para algún k, de modo que su tamaño sea de alrededor de 256 bits:q = (p mod e) / ((p mod e) - 1) (mod e) + k e, for some k, so that its size is around 256 bits:
q = 955421565060482747610610665107493174006412901100204236644765 58089,q = 955421565060482747610610665107493174006412901100204236644765 58089,
que corresponde acorresponding to
k = 636952771005069883165077374043100715662116267098086010733469 6157742984397205k = 636952771005069883165077374043100715662116267098086010733469 6157742984397205
El cómputo de los valores de n yphi( ) proporciona los siguientes valores:The computation of the values of n yphi () provides the following values:
n = 769530499628692511125805701417448426891699714970767103432966 4778486091 805594651791575795828892402485 70241 24094 1380551536 0534160152560877739040218786034167.n = 769530499628692511125805701417448426891699714970767103432966 4778486091 805594651791575795828892402485 70241 24094 1380551536 0534160152560877739040218786034167.
phi(n) = 7695304996286925111258057014174484268916997149707671034 329664778486091 8055944757057444943079274529624901994791 99106 880480404734349340836854307929254116976.phi (n) = 7695304996286925111258057014174484268916997149707671034 329664778486091 8055944757057444943079274529624901994791 99106 880480404734349340836854307929254116976.
Finalmente, el valor de para los datos anteriores se determina fácilmente y es:Finally, the value of for the previous data is easily determined and is:
d = 718228466320113010384085321322951865098919733972715963204102 0459920352351888177325361 528020732289431 65751 95139 1916642178 1711085392718114397354067303842511.d = 718228466320113010384085321322951865098919733972715963204102 0459920352351888177325361 528020732289431 65751 95139 1916642178 1711085392718114397354067303842511.
En este caso, al igual que en los anteriores, la clave pública la forman los números (n, e), mientras que la privada es el número d, cuya longitud en bits es la misma que la de n: [log2(w)] + 1 = 512 = [log2(¿)] + 1. Funcionamiento e implementaciónIn this case, as in the previous ones, the public key is formed by the numbers (n, e), while the private one is the number d, whose length in bits is the same as that of n: [log 2 (w )] + 1 = 512 = [log 2 (¿)] + 1. Operation and implementation
El esquema propuesto para la generación de las claves se ha implementado como unaThe proposed scheme for the generation of the keys has been implemented as a
Notebook del programa informático Maple 8.0 en un ordenador con dos procesadoresMaple 8.0 software notebook on a computer with two processors
PentiumτM-1000 Mhz de Intel, bajo el sistema operativo Windows XP de Microsoft. El tiempo de computación necesario para generar las claves depende de la elección inicial del exponente de cifrado, e, según los tres posibles casos contemplados anteriormente; a saber, (1) e = 3, (2) e es un número primo mayor que 3, y (3) e no es un número primo.Intel Pentiumτ M -1000 Mhz, under Microsoft's Windows XP operating system. The computing time required to generate the keys depends on the initial choice of the encryption exponent, and, according to the three possible cases contemplated above; namely, (1) e = 3, (2) e is a prime number greater than 3, and (3) e is not a prime number.
Para realizar una estimación de los tiempos requeridos en cada uno de los casos anteriores, se ha ejecutado la Notebook implementada para los ejemplos incluidos anteriormente.To make an estimate of the required times in each of the above cases, the Notebook implemented for the examples included above has been executed.
(1) Si e = 3, el tiempo para el cálculo del valor de d es despreciable puesto que el cómputo del inverso módulo n se lleva a cabo en tiempo polinómico (milésimas de segundo para los valores estándar considerados anteriormente). (2) Si e es un número primo mayor que 3, por ejemplo e = 216 + 1 = 65537, la determinación del número primo q, el valor de n y el cómputo de d requiere menos de(1) If e = 3, the time for the calculation of the value of d is negligible since the computation of the inverse module n is carried out in polynomial time (thousandths of a second for the standard values considered above). (2) If e is a prime number greater than 3, for example e = 2 16 + 1 = 65537, the determination of the prime number q, the value of n and the computation of d requires less than
12.3 segundos.12.3 seconds
(3) Si e es un número no primo, por ejemplo, e — 15, el cálculo de los primos p y q, de n y del exponente de descifrado d, requiere menos de 19.8 segundos. Resumiendo, se puede afirmar que el tiempo necesario para el cálculo del exponente de descifrado con el protocolo propuesto en esta invención, no supone apenas incremento en relación al tiempo requerido por los procedimientos estándar para generar los números primos y el módulo RSA.(3) If e is a non-prime number, for example, e-15, the calculation of the primes p and q, of n and the decryption exponent d, requires less than 19.8 seconds. In summary, it can be affirmed that the time necessary for the calculation of the decryption exponent with the protocol proposed in this invention, does not imply an increase in relation to the time required by the standard procedures to generate the prime numbers and the RSA module.
Además, la ejecución que se ha implementado puede considerarse algo lenta puesto que se han utilizado las librerías propias del entorno de Maple 8, que no lleva a cabo la compilación de las órdenes que se ejecutan. Para una optimización de la invención que aquí se propone, sería aconsejable desarrollar una implementación, en software o en hardware, mediante un lenguaje de programación adecuado. Aplicaciones de la invenciónIn addition, the execution that has been implemented can be considered somewhat slow since the libraries of the Maple 8 environment have been used, which does not carry out the compilation of the orders that are executed. For an optimization of the invention proposed here, it would be advisable to develop an implementation, in software or hardware, by means of an appropriate programming language. Applications of the invention
Las aplicaciones de esta invención son todas aquellas en las que se utiliza en criptosistema RSA puesto que hace referencia al proceso de generación de las claves. Entre otras aplicaciones se pueden mencionar las siguientes:The applications of this invention are all those in which it is used in RSA cryptosystem since it refers to the process of key generation. Among other applications the following can be mentioned:
• Firma digital con el criptosistema RSA.• Digital signature with the RSA cryptosystem.
• Todo cifrado en clave pública que utilice el criptosistema RSA como generador de claves.• All public key encryption that uses the RSA cryptosystem as a key generator.
• Criptosistemas que implementen RSA basados en el grupo definido por una curva elíptica.• Cryptosystems that implement RSA based on the group defined by an elliptical curve.
• Generación de números pseudoaleatorios.• Generation of pseudorandom numbers.
Estas aplicaciones tienen gran utilidad en ambientes relacionados con las siguientes actividades:These applications are very useful in environments related to the following activities:
• Autoridades de Certificación• Certification Authorities
• Militar• Military
• Banca• Banking
• Internet • Correo Diplomático • Internet • Diplomatic Mail

Claims

REIVINDICACIONES
1. Procedimiento de encriptación mediante un criptosistema tipo RSA que incluye los siguientes pasos: a) Elección aleatoria de dos números impares grandes p y q como primer y segundo componente de la clave privada. b) Comprobación de la primalidad de tales números. c) Cálculo del módulo RSA, n =p.q, y del ydλox phi(ή) = (p - ϊ)(q - 1). d) Elección del exponente de cifrado 1 < e <phi(rí). e) Comprobación de la coprimalidad entre e
Figure imgf000020_0001
mcd(e, phi(nj) = 1. f) Cálculo del exponente de descifrado d, verificando e d = 1 (mod phi(n)). g) Publicación de la clave pública (n, e). caracterizado porque los números primos p y q se eligen de forma que se verifiquen las siguientes condiciones: mcd((p mod e) ((p mod e) - 1) mod e, é) = 1, mcd((g mod e) ((q mod e) - 1) mod e, ) = 1, q = ((p mod e) / ((p mod é) - 1)) (mod e).
1. Encryption procedure using an RSA type cryptosystem that includes the following steps: a) Random choice of two large odd numbers p and q as the first and second component of the private key. b) Verification of the primality of such numbers. c) Calculation of the RSA module, n = pq, and ydλox phi (ή) = (p - ϊ) (q - 1). d) Choice of encryption exponent 1 <e <phi (rí). e) Verification of coprimacy between e
Figure imgf000020_0001
mcd (e, phi (nj) = 1. f) Calculation of the decryption exponent d, checking e d = 1 (mod phi (n)). g) Publication of the public key (n, e). characterized in that the prime numbers pyq are chosen so that the following conditions are verified: mcd ((p mod e) ((p mod e) - 1) mod e, é) = 1, mcd ((g mod e) ((q mod e) - 1) mod e,) = 1, q = ((p mod e) / ((p mod é) - 1)) (mod e).
2. Procedimiento de encriptación mediante un criptosistema tipo RSA según la reivindicación 1, caracterizado porque cuando e = 3 se verifican las siguientes condiciones: p (mod e) = 2 y q (mod é) = 2 por lo que no existen restricciones a la hora de seleccionar ? y q.2. Encryption procedure by means of an RSA type cryptosystem according to claim 1, characterized in that when e = 3 the following conditions are verified: p (mod e) = 2 and q (mod é) = 2 so there are no time restrictions to select? and q.
3. Procedimiento de encriptación mediante un criptosistema tipo RSA según la reivindicación 1, caracterizado porque cuando e es un número primo mayor que 3 y uno de los números primos, /?, se elige de forma arbitraria, el otro número primo, q, debe verificar la condición: q = ((p mod é) I ((p mod ) - 1)) (mod é)3. Encryption method by means of an RSA type cryptosystem according to claim 1, characterized in that when e is a prime number greater than 3 and one of the prime numbers, / ?, is chosen arbitrarily, the other prime number, q, must check the condition: q = ((p mod é) I ((p mod) - 1)) (mod é)
4. Procedimiento de encriptación mediante un criptosistema tipo RSA según la reivindicación 1, caracterizado porque cuando e no es primo, los números p y q se eligen de forma que se verifiquen las siguientes condiciones: mcd(( ? mod e) ((p mod e) - 1) (mod e), é) = 1, mcd((¿ mod é) - ((q mod é) - 1) (mod e), e) = 1, q = ((p mod e) / ((p mod e) - 1)) (mod e)4. Encryption method by means of an RSA type cryptosystem according to claim 1, characterized in that when e is not a cousin, the numbers p and q are chosen so that the following conditions are verified: mcd ((? Mod e) ((p mod e ) - 1) (mod e), é) = 1, mcd ((¿mod é) - ((q mod é) - 1) (mod e), e) = 1, q = ((p mod e) / ((p mod e) - 1)) (mod e)
5. Procedimiento de encriptación mediante un criptosistema tipo RSA según las reivindicaciones 1-4, caracterizado porque el algoritmo para su ejecución se implementa como un programa informático.5. Encryption procedure by means of an RSA type cryptosystem according to claims 1-4, characterized in that the algorithm for its execution is implemented as a computer program.
6. Dispositivo para generar claves de encriptación mediante un criptosistema RSA constituido por un sistema electrónico que implementa en hardware o software un algoritmo para la ejecución del procedimiento según las reivindicaciones 1-5.6. Device for generating encryption keys by means of an RSA cryptosystem consisting of an electronic system that implements in hardware or software an algorithm for the execution of the procedure according to claims 1-5.
7. Dispositivo de almacenamiento de datos utilizable para generar claves de encriptación mediante un criptosistema RSA, caracterizado porque implementa un algoritmo para la ejecución del procedimiento según las reivindicaciones 1-5. 7. Data storage device that can be used to generate encryption keys by means of an RSA cryptosystem, characterized in that it implements an algorithm for the execution of the method according to claims 1-5.
PCT/ES2004/070007 2003-02-14 2004-02-10 Encryption method and device using an rsa-type cryptosystem WO2004073253A2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
ES200300366A ES2217959B1 (en) 2003-02-14 2003-02-14 PROCEDURE AND ENCRYPTION DEVICE THROUGH AN RSA TYPE CRYPTOSYSTEM.
ESP200300366 2003-02-14

Publications (2)

Publication Number Publication Date
WO2004073253A2 true WO2004073253A2 (en) 2004-08-26
WO2004073253A3 WO2004073253A3 (en) 2008-10-23

Family

ID=32865137

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/ES2004/070007 WO2004073253A2 (en) 2003-02-14 2004-02-10 Encryption method and device using an rsa-type cryptosystem

Country Status (2)

Country Link
ES (1) ES2217959B1 (en)
WO (1) WO2004073253A2 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4351982A (en) * 1980-12-15 1982-09-28 Racal-Milgo, Inc. RSA Public-key data encryption system having large random prime number generating microprocessor or the like
EP0356127A2 (en) * 1988-08-24 1990-02-28 Algorithmic Research Ltd. A RSA computation method for efficient batch processing
GB2331898A (en) * 1997-12-01 1999-06-02 Hewlett Packard Co Fair escrow cryptosystem
US6237021B1 (en) * 1998-09-25 2001-05-22 Complex Data Technologies, Inc. Method and apparatus for the efficient processing of data-intensive applications
US6374329B1 (en) * 1996-02-20 2002-04-16 Intergraph Corporation High-availability super server

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4351982A (en) * 1980-12-15 1982-09-28 Racal-Milgo, Inc. RSA Public-key data encryption system having large random prime number generating microprocessor or the like
EP0356127A2 (en) * 1988-08-24 1990-02-28 Algorithmic Research Ltd. A RSA computation method for efficient batch processing
US6374329B1 (en) * 1996-02-20 2002-04-16 Intergraph Corporation High-availability super server
GB2331898A (en) * 1997-12-01 1999-06-02 Hewlett Packard Co Fair escrow cryptosystem
US6237021B1 (en) * 1998-09-25 2001-05-22 Complex Data Technologies, Inc. Method and apparatus for the efficient processing of data-intensive applications

Also Published As

Publication number Publication date
ES2217959B1 (en) 2006-02-01
ES2217959A1 (en) 2004-11-01
WO2004073253A3 (en) 2008-10-23

Similar Documents

Publication Publication Date Title
CA2235359C (en) Implicit certificate scheme with ca chaining
EP1815635B9 (en) Custom static diffie-hellman groups
Kaliski The mathematics of the rsa public-key cryptosystem
Sharma et al. RSA algorithm using modified subset sum cryptosystem
Khan et al. Analysis of asymmetric cryptography in information security based on computational study to ensure confidentiality during information exchange
WO2005099150A2 (en) Public key cryptographic methods and systems
Singh et al. Data security using RSA algorithm in cloud computing
JP2004297578A (en) Public key generator, shared key generator, key exchange device, and key exchange method
JP3854226B2 (en) Method and apparatus for key pair determination and RSA key generation
KR100396740B1 (en) Provably secure public key encryption scheme based on computational diffie-hellman assumption
Dubey et al. Cryptanalytic attacks and countermeasures on RSA
CN111865555A (en) Homomorphic encryption method based on k-Lin hypothesis
Al-Kaabi et al. Methods toward enhancing RSA algorithm: a survey
Khatoon et al. Performance Evaluation of RSA Algorithm in Cloud Computing Security
ES2217959B1 (en) PROCEDURE AND ENCRYPTION DEVICE THROUGH AN RSA TYPE CRYPTOSYSTEM.
JP4563037B2 (en) ENCRYPTION APPARATUS, DECRYPTION APPARATUS, ENCRYPTION SYSTEM HAVING THEM, ENCRYPTION METHOD, AND DECRYPTION METHOD
CA2752750A1 (en) System and method for performing exponentiation in a cryptographic system
Kumar et al. Exploration and Implementation of RSA-KEM Algorithm
Lone et al. Common attacks on RSA and its variants with possible countermeasures
Upadhyay Attack on RSA cryptosystem
Yang et al. On the authentication of certificateless RSA public key
CN109688103A (en) The auditable encryption storage method of one kind and system
JP2005165290A5 (en)
JP2011128281A (en) Cipher system by public key encryption method using a plurality of knapsacks, key generating device, encrypting device, decrypting device, data exchange method, and program
Encinas et al. Analysis of the efficiency of the Chor–Rivest cryptosystem implementation in a safe-parameter range

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A2

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BW BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE EG ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NA NI NO NZ OM PG PH PL PT RO RU SC SD SE SG SK SL SY TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A2

Designated state(s): BW GH GM KE LS MW MZ SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IT LU MC NL PT RO SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
NENP Non-entry into the national phase in:

Ref country code: DE

122 Ep: pct application non-entry in european phase