class CryptoToolchain::Tools::CtrBitflipAttack
Attributes
target[R]
Public Class Methods
new(target: CryptoToolchain::BlackBoxes::CtrBitflipTarget.new)
click to toggle source
# File lib/crypto_toolchain/tools/ctr_bitflip_attack.rb, line 5 def initialize(target: CryptoToolchain::BlackBoxes::CtrBitflipTarget.new) @target = target end
Public Instance Methods
execute()
click to toggle source
# File lib/crypto_toolchain/tools/ctr_bitflip_attack.rb, line 9 def execute easy = ":admin<true:" #only need to flip the last bit of bytes at indices 32, 38, 43 crypted = target.encrypt(easy) crypted. flip(7, byte_index: 32). flip(7, byte_index: 38). flip(7, byte_index: 43) end