문제풀이/cryptopals 5

[파이썬] cryptopals 1-5 문제풀이 (Implement repeating-key XOR)

주소 http://cryptopals.com/sets/1/challenges/5/ 문제Implement repeating-key XORHere is the opening stanza of an important work of the English language:Burning 'em, if you ain't quick and nimble I go crazy when I hear a cymbalEncrypt it, under the key "ICE", using repeating-key XOR.In repeating-key XOR, you'll sequentially apply each byte of the key; the first byte of plaintext will be XOR'd against ..

[파이썬] cryptopals 1-4 문제풀이 (Detect single-character XOR)

주소 http://cryptopals.com/sets/1/challenges/4/ 문제Detect single-character XOROne of the 60-character strings in this file has been encrypted by single-character XOR. Find it. (Your code from #3 should help.)[출처] [파이썬] cryptopals 1-4 문제풀이 (Detect single-character XOR)|작성자 설퐁 해석이번엔 여러문장을 xor브루트포싱해서 정상적인 한문장을 고르는겁니다! 1-3코드를 가져와서 약간 수정해서 사용합니다. 알파벳만 골라냈더니 잘 안나옵니다. 공백도 추가합니다. 코드123456789101112131415161..

[파이썬] cryptopals 1-3 문제풀이 (Single-byte XOR cipher)

주소 http://cryptopals.com/sets/1/challenges/3/ 문제Single-byte XOR cipherThe hex encoded string:1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736... has been XOR'd against a single character. Find the key, decrypt the message.You can do this by hand. But don't: write code to do it for you.How? Devise some method for "scoring" a piece of English plaintext. Character frequency is a..

[파이썬] cryptopals 1-2 문제풀이 (Fixed XOR)

주소 http://cryptopals.com/sets/1/challenges/2/ 문제Fixed XORWrite a function that takes two equal-length buffers and produces their XOR combination. If your function works properly, then when you feed it the string:1c0111001f010100061a024b53535009181c... after hex decoding, and when XOR'd against:686974207468652062756c6c277320657965... should produce:746865206b696420646f6e277420706c6179[출처] [파이썬] c..

[파이썬] cryptopals 1-1 문제풀이 (Convert hex to base64)

주소 http://cryptopals.com/sets/1/challenges/1/ 문제Convert hex to base64The string:49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6dShould produce:SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG9pc29ub3VzIG11c2hyb29tSo go ahead and make that happen. You'll need to use this code for the rest of the exercises. [출처] [파이썬] cryptopals 1-1 문제풀이 (Convert hex to ba..