check.bend checks
raw source on the hub · import bend-osdev-aria@0.1.0.0/check.bend as Check
ARIA: RFC 5794's three vectors, both ways (the ciphertext, then the plaintext decrypted back), and ARIA-128 through cbc's CBC over 32 KB both ways.
6 imports
import Base import bend-osdev-bytes@0.1.1.0/bytes.bend as B import bend-osdev-mode-core@0.1.0.0/mode_core.bend as M import bend-osdev-cbc@0.1.0.0/cbc.bend as CB import bend-osdev-cipher-core@0.1.0.0/cipher_core.bend as L import ./aria.bend as A
Definitions
def b128.of source · line 11 · raw
@m:Maybe<&2, 0x999adc34209a88c2495b3a5407a5ad25/mode_core.CmBlock> -> 0x999adc34209a88c2495b3a5407a5ad25/mode_core.CmBlock
def b128 source · line 18 · raw
@o:0xe0217e1ab38629fddf738452c1f2a82e/bytes.Octets -> 0x999adc34209a88c2495b3a5407a5ad25/mode_core.CmBlock
def aria_key source · line 32 · raw
@k:0xe0217e1ab38629fddf738452c1f2a82e/bytes.Octets -> 0x95803fe526050e79fb3df1e14165eb7c/aria.LcAriaKey
def aria source · line 35 · raw
@k:0xe0217e1ab38629fddf738452c1f2a82e/bytes.Octets -> @b:0xe0217e1ab38629fddf738452c1f2a82e/bytes.Octets -> String
def big.go source · line 39 · raw
@n:Nat -> @+i:U32 -> @acc:List<&2, U32> -> List<&2, U32>
n bytes, byte i = 7i + 3 (mod 256)
def big source · line 46 · raw
@n:Nat -> 0xe0217e1ab38629fddf738452c1f2a82e/bytes.Octets
def iv16 source · line 49 · raw
0xe0217e1ab38629fddf738452c1f2a82e/bytes.Octets
def last16 source · line 52 · raw
@r:Result<&2, &2, 0x999adc34209a88c2495b3a5407a5ad25/mode_core.CmError, 0xe0217e1ab38629fddf738452c1f2a82e/bytes.Octets> -> String
def verdict source · line 59 · raw
@b:Bool -> String
def same source · line 66 · raw
@r:Result<&2, &2, 0x999adc34209a88c2495b3a5407a5ad25/mode_core.CmError, 0xe0217e1ab38629fddf738452c1f2a82e/bytes.Octets> -> @+m:0xe0217e1ab38629fddf738452c1f2a82e/bytes.Octets -> String
def aria_cbc source · line 78 · raw
@k:0xe0217e1ab38629fddf738452c1f2a82e/bytes.Octets -> @n:Nat -> String
def main source · line 82 · raw
IO(Unit)
BEGIN GENERATED by gen/vectors.py: check
Templates
template key source · line 21 · raw
@-K:Data -> @r:Result<&2, &2, 0x5c26418ab13c9e565c5b1309d2f085a0/cipher_core.LcError, K> -> @d:K -> K
template both source · line 28 · raw
@-K:Data -> @-enc:(@_:K -> @_:0x999adc34209a88c2495b3a5407a5ad25/mode_core.CmBlock -> 0x999adc34209a88c2495b3a5407a5ad25/mode_core.CmBlock) -> @-dec:(@_:K -> @_:0x999adc34209a88c2495b3a5407a5ad25/mode_core.CmBlock -> 0x999adc34209a88c2495b3a5407a5ad25/mode_core.CmBlock) -> @+k:K -> @b:0x999adc34209a88c2495b3a5407a5ad25/mode_core.CmBlock -> String
template cbc128 source · line 73 · raw
@-K:Data -> @-enc:(@_:K -> @_:0x999adc34209a88c2495b3a5407a5ad25/mode_core.CmBlock -> 0x999adc34209a88c2495b3a5407a5ad25/mode_core.CmBlock) -> @-dec:(@_:K -> @_:0x999adc34209a88c2495b3a5407a5ad25/mode_core.CmBlock -> 0x999adc34209a88c2495b3a5407a5ad25/mode_core.CmBlock) -> @+k:K -> @n:Nat -> String