![]() Plain text: CRYPTOGRAPHY Key: CIPHERING Question: Find the Cipher Text using HILL CIPHER and after the Encryption use that Cipher text to find the Plain text and verify it. (E.g., 72dd9b1cd9a06a16582936e1ffc2d047 doesn't seem to be in any md5 reverse lookups and a few forward tests of your string doesn't seem to work either. Find the Cipher Text using HILL CIPHER and after the Encryption use that Cipher text to find the Plain text and verify it. However, this doesn't seem to be the case. Knowing the plaintext and ciphertext for a handful of values gives no information about the cipher used (other than the length of the ciphertext) or key, unless the underlying cipher is very flawed.Īlso, if you are mistaken, they may have used a 128-bit hash function instead of encryption e.g., md5. There's very little extra info to go from, without knowing the secret key but its likely a 128-bit cipher like AES-128.Ī secure cryptographic function should be indistinguishable to any attacker in polynomial time from a purely random function from the perspective of someone who does not have the key. The second one base64-decodes to 16 bytes (128 bits): 72 dd 9b 1c d9 a0 6a 16 58 29 36 e1 ff c2 d0 47 I'm guessing the 62nd symbol (commonly a +) may have been converted to a %20. thanks, I needed to add the following: if ( (plaintext i - 'a' - k)26 < 0)xiphertext i ( (plaintext i -'a' - k + 26) 26) + 'a' Share Follow edited at 22:42 DCR 13. Possibly it is a URL-encoded space as %20 is a space. You can produce one possible plaintext of a great number of possibilities by computing plaintext i ( (ciphertext i-'a'- k) 26) + 'a' Demo. Both appear to be 16 bytes (from the padding) but there seems to be a problem with the first one as it has a % character which is not commonly used in base64. 1 I want to decrypt the cipher text to plaintext as normal when the user will provide key and ciphertext Here's my code: from Crypto.Cipher import DES key input ('Enter your key: ').encode ('utf-8') myDes DES.new (key, DES.MODEECB) print ('Please select option: 1. ![]() Once you have two byte arrays you can XOR each byte with the byte at the same index. That means encoding the plaintext using a character set (likely US-ASCII in this case) and hex decoding the ciphertext. When doing XOR you should perform it on the binary data. The encoding of the ciphertext seems to be base64.īase64 encoding often ends with a double equal sign for padding and uses characters from as well as two extra character, typically + and /, though variants exist. Hex is a representation of bytes for human consumption.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |