Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Luc Libralesso
cryptodag
Commits
6b8646a9
Commit
6b8646a9
authored
Dec 24, 2020
by
Luc Libralesso
Browse files
add step by step midori128 testing
parent
a6759aad
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/cryptosystems/midori128stepbystep.rb
0 → 100644
View file @
6b8646a9
#!/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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment