Commit 6b8646a9 authored by Luc Libralesso's avatar Luc Libralesso
Browse files

add step by step midori128 testing

parent a6759aad
#!/usr/bin/ruby
require 'minitest/autorun'
require_relative "../../cryptosystems/midori128/midori128.rb"
class TestMidori128 < Minitest::Unit::TestCase
def test_add_key()
# create DAG
dag = Midori128_Dag.new()
# # simulate behavior
output = dag.simulate_behavior(
[
[0x51,0xe7,0xec,0xbc],
[0x08,0x3a,0x87,0x29],
[0x4c,0x5c,0xd7,0x75],
[0xe6,0xa2,0xba,0x43]
],
[
[0x68,0x3c,0x5b,0x3e],
[0x7d,0x85,0x10,0x2a],
[0xed,0xb3,0x09,0x8c],
[0x3b,0xf3,0x86,0xbf]
]
)
assert_equal(output, [
0x1e, 0xdf, 0x18, 0xe4,
0x0a, 0xf7, 0x01, 0xaf,
0xc4, 0x1b, 0xb7, 0xc8,
0xfd, 0x4c, 0x3e, 0x3d
])
end
end
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment