コード例 #1
0
	def testChallenge12(self):
		self.assertEqual(guessOracleBlockSize(encryptAESECBWithFixedSuffix)[0], 16)
		self.assertEqual(True, isECBEncrypted(encryptAESECBWithFixedSuffix(bytes(100))))
		suffix = guessSuffix(encryptAESECBWithFixedSuffix)
		self.assertIn('The girlies on standby waving just to say hi', toAscii(suffix))
コード例 #2
0
def decryptUserProfile(data):
	profileString = pkcs7Unpadding(AES.new(UNKNOWN_AES_KEY).decrypt(data))
	return parseKeyValue(toAscii(profileString))