mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-13 08:38:43 +03:00
Jetted en and ex
You'll note that ex involves more endianness twiddling. This is unfortunate, but en is exactly as stupid as you'd hope it would be, so I'm going to call it okay. Also, fixed ex. In particular, (ex:aesc 0) now agrees with the C's output. Our bad.
This commit is contained in:
parent
73bbeb9544
commit
dc5ea5a556
@ -4228,7 +4228,7 @@
|
||||
|% :: user-facing arms
|
||||
++ be :: block cipher
|
||||
~/ %be
|
||||
|= [a=? b=@ c=@H]
|
||||
|= [a=? b=@ c=@H] ^- @uxH
|
||||
~| %be-aesc
|
||||
=> %= .
|
||||
+
|
||||
@ -4275,10 +4275,10 @@
|
||||
=> .(e (sark e (ankh d nnr b)))
|
||||
(rep 5 e)
|
||||
++ en :: AES block en
|
||||
:: ~/ %en
|
||||
|=([a=@I b=@H] (be & (ex a) b))
|
||||
~/ %en
|
||||
|=([a=@I b=@H] ^-(@uxH (be & (ex a) b)))
|
||||
++ ex :: key expand
|
||||
:: ~/ %ex
|
||||
~/ %ex
|
||||
|= a=@I ^- @
|
||||
=+ [b=a c=0 d=su:fort i=nnk]
|
||||
|-
|
||||
@ -4293,11 +4293,11 @@
|
||||
.(c (sube c d))
|
||||
.
|
||||
=> .(c (mix c (cut 5 [(sub i nnk) 1] b)))
|
||||
=> .(b (cat 5 b c))
|
||||
=> .(b (can 5 [i b] [1 c] ~))
|
||||
$(i +(i))
|
||||
++ in :: AES block de
|
||||
:: ~/ %in
|
||||
|=([a=@I b=@H] (be | (ix (ex a)) b))
|
||||
|=([a=@I b=@H] ^-(@uxH (be | (ix (ex a)) b)))
|
||||
++ ix :: key expand, inv
|
||||
:: ~/ %ix
|
||||
|= a=@ ^- @
|
||||
|
Loading…
Reference in New Issue
Block a user