Scheme • 伺服器能幫我們解密訊息 • 如果解密出來的訊息 Padding 錯誤會噴錯 def unpad(data): if not all([x == data[-1] for x in data[-data[-1]:]]): raise ValueError return data[:-data[-1]] def oracle(cipher): aes = AES.new(KEY, AES.MODE_CBC) try: plain = unpad(aes.decrypt(cipher)) except ValueError: return False return True