
Cryptopals
文章平均质量分 54
Yu4nzi
知其然,更应知其所以然
展开
-
Cryptopals_set1_challenge6_Break repeating-key XOR
Break repeating-key XORThere's a file here. It's been base64'd after being encrypted with repeating-key XOR.Decrypt it.Here's how:1. Let KEYSIZE be the guessed length of the key; try values from 2 to (say) 40.2. Write a function to compute the edit原创 2021-03-13 21:16:26 · 387 阅读 · 0 评论 -
Cryptopals_set1_challenge5_Implement repeating-key XOR
Implement repeating-key XORHere is the opening stanza of an important work of the English language:Burning 'em, if you ain't quick and nimbleI go crazy when I hear a cymbalEncrypt it, under the key "ICE", using repeating-key XOR.In repeating-key XOR原创 2021-03-10 20:08:18 · 188 阅读 · 0 评论 -
Cryptopals_set1_challenge4_Detect single-character XOR
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.)关于这个,我的想法是读取文件,并将其每行字符串进行challenge3中的操作,最终选择得分最高的的字符串。对此,我只需要在challenge3的基础上修改一下下就行,但不知为何始终出不来原创 2021-03-10 20:04:13 · 221 阅读 · 0 评论 -
Cryptopals_set1_challenge2_Fixed XOR
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:686原创 2021-03-08 21:24:40 · 231 阅读 · 0 评论 -
Cryptopals_set1_challenge3_Single-byte XOR cipher
Single-byte XOR cipherstring:1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736descript:... 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原创 2021-03-08 21:19:10 · 403 阅读 · 0 评论 -
Cryptopals_set1_challenge1_Convert hex to base64
Convert hex to base64string:49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6dshould produce:SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG9pc29ub3VzIG11c2hyb29tdescript:So go ahead and make that happen. Yo原创 2021-03-08 21:11:56 · 172 阅读 · 0 评论