You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
property gostCorrect64 key m = gostDecrypt64( key, gostEncrypt64(key, m)) == m
Somewhat surprisingly, Cryptol is able to :check gostCorrect successfully, but :check gostCorrect64 fails:
$ ~/Software/cryptol-3.2.0/bin/cryptol Primitive/Symmetric/Cipher/Block/GOST.cry
┏━╸┏━┓╻ ╻┏━┓╺┳╸┏━┓╻
┃ ┣┳┛┗┳┛┣━┛ ┃ ┃ ┃┃
┗━╸╹┗╸ ╹ ╹ ╹ ┗━┛┗━╸
version 3.2.0 (1bcb75c)
https://cryptol.net :? for help
Loading module Cryptol
Loading module Primitive::Symmetric::Cipher::Block::GOST
Primitive::Symmetric::Cipher::Block::GOST> :check gostCorrect
Using random testing.
Passed 100 tests.
Expected test coverage: 0.00% (100 of 2^^320 values)
Primitive::Symmetric::Cipher::Block::GOST> :check gostCorrect64
Using random testing.
Counterexample
gostCorrect64 0x9a360787e10534d8 0x557b24e838302254 = False
I believe the reason why this is the case is because gostDecrypt64 and gostEncrypt64 (on top of which gostCorrect64 is defined) swaps the order of the arguments:
Primitive::Symmetric::Cipher::Block::GOST
currently contains two property definitions:cryptol-specs/Primitive/Symmetric/Cipher/Block/GOST.cry
Line 116 in dd86f27
cryptol-specs/Primitive/Symmetric/Cipher/Block/GOST.cry
Line 130 in dd86f27
Somewhat surprisingly, Cryptol is able to
:check gostCorrect
successfully, but:check gostCorrect64
fails:I believe the reason why this is the case is because
gostDecrypt64
andgostEncrypt64
(on top of whichgostCorrect64
is defined) swaps the order of the arguments:cryptol-specs/Primitive/Symmetric/Cipher/Block/GOST.cry
Lines 119 to 127 in dd86f27
I believe that these should actually be:
If I apply that change, then
:check gostCorrect64
passes. Can someone confirm if this is the right fix?The text was updated successfully, but these errors were encountered: