<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
>
<channel xml:lang="fr">
<title>Root Me : plateforme d'apprentissage d&#233;di&#233;e au Hacking et &#224; la S&#233;curit&#233; de l'Information</title>
<link>https://www.root-me.org/</link>
<description>Root Me est une plateforme permettant &#224; chacun de tester et d'am&#233;liorer ses connaissances dans le domaine de la s&#233;curit&#233; informatique et du hacking &#224; travers la publication de challenges, de solutions, d'articles.</description>
<language>fr</language>
<generator>SPIP - www.spip.net</generator>
<image>
<title>Root Me : plateforme d'apprentissage d&#233;di&#233;e au Hacking et &#224; la S&#233;curit&#233; de l'Information</title>
<url>https://www.root-me.org/local/cache-vignettes/L144xH144/siteon0-9a1b1.svg?1757799377</url>
<link>https://www.root-me.org/</link>
<height>144</height>
<width>144</width>
</image>
<item xml:lang="es">
<title>NTRU | Multiple Transmission</title>
<link>https://www.root-me.org/es/Desafios/Criptoanalisis/NTRU-Multiple-Transmission</link>
<guid isPermaLink="true">https://www.root-me.org/es/Desafios/Criptoanalisis/NTRU-Multiple-Transmission</guid>
<dc:date>2024-12-13T15:00:56Z</dc:date>
<dc:format>text/html</dc:format>
<dc:language>es</dc:language>
<dc:creator>
Vozec
</dc:creator>
<dc:subject>Difficile</dc:subject>
<description>
&lt;p&gt;Te haces con un m&#243;vil y est&#225;s seguro de que uno de los contactos tiene un secreto bien guardado.&lt;br class=&#034;autobr&#034; /&gt;
El problema es que est&#225; encriptando sus mensajes, que considera importantes. &lt;strong&gt;P&#237;dele la bandera&lt;/strong&gt; y descifra, parece que ha cometido un error de implementaci&#243;n...&lt;/p&gt;
&lt;div class=&#034;info&#034;&gt;
&lt;strong&gt;Fuentes para descargar&lt;/strong&gt;&#160;: &lt;a href=&#034;https://static.root-me.org/cryptanalyse/ch72/ch72.zip&#034; class=&#034;spip_url spip_out auto&#034; rel=&#034;nofollow external&#034;&gt;https://static.root-me.org/cryptanalyse/ch72/ch72.zip&lt;/a&gt;
&lt;/div&gt;&lt;h5&gt;Param&#232;tres de connexion au challenge&lt;/h5&gt; &lt;table class=&#034;txs mauto&#034; style=&#034;width: 100%&#034;&gt; &lt;tbody&gt; &lt;tr class=&#034;row_even&#034;&gt;&lt;td&gt;H&#244;te&lt;/td&gt;&lt;td&gt;challenge01.root-me.org&lt;/td&gt;&lt;/tr&gt; &lt;tr class=&#034;row_odd&#034;&gt;&lt;td&gt;Protocole&lt;/td&gt;&lt;td&gt;TCP&lt;/td&gt;&lt;/tr&gt; &lt;tr class=&#034;row_even&#034;&gt;&lt;td&gt;Port&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;br/&gt;
-
&lt;a href="https://www.root-me.org/es/Desafios/Criptoanalisis/" rel="directory"&gt;Criptoan&#225;lisis&lt;/a&gt;
</description>
</item>
<item xml:lang="es">
<title>NTRU | Weak Parameter</title>
<link>https://www.root-me.org/es/Desafios/Criptoanalisis/NTRU-Weak-Parameter</link>
<guid isPermaLink="true">https://www.root-me.org/es/Desafios/Criptoanalisis/NTRU-Weak-Parameter</guid>
<dc:date>2024-12-13T15:00:37Z</dc:date>
<dc:format>text/html</dc:format>
<dc:language>es</dc:language>
<dc:creator>
Vozec
</dc:creator>
<dc:subject>Difficile</dc:subject>
<description>
&lt;p&gt;Una vez m&#225;s, est&#225;s accediendo a un servicio de mensajer&#237;a segura, &#161;y uno de tus contactos tiene un secreto para que le &lt;strong&gt;preguntes&lt;/strong&gt;&#160;! Los mensajes importantes est&#225;n encriptados, pero parece que los par&#225;metros del criptosistema han sido... mal elegidos.&lt;br class=&#034;autobr&#034; /&gt;
Explota esta mala configuraci&#243;n para descifrar el secreto.&lt;/p&gt;
&lt;div class=&#034;info&#034;&gt;
&lt;strong&gt;Fuentes para descargar&lt;/strong&gt;&#160;: &lt;a href=&#034;https://static.root-me.org/cryptanalyse/ch71/ch71.zip&#034; class=&#034;spip_url spip_out auto&#034; rel=&#034;nofollow external&#034;&gt;https://static.root-me.org/cryptanalyse/ch71/ch71.zip&lt;/a&gt;
&lt;/div&gt;&lt;h5&gt;Param&#232;tres de connexion au challenge&lt;/h5&gt; &lt;table class=&#034;txs mauto&#034; style=&#034;width: 100%&#034;&gt; &lt;tbody&gt; &lt;tr class=&#034;row_even&#034;&gt;&lt;td&gt;H&#244;te&lt;/td&gt;&lt;td&gt;challenge01.root-me.org&lt;/td&gt;&lt;/tr&gt; &lt;tr class=&#034;row_odd&#034;&gt;&lt;td&gt;Protocole&lt;/td&gt;&lt;td&gt;TCP&lt;/td&gt;&lt;/tr&gt; &lt;tr class=&#034;row_even&#034;&gt;&lt;td&gt;Port&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;br/&gt;
-
&lt;a href="https://www.root-me.org/es/Desafios/Criptoanalisis/" rel="directory"&gt;Criptoan&#225;lisis&lt;/a&gt;
</description>
</item>
<item xml:lang="es">
<title>Goldreich Goldwasser Halevi | Weak Parameter</title>
<link>https://www.root-me.org/es/Desafios/Criptoanalisis/Goldreich-Goldwasser-Halevi-Weak-Parameter</link>
<guid isPermaLink="true">https://www.root-me.org/es/Desafios/Criptoanalisis/Goldreich-Goldwasser-Halevi-Weak-Parameter</guid>
<dc:date>2024-12-13T15:00:29Z</dc:date>
<dc:format>text/html</dc:format>
<dc:language>es</dc:language>
<dc:creator>
Vozec
</dc:creator>
<dc:subject>Difficile</dc:subject>
<description>
&lt;p&gt;Oyes elogios sobre un cifrado que revolucionar&#225; la criptograf&#237;a. Tu colega habla incluso de resistencia a los ordenadores cu&#225;nticos.&lt;br class=&#034;autobr&#034; /&gt;
Demu&#233;strale que, detr&#225;s de todas esas palabras ingeniosas, sigue habiendo fallos en su aplicaci&#243;n.&lt;/p&gt;
-
&lt;a href="https://www.root-me.org/es/Desafios/Criptoanalisis/" rel="directory"&gt;Criptoan&#225;lisis&lt;/a&gt;
</description>
</item>
<item xml:lang="es">
<title>ElGamal - Fault attack (Introduction)</title>
<link>https://www.root-me.org/es/Desafios/Criptoanalisis/ElGamal-Fault-attack-Introduction</link>
<guid isPermaLink="true">https://www.root-me.org/es/Desafios/Criptoanalisis/ElGamal-Fault-attack-Introduction</guid>
<dc:date>2024-12-13T15:00:21Z</dc:date>
<dc:format>text/html</dc:format>
<dc:language>es</dc:language>
<dc:creator>
Vozec
</dc:creator>
<dc:subject>Moyen</dc:subject>
<description>
&lt;p&gt;Te encuentras ante un criptosistema ElGamal con posibilidad de simular inyecci&#243;n de fallos en el proceso de descifrado.&lt;br class=&#034;autobr&#034; /&gt;
Explota esta vulnerabilidad para recuperar los &lt;i&gt;256&lt;/i&gt; bits de la clave privada.&lt;br class=&#034;autobr&#034; /&gt;
Dispones de &lt;br /&gt;&lt;span class=&#034;spip-puce ltr&#034;&gt;&lt;b&gt;&#8211;&lt;/b&gt;&lt;/span&gt;&#160;un or&#225;culo de cifrado
&lt;br /&gt;&lt;span class=&#034;spip-puce ltr&#034;&gt;&lt;b&gt;&#8211;&lt;/b&gt;&lt;/span&gt;&#160;Un or&#225;culo de descifrado (con o sin fallos)&lt;/p&gt;
&lt;p&gt;He aqu&#237; un extracto del c&#243;digo fuente&#160;:&lt;/p&gt; &lt;textarea readonly='readonly' cols='40' rows='249' class='spip_cadre' dir='ltr'&gt;#!/usr/bin/env python3 # -*- coding: utf-8 -*- # File name : challenge.py # Author : Vozec # Date created : 4 Avril 2023 from sage.rings.finite_rings.integer_mod import square_root_mod_prime from random import randint, randrange from Crypto.Util.number import long_to_bytes,bytes_to_long import os flag = os.getenv('flag', 'RM{fakeflag}') curve = { 'Name':'secp256k1', 'A':0, 'B':7, 'Prime':2^256 - 2^32 - 2^9 - 2^8 - 2^7 - 2^6 - 2^4 - 1, } class ElGamal_ECC(): def __init__(self,bits=256): self.A = curve['A'] self.B = curve['B'] self.p = Zmod(curve['Prime']) self.E = EllipticCurve(self.p,[self.A,self.B]) self.P = self.E.gens()[0] self.a = randrange(self.P.additive_order()) self.Q = self.a * self.P def check_point(self,x,y): return (self.p(y)^2) == (self.p(x)^3 + self.A*self.p(x) + self.B) def msg_to_point(self,m): def compute_y(x): alpha = self.p(x)^3 + self.A*self.p(x) + self.B return square_root_mod_prime(self.p(alpha)) m = len(m).to_bytes(1, byteorder=&#034;big&#034;) + m while True: x = int.from_bytes(m, &#034;big&#034;) y = compute_y(x) if self.check_point(x,y): return self.E(x,y) m += os.urandom(1) def point_to_msg(self,M): def int_length_in_byte(n: int): assert n &gt;= 0 length = 0 while n: n &gt;&gt;= 8 length += 1 return length try: x = int(M[0]) byte_len = int_length_in_byte(x) l = (x &gt;&gt; ((byte_len - 1) * 8)) &amp; 0xff pt = ((x &gt;&gt; ((byte_len - l - 1) * 8)) &amp; (int.from_bytes(b&#034;\xff&#034; * l, &#034;big&#034;))) return pt.to_bytes(l, byteorder=&#034;big&#034;) except: return b'Fail to recover message from provided point' def encrypt(self,M): k = randint(0,curve['Prime'] - 1) c1 = k * self.P c2 = k * self.Q + M return [c1,c2] def decrypt(self,pair,fault=False): def inject_fault(a): # Inject a single bit fault in a random position return a ^^ (1 &lt;&lt; randint(0, int(a).bit_length() - 1)) c1,c2 = pair a = inject_fault(self.a) if fault else self.a M = c2 - a * c1 return M class challenge: def __init__(self): print((''' ______ _ _ ______ _ _____ _ | ____| | | | | ____| |/ ____| | | | |__ __ _ _ _| | |_ _ _ | |__ | | | __ __ _ _ __ ___ __ _| | | __/ _` | | | | | __| | | | | __| | | | |_ |/ _` | '_ ` _ \\ / _` | | | | | (_| | |_| | | |_| |_| | | |____| | |__| | (_| | | | | | | (_| | | |_| \\__,_|\\__,_|_|\\__|\\__, | |______|_|\\_____|\\__,_|_| |_| |_|\\__,_|_| __/ | |___/ '''[1:-1])) print('[+] Initialisation , please wait ...') self.ECC = ElGamal_ECC() def menu(self): print((''' [+] Menu: (1) Encrypt message (2) Decrypt message (3) Decrypt message with a random single bit fault (4) Check the secret key (5) Exit '''[:-1])) while 1: c = input(&#034; $&gt; &#034;) if c in ['1','2','3','4','5']: return int(c) def check(self): key = input(' Key (int): ').strip() if not key.isdigit(): print('\n[-] Invalid Key format ') elif int(key) == self.ECC.a: print(f'\n[+] Here is your flag: {flag}') else: print('\n[-] Invalid Key') print('[*] Quitting ...') exit() def print_curve(self): print(f''' Curve Informations: Name : {curve['Name']} Prime: {curve['Prime']} (A,B): ({curve['A']},{curve['B']}) Curve: {self.ECC.E} ''') def ask_input(self): try: ct = input(' Ciphertext [(x1,y1);(x2,y2)]: ') enc = [tuple([int(_.strip()) for _ in point[1:-1].split(',')]) for point in ct.strip()[1:-1].split(';')] return enc except: print('[-] Invalid Input') return None def main(self): new = True self.print_curve() while 1: choice = self.menu() # (1) Encrypt point if choice == 1: if new: pt = bytes(input(' Plaintext : '),'utf-8') M = self.ECC.msg_to_point(pt) C1,C2 = self.ECC.encrypt(M) print(' Associed Point: \n\tX=%s\n\tY=%s'%(int(M[0]),int(M[1]))) print(' Encrypted: \n\tC1=%s\n\tC2=%s'%(C1[:2],C2[:2])) new = False else: print('[-] You have already encrypted message') # (2) Decrypt point # (3) Decrypt point with a random fault elif choice in [2,3]: enc = self.ask_input() if not enc: break fault = True if choice == 3 else False if not self.ECC.check_point(enc[0][0],enc[0][1]): print(' Invalid Ciphertext ! Point(s) not on the curve.') break if not self.ECC.check_point(enc[1][0],enc[1][1]): print(' Invalid Ciphertext ! Point(s) not on the curve.') break dec = self.ECC.decrypt([ self.ECC.E(enc[0][0],enc[0][1]), self.ECC.E(enc[1][0],enc[1][1]), ],fault=fault) print(' Associed Point: \n\tX=%s\n\tY=%s'%(int(dec[0]),int(dec[1]))) print(' Decrypted: %s'%(self.ECC.point_to_msg(dec))) # (4) Check the secret key elif choice == 4: self.check() # (5) Exit else: exit() def test(): ECC = ElGamal_ECC() m = b'HelloThere :)' M = ECC.msg_to_point(m) c1,c2 = ECC.encrypt(M) assert ECC.check_point(c1.xy()[0], c1.xy()[1]) assert ECC.check_point(c2.xy()[0], c2.xy()[1]) dec = ECC.decrypt([ ECC.E(c1.xy()[0], c1.xy()[1]), ECC.E(c2.xy()[0], c2.xy()[1]), ],fault=False) m_dec = ECC.point_to_msg(dec) assert m == m_dec if __name__ == '__main__': # test() challenge().main()&lt;/textarea&gt;&lt;h5&gt;Param&#232;tres de connexion au challenge&lt;/h5&gt; &lt;table class=&#034;txs mauto&#034; style=&#034;width: 100%&#034;&gt; &lt;tbody&gt; &lt;tr class=&#034;row_even&#034;&gt;&lt;td&gt;H&#244;te&lt;/td&gt;&lt;td&gt;challenge01.root-me.org&lt;/td&gt;&lt;/tr&gt; &lt;tr class=&#034;row_odd&#034;&gt;&lt;td&gt;Protocole&lt;/td&gt;&lt;td&gt;TCP&lt;/td&gt;&lt;/tr&gt; &lt;tr class=&#034;row_even&#034;&gt;&lt;td&gt;Port&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;br/&gt;
-
&lt;a href="https://www.root-me.org/es/Desafios/Criptoanalisis/" rel="directory"&gt;Criptoan&#225;lisis&lt;/a&gt;
</description>
</item>
<item xml:lang="es">
<title>DSA - Implementation error</title>
<link>https://www.root-me.org/es/Desafios/Criptoanalisis/DSA-Implementation-error</link>
<guid isPermaLink="true">https://www.root-me.org/es/Desafios/Criptoanalisis/DSA-Implementation-error</guid>
<dc:date>2024-12-13T15:00:14Z</dc:date>
<dc:format>text/html</dc:format>
<dc:language>es</dc:language>
<dc:creator>
Vozec
</dc:creator>
<dc:subject>Moyen</dc:subject>
<description>
&lt;p&gt;Te han contratado para probar la seguridad criptogr&#225;fica de una implementaci&#243;n del famoso sistema DSA.&lt;br class=&#034;autobr&#034; /&gt;
Ahora te toca a ti.&lt;/p&gt; &lt;textarea readonly='readonly' cols='40' rows='143' class='spip_cadre' dir='ltr'&gt;from Crypto.Util.number import isPrime, getPrime from os import getenv from hashlib import sha1 from random import randint # https://fr.wikipedia.org/wiki/Digital_Signature_Algorithm class DSA: def __init__(self, L=1024, N=256): self.L = L self.N = N self.p, self.q, self.g = self.gen_params() self.x = randint(1, self.q) self.y = pow(self.g, self.x, self.p) def gen_params(self): q = getPrime(self.L) while 1: p = q*2*randint(1, 2**self.N) + 1 if isPrime(p): break while 1: h = randint(1, p-1) g = pow(h, (p-1)//q, p) if g &gt; 1: break return (p, q, g) def H(self, message): return int.from_bytes(sha1(message.encode()).digest(), 'big') def sign(self, message): Hm = self.H(message) while True: s = randint(1, self.q - 1) s1 = pow(self.g, s, self.p) % self.q if s1 == 0: continue s_inv = modinv(s, self.q) s2 = ((Hm + s1 * self.x) * s_inv) % self.q if s2 == 0: continue break return f'{s1}:{s2}' def verify(self, message, signature): try: s1, s2 = map(int,signature.split(':')) Hm = self.H(message) if not (0 &lt; s1 &lt; self.q or 0 &lt; s2 &lt; self.q): return False w = modinv(s2, self.q) u1 = (Hm * w) % self.q u2 = (s1 * w) % self.q v = (pow(self.g, u1, self.p) * pow(self.y, u2, self.p) % self.p) % self.q return v == s1 except: return False def egcd(a, b): if a == 0: return (b, 0, 1) g, y, x = egcd(b%a,a) return (g, x - (b//a) * y, y) def modinv(a, m): g, x, y = egcd(a, m) if g != 1: print('Modular inverse does not exist') return False return x%m def main(): dsa = DSA() target = 'Can I have The Flag please' flag = getenv('FLAG', &#034;RM{REDACTED}&#034;) print(&#034;Here is the public key:&#034;) print(f&#034;\t- p = {dsa.p}&#034;) print(f&#034;\t- q = {dsa.q}&#034;) print(f&#034;\t- g = {dsa.g}&#034;) print(f&#034;\t- y = {dsa.y}&#034;) while True: print(&#034;\nMenu:&#034;) print(&#034;1. Sign a message&#034;) print(&#034;2. Verify a message&#034;) print(&#034;3. Get the flag&#034;) print(&#034;4. Quit&#034;) choice = input(&#034;Choose an option: &#034;) if choice == &#034;1&#034;: message = input(&#034;Enter the message to sign: &#034;).strip() if message == target: print('Forbidden message !') continue print(f&#034;sig = {dsa.sign(message)}&#034;) elif choice == &#034;2&#034;: message = input(&#034;Enter the message to verify: &#034;) signature = input(&#034;Enter the signature associed: &#034;) if dsa.verify(message, signature): print(&#034;The signature is valid.&#034;) else: print(&#034;The signature is invalid.&#034;) elif choice == &#034;3&#034;: signature = input(&#034;Enter the secret signature: &#034;) if dsa.verify(target, signature): print(f&#034;Well played, here is the flag: {flag}&#034;) else: print(&#034;The signature is invalid, get out !&#034;) break elif choice == &#034;4&#034;: print(&#034;Quitting the program.&#034;) break else: print(&#034;Invalid choice. Please select a valid option.&#034;) if __name__ == &#034;__main__&#034;: main()&lt;/textarea&gt;
&lt;h5&gt;Param&#232;tres de connexion au challenge&lt;/h5&gt; &lt;table class=&#034;txs mauto&#034; style=&#034;width: 100%&#034;&gt; &lt;tbody&gt; &lt;tr class=&#034;row_even&#034;&gt;&lt;td&gt;H&#244;te&lt;/td&gt;&lt;td&gt;challenge01.root-me.org&lt;/td&gt;&lt;/tr&gt; &lt;tr class=&#034;row_odd&#034;&gt;&lt;td&gt;Protocole&lt;/td&gt;&lt;td&gt;TCP&lt;/td&gt;&lt;/tr&gt; &lt;tr class=&#034;row_even&#034;&gt;&lt;td&gt;Port&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;br/&gt;
-
&lt;a href="https://www.root-me.org/es/Desafios/Criptoanalisis/" rel="directory"&gt;Criptoan&#225;lisis&lt;/a&gt;
</description>
</item>
<item xml:lang="es">
<title>File - PKZIP 2</title>
<link>https://www.root-me.org/es/Desafios/Criptoanalisis/File-PKZIP-2</link>
<guid isPermaLink="true">https://www.root-me.org/es/Desafios/Criptoanalisis/File-PKZIP-2</guid>
<dc:date>2024-11-08T11:00:37Z</dc:date>
<dc:format>text/html</dc:format>
<dc:language>es</dc:language>
<dc:creator>
kevin.mille
</dc:creator>
<dc:subject>Moyen</dc:subject>
<description>
&lt;p&gt;Mi amigo me envi&#243; su colecci&#243;n de fotos de gatos, pero olvid&#243; enviarme la contrase&#241;a para el archivo ZIP.&lt;br class=&#034;autobr&#034; /&gt;
Recoge las fotos de todos modos, y obtendr&#225;s la bandera como recompensa.&lt;/p&gt;
-
&lt;a href="https://www.root-me.org/es/Desafios/Criptoanalisis/" rel="directory"&gt;Criptoan&#225;lisis&lt;/a&gt;
</description>
</item>
<item xml:lang="es">
<title>AES - ECB - Copy Paste</title>
<link>https://www.root-me.org/es/Desafios/Criptoanalisis/AES-ECB-Copy-Paste</link>
<guid isPermaLink="true">https://www.root-me.org/es/Desafios/Criptoanalisis/AES-ECB-Copy-Paste</guid>
<dc:date>2024-02-05T11:33:24Z</dc:date>
<dc:format>text/html</dc:format>
<dc:language>es</dc:language>
<dc:creator>
Vozec
</dc:creator>
<dc:subject>Moyen</dc:subject>
<description>
&lt;p&gt;Este panel de conexi&#243;n utiliza cifrado AES en modo ECB para generar sus tokens de autenticaci&#243;n. Depende de ti averiguar c&#243;mo eludir este inicio de sesi&#243;n y acceder al secreto del usuario &lt;strong&gt;admin&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;Extracto del c&#243;digo&lt;/i&gt;&lt;/p&gt;
&lt;div class=&#034;coloration_code code&#034;&gt;&lt;div class=&#034;spip_python code&#034;&gt;&lt;div class=&#034;python&#034;&gt;&lt;ol&gt;&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;def&lt;/span&gt; login&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #008000;&#034;&gt;self&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;:&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #dc143c;&#034;&gt;token&lt;/span&gt; &lt;span style=&#034;color: #66cc66;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #008000;&#034;&gt;input&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #483d8b;&#034;&gt;'Token:&lt;span style=&#034;color: #000099; font-weight: bold;&#034;&gt;\n&lt;/span&gt;&gt; '&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&#034;color: black;&#034;&gt;strip&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&#034;color: black;&#034;&gt;encode&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;try&lt;/span&gt;:&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; data &lt;span style=&#034;color: #66cc66;&#034;&gt;=&lt;/span&gt; json.&lt;span style=&#034;color: black;&#034;&gt;loads&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;unpad&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #008000;&#034;&gt;self&lt;/span&gt;.&lt;span style=&#034;color: black;&#034;&gt;aes&lt;/span&gt;.&lt;span style=&#034;color: black;&#034;&gt;decrypt&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;unhexlify&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #dc143c;&#034;&gt;token&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: #66cc66;&#034;&gt;,&lt;/span&gt;&lt;span style=&#034;color: #ff4500;&#034;&gt;16&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&#034;color: black;&#034;&gt;decode&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;if&lt;/span&gt; data&lt;span style=&#034;color: black;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #483d8b;&#034;&gt;'username'&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;not&lt;/span&gt; &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;in&lt;/span&gt; users:&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;return&lt;/span&gt; &lt;span style=&#034;color: #483d8b;&#034;&gt;'[-] Unknow user'&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;if&lt;/span&gt; data&lt;span style=&#034;color: black;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #483d8b;&#034;&gt;'username'&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&#034;color: #66cc66;&#034;&gt;==&lt;/span&gt; &lt;span style=&#034;color: #483d8b;&#034;&gt;&#034;admin&#034;&lt;/span&gt; &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;and&lt;/span&gt; data&lt;span style=&#034;color: black;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #483d8b;&#034;&gt;&#034;isAdmin&#034;&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#93;&lt;/span&gt;:&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;return&lt;/span&gt; &lt;span style=&#034;color: #483d8b;&#034;&gt;'[+] Hello admin , here is your secret : %s'&lt;/span&gt;%flag&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;return&lt;/span&gt; &lt;span style=&#034;color: #483d8b;&#034;&gt;&#034;[+] Hello %s , you don't have any secret in our database&#034;&lt;/span&gt;%data&lt;span style=&#034;color: black;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #483d8b;&#034;&gt;'username'&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;except&lt;/span&gt;:&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;return&lt;/span&gt; &lt;span style=&#034;color: #483d8b;&#034;&gt;'[-] Invalid token !'&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;def&lt;/span&gt; register&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #008000;&#034;&gt;self&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;:&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #dc143c;&#034;&gt;user&lt;/span&gt; &lt;span style=&#034;color: #66cc66;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #008000;&#034;&gt;input&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #483d8b;&#034;&gt;'Username:&lt;span style=&#034;color: #000099; font-weight: bold;&#034;&gt;\n&lt;/span&gt;&gt; '&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&#034;color: black;&#034;&gt;strip&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;if&lt;/span&gt; &lt;span style=&#034;color: #dc143c;&#034;&gt;user&lt;/span&gt; &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;in&lt;/span&gt; users:&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;return&lt;/span&gt; &lt;span style=&#034;color: #483d8b;&#034;&gt;'[-] User already exists'&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; data &lt;span style=&#034;color: #66cc66;&#034;&gt;=&lt;/span&gt; b&lt;span style=&#034;color: #483d8b;&#034;&gt;'{&#034;username&#034;: &#034;%s&#034;, &#034;isAdmin&#034;: false}'&lt;/span&gt; %&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #dc143c;&#034;&gt;user&lt;/span&gt;.&lt;span style=&#034;color: black;&#034;&gt;encode&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #dc143c;&#034;&gt;token&lt;/span&gt; &lt;span style=&#034;color: #66cc66;&#034;&gt;=&lt;/span&gt; hexlify&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #008000;&#034;&gt;self&lt;/span&gt;.&lt;span style=&#034;color: black;&#034;&gt;aes&lt;/span&gt;.&lt;span style=&#034;color: black;&#034;&gt;encrypt&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;pad&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;data&lt;span style=&#034;color: #66cc66;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #ff4500;&#034;&gt;16&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&#034;color: black;&#034;&gt;decode&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; users.&lt;span style=&#034;color: black;&#034;&gt;append&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #dc143c;&#034;&gt;user&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;return&lt;/span&gt; &lt;span style=&#034;color: #483d8b;&#034;&gt;'[+] You can use this token to access your account : %s'&lt;/span&gt; %&lt;span style=&#034;color: #dc143c;&#034;&gt;token&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;p class='download code_download'&gt;&lt;a href='https://www.root-me.org/local/cache-code/00799dc348c374a33737e1da16916850.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;h5&gt;Param&#232;tres de connexion au challenge&lt;/h5&gt; &lt;table class=&#034;txs mauto&#034; style=&#034;width: 100%&#034;&gt; &lt;tbody&gt; &lt;tr class=&#034;row_even&#034;&gt;&lt;td&gt;H&#244;te&lt;/td&gt;&lt;td&gt;challenge01.root-me.org&lt;/td&gt;&lt;/tr&gt; &lt;tr class=&#034;row_odd&#034;&gt;&lt;td&gt;Protocole&lt;/td&gt;&lt;td&gt;TCP&lt;/td&gt;&lt;/tr&gt; &lt;tr class=&#034;row_even&#034;&gt;&lt;td&gt;Port&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;br/&gt;
-
&lt;a href="https://www.root-me.org/es/Desafios/Criptoanalisis/" rel="directory"&gt;Criptoan&#225;lisis&lt;/a&gt;
</description>
</item>
<item xml:lang="es">
<title>Shamir Secret Sharing - Introduction</title>
<link>https://www.root-me.org/es/Desafios/Criptoanalisis/Shamir-Secret-Sharing-Introduction</link>
<guid isPermaLink="true">https://www.root-me.org/es/Desafios/Criptoanalisis/Shamir-Secret-Sharing-Introduction</guid>
<dc:date>2024-02-05T11:33:16Z</dc:date>
<dc:format>text/html</dc:format>
<dc:language>es</dc:language>
<dc:creator>
Vozec
</dc:creator>
<dc:subject>Moyen</dc:subject>
<description>
&lt;p&gt;Te encuentras en posesi&#243;n de pares de n&#250;meros y tu colega, con una mirada, te asegura que tienes todo lo que necesitas para descifrar el mensaje.&lt;/p&gt;
-
&lt;a href="https://www.root-me.org/es/Desafios/Criptoanalisis/" rel="directory"&gt;Criptoan&#225;lisis&lt;/a&gt;
</description>
</item>
<item xml:lang="es">
<title>Shamir Secret Sharing - Irreducible ?</title>
<link>https://www.root-me.org/es/Desafios/Criptoanalisis/Shamir-Secret-Sharing-Irreducible</link>
<guid isPermaLink="true">https://www.root-me.org/es/Desafios/Criptoanalisis/Shamir-Secret-Sharing-Irreducible</guid>
<dc:date>2024-02-05T11:33:08Z</dc:date>
<dc:format>text/html</dc:format>
<dc:language>es</dc:language>
<dc:creator>
Mr7F
</dc:creator>
<dc:subject>Difficile</dc:subject>
<description>
&lt;p&gt;Parece que esta vez el sistema se ha reforzado. Y tu amigo sigue fuera.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;C&#243;digo fuente&lt;/i&gt;&lt;/p&gt;
&lt;div class=&#034;coloration_code code&#034;&gt;&lt;div class=&#034;spip_python code&#034;&gt;&lt;div class=&#034;python&#034;&gt;&lt;ol&gt;&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;import&lt;/span&gt; &lt;span style=&#034;color: #dc143c;&#034;&gt;os&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;import&lt;/span&gt; &lt;span style=&#034;color: #dc143c;&#034;&gt;random&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;from&lt;/span&gt; Crypto.&lt;span style=&#034;color: black;&#034;&gt;Util&lt;/span&gt;.&lt;span style=&#034;color: black;&#034;&gt;number&lt;/span&gt; &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;import&lt;/span&gt; bytes_to_long&lt;span style=&#034;color: #66cc66;&#034;&gt;,&lt;/span&gt; getPrime&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;DEGREE &lt;span style=&#034;color: #66cc66;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #ff4500;&#034;&gt;10&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;BITSIZE &lt;span style=&#034;color: #66cc66;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #ff4500;&#034;&gt;64&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;SECRET &lt;span style=&#034;color: #66cc66;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #008000;&#034;&gt;None&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;def&lt;/span&gt; get_coeff&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;p&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;:&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;while&lt;/span&gt; &lt;span style=&#034;color: #008000;&#034;&gt;True&lt;/span&gt;:&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #808080; font-style: italic;&#034;&gt;# os.urandom is safer than random.randint, nothing fishy here&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; coeff &lt;span style=&#034;color: #66cc66;&#034;&gt;=&lt;/span&gt; bytes_to_long&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #dc143c;&#034;&gt;os&lt;/span&gt;.&lt;span style=&#034;color: black;&#034;&gt;urandom&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;BITSIZE // &lt;span style=&#034;color: #ff4500;&#034;&gt;16&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&#034;color: #008000;&#034;&gt;hex&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&#034;color: black;&#034;&gt;upper&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&#034;color: black;&#034;&gt;encode&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;if&lt;/span&gt; BITSIZE - &lt;span style=&#034;color: #ff4500;&#034;&gt;1&lt;/span&gt; &lt;span style=&#034;color: #66cc66;&#034;&gt;&lt;=&lt;/span&gt; coeff.&lt;span style=&#034;color: black;&#034;&gt;bit_length&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;and&lt;/span&gt; coeff &lt;span style=&#034;color: #66cc66;&#034;&gt;&lt;&lt;/span&gt; p:&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #808080; font-style: italic;&#034;&gt;# if the coefficients are not small LLL won't work, I'm sure&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;return&lt;/span&gt; coeff&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;def&lt;/span&gt; generate_points&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;modulus &lt;span style=&#034;color: #66cc66;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: #ff4500;&#034;&gt;0&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;:&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;global&lt;/span&gt; SECRET&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; coefficients &lt;span style=&#034;color: #66cc66;&#034;&gt;=&lt;/span&gt; &lt;span style=&#034;color: black;&#034;&gt;&amp;#91;&lt;/span&gt;get_coeff&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;modulus&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;for&lt;/span&gt; _ &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;in&lt;/span&gt; &lt;span style=&#034;color: #008000;&#034;&gt;range&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;DEGREE + &lt;span style=&#034;color: #ff4500;&#034;&gt;1&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; SECRET &lt;span style=&#034;color: #66cc66;&#034;&gt;=&lt;/span&gt; coefficients&lt;span style=&#034;color: black;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #ff4500;&#034;&gt;0&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;def&lt;/span&gt; _eval&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;x&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;:&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;return&lt;/span&gt; x&lt;span style=&#034;color: #66cc66;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #008000;&#034;&gt;sum&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;c * x ** d &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;for&lt;/span&gt; d&lt;span style=&#034;color: #66cc66;&#034;&gt;,&lt;/span&gt; c &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;in&lt;/span&gt; &lt;span style=&#034;color: #008000;&#034;&gt;enumerate&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;coefficients&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt; % modulus&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;return&lt;/span&gt; &lt;span style=&#034;color: black;&#034;&gt;&amp;#91;&lt;/span&gt;_eval&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #dc143c;&#034;&gt;random&lt;/span&gt;.&lt;span style=&#034;color: black;&#034;&gt;randint&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #ff4500;&#034;&gt;0&lt;/span&gt;&lt;span style=&#034;color: #66cc66;&#034;&gt;,&lt;/span&gt; modulus - &lt;span style=&#034;color: #ff4500;&#034;&gt;1&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;for&lt;/span&gt; _ &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;in&lt;/span&gt; &lt;span style=&#034;color: #008000;&#034;&gt;range&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;DEGREE + &lt;span style=&#034;color: #ff4500;&#034;&gt;1&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;p &lt;span style=&#034;color: #66cc66;&#034;&gt;=&lt;/span&gt; getPrime&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;BITSIZE&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;points &lt;span style=&#034;color: #66cc66;&#034;&gt;=&lt;/span&gt; generate_points&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;modulus&lt;span style=&#034;color: #66cc66;&#034;&gt;=&lt;/span&gt;p&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;points &lt;span style=&#034;color: #66cc66;&#034;&gt;=&lt;/span&gt; points&lt;span style=&#034;color: black;&#034;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&#034;color: #ff4500;&#034;&gt;1&lt;/span&gt;:&lt;span style=&#034;color: black;&#034;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;print&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #483d8b;&#034;&gt;&#034;One of our friends is gone, is our secret lost ?&#034;&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;print&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #483d8b;&#034;&gt;&#034;p = &#034;&lt;/span&gt;&lt;span style=&#034;color: #66cc66;&#034;&gt;,&lt;/span&gt; p&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;print&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #483d8b;&#034;&gt;&#034;points = &#034;&lt;/span&gt;&lt;span style=&#034;color: #66cc66;&#034;&gt;,&lt;/span&gt; points&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;assert&lt;/span&gt; &lt;span style=&#034;color: #008000;&#034;&gt;int&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #008000;&#034;&gt;input&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #483d8b;&#034;&gt;&#034;What's our secret ? &#034;&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&#034;color: #66cc66;&#034;&gt;==&lt;/span&gt; SECRET&lt;span style=&#034;color: #66cc66;&#034;&gt;,&lt;/span&gt; &lt;span style=&#034;color: #483d8b;&#034;&gt;&#034;We lost it&#034;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt;&lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;with&lt;/span&gt; &lt;span style=&#034;color: #008000;&#034;&gt;open&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #483d8b;&#034;&gt;&#034;.passwd&#034;&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;as&lt;/span&gt; &lt;span style=&#034;color: #008000;&#034;&gt;file&lt;/span&gt;:&lt;/div&gt;&lt;/li&gt;
&lt;li style=&#034;font-weight: normal; vertical-align:top;&#034;&gt;&lt;div style=&#034;&#034;&gt; &lt;span style=&#034;color: #ff7700;font-weight:bold;&#034;&gt;print&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: #008000;&#034;&gt;file&lt;/span&gt;.&lt;span style=&#034;color: black;&#034;&gt;read&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&#034;color: black;&#034;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;p class='download code_download'&gt;&lt;a href='https://www.root-me.org/local/cache-code/02d316d5f96a2c93bf26d1f539cee43e.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;h5&gt;Param&#232;tres de connexion au challenge&lt;/h5&gt; &lt;table class=&#034;txs mauto&#034; style=&#034;width: 100%&#034;&gt; &lt;tbody&gt; &lt;tr class=&#034;row_even&#034;&gt;&lt;td&gt;H&#244;te&lt;/td&gt;&lt;td&gt;challenge01.root-me.org&lt;/td&gt;&lt;/tr&gt; &lt;tr class=&#034;row_odd&#034;&gt;&lt;td&gt;Protocole&lt;/td&gt;&lt;td&gt;TCP&lt;/td&gt;&lt;/tr&gt; &lt;tr class=&#034;row_even&#034;&gt;&lt;td&gt;Port&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;br/&gt;
-
&lt;a href="https://www.root-me.org/es/Desafios/Criptoanalisis/" rel="directory"&gt;Criptoan&#225;lisis&lt;/a&gt;
</description>
</item>
<item xml:lang="es">
<title>Shamir Secret Sharing - Reduction</title>
<link>https://www.root-me.org/es/Desafios/Criptoanalisis/Shamir-Secret-Sharing-Reduction</link>
<guid isPermaLink="true">https://www.root-me.org/es/Desafios/Criptoanalisis/Shamir-Secret-Sharing-Reduction</guid>
<dc:date>2024-02-05T11:33:00Z</dc:date>
<dc:format>text/html</dc:format>
<dc:language>es</dc:language>
<dc:creator>
Vozec
</dc:creator>
<dc:subject>Difficile</dc:subject>
<description>
&lt;p&gt;&#161;Dos amigos han desaparecido y no puedes descifrar el mensaje secreto ! &#161;Usa tus habilidades matem&#225;ticas para encontrar el mensaje !&lt;/p&gt;
-
&lt;a href="https://www.root-me.org/es/Desafios/Criptoanalisis/" rel="directory"&gt;Criptoan&#225;lisis&lt;/a&gt;
</description>
</item>
</channel>
</rss>
