Differences

This shows you the differences between two versions of the page.

Link to this comparison view

isc:labs:02 [2024/03/03 12:58]
vlad_iulius.nastase [03 [15p] Is this even OTP?]
isc:labs:02 [2024/03/03 13:03] (current)
vlad_iulius.nastase [05 [20p] We want Jokes instead of Nukes]
Line 153: Line 153:
  
  ​{{:​isc:​labs:​isc-lab02-secret.zip|This file (compressed as .zip)}} was encrypted using the following code. Can you decrypt it?  ​{{:​isc:​labs:​isc-lab02-secret.zip|This file (compressed as .zip)}} was encrypted using the following code. Can you decrypt it?
-<​code>​+<​code ​python>
 from Crypto.Cipher import AES from Crypto.Cipher import AES
 from Crypto import Random from Crypto import Random
Line 190: Line 190:
  
 <​solution -hidden> <​solution -hidden>
-<​code>​+<​code ​python>
  
 from Crypto.Cipher import AES from Crypto.Cipher import AES
Line 230: Line 230:
 </​code>​ </​code>​
   * **Note**: the result is a decimal number, you need to convert it to an ASCII text using the snippet below:   * **Note**: the result is a decimal number, you need to convert it to an ASCII text using the snippet below:
-    <​code>​+    <​code ​python>
 print(hex(message)[2:​].decode("​hex"​)) ​ # python 2 print(hex(message)[2:​].decode("​hex"​)) ​ # python 2
 print(bytearray.fromhex(hex(message)[2:​])) ​ # python 3 print(bytearray.fromhex(hex(message)[2:​])) ​ # python 3
Line 239: Line 239:
  
 <​solution -hidden> <​solution -hidden>
-<​code>​+<​code ​python>
  
 import gmpy2 import gmpy2
Line 265: Line 265:
  
 <​solution -hidden> <​solution -hidden>
-<​code>​+<​code ​python>
  
 # Key = 1e: i_guess_it_kinda_is_otp # Key = 1e: i_guess_it_kinda_is_otp
Line 307: Line 307:
  
 <​solution -hidden> <​solution -hidden>
-<​code>​+<​code ​python>
  
 original_iv = bytes.fromhex('​7ec00bc6fd663984c1b6c6fd95ceeef1'​) original_iv = bytes.fromhex('​7ec00bc6fd663984c1b6c6fd95ceeef1'​)
isc/labs/02.1709463512.txt.gz ยท Last modified: 2024/03/03 12:58 by vlad_iulius.nastase
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0