mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-16 02:22:12 +03:00
Merge pull request #756 from urbit/fix-zuse-crub-overflow
tail-call optimizes +ctra, +ctrb, and +ctrc in |aes
This commit is contained in:
commit
1dd61041eb
@ -1967,11 +1967,14 @@
|
||||
%+ mix txt
|
||||
%^ rsh 3 (sub (mul 16 blocks) len)
|
||||
%+ rep 7
|
||||
%- flop
|
||||
|- ^- (list @ux)
|
||||
?: =(blocks 0) ~
|
||||
:- (encrypt ctr)
|
||||
$(ctr (inc mod ctr), blocks (dec blocks))
|
||||
=| seed=(list @ux)
|
||||
|- ^+ seed
|
||||
?: =(blocks 0) seed
|
||||
%= $
|
||||
seed [(encrypt ctr) seed]
|
||||
ctr (inc mod ctr)
|
||||
blocks (dec blocks)
|
||||
==
|
||||
:: :: ++de:ctra:aes:crypto
|
||||
++ de :: decrypt
|
||||
en
|
||||
@ -1991,11 +1994,14 @@
|
||||
%+ mix txt
|
||||
%^ rsh 3 (sub (mul 16 blocks) len)
|
||||
%+ rep 7
|
||||
%- flop
|
||||
|- ^- (list @ux)
|
||||
?: =(blocks 0) ~
|
||||
:- (encrypt ctr)
|
||||
$(ctr (inc mod ctr), blocks (dec blocks))
|
||||
=| seed=(list @ux)
|
||||
|- ^+ seed
|
||||
?: =(blocks 0) seed
|
||||
%= $
|
||||
seed [(encrypt ctr) seed]
|
||||
ctr (inc mod ctr)
|
||||
blocks (dec blocks)
|
||||
==
|
||||
:: :: ++de:ctrb:aes:crypto
|
||||
++ de :: decrypt
|
||||
en
|
||||
@ -2015,11 +2021,14 @@
|
||||
%+ mix txt
|
||||
%^ rsh 3 (sub (mul 16 blocks) len)
|
||||
%+ rep 7
|
||||
%- flop
|
||||
|- ^- (list @ux)
|
||||
?: =(blocks 0) ~
|
||||
:- (encrypt ctr)
|
||||
$(ctr (inc mod ctr), blocks (dec blocks))
|
||||
=| seed=(list @ux)
|
||||
|- ^+ seed
|
||||
?: =(blocks 0) seed
|
||||
%= $
|
||||
seed [(encrypt ctr) seed]
|
||||
ctr (inc mod ctr)
|
||||
blocks (dec blocks)
|
||||
==
|
||||
:: :: ++de:ctrc:aes:crypto
|
||||
++ de :: decrypt
|
||||
en
|
||||
|
Loading…
Reference in New Issue
Block a user