mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-14 08:34:25 +03:00
add ++ob, next-gen ++un
This commit is contained in:
parent
ec47d82c76
commit
3ca426745f
@ -4189,6 +4189,77 @@
|
||||
df4d.225e.2d56.7fd6.1395.a3f8.c582
|
||||
(cut 3 [a 1] b)
|
||||
--
|
||||
::
|
||||
++ ob
|
||||
|%
|
||||
++ feen :: conceal structure v2
|
||||
|= pyn=@ ^- @
|
||||
?: &((gte pyn 0x1.0000) (lte pyn 0xffff.ffff))
|
||||
(add 0x1.0000 (fice (sub pyn 0x1.0000)))
|
||||
?: &((gte pyn 0x1.0000.0000) (lte pyn 0xffff.ffff.ffff.ffff))
|
||||
=+ lo=(dis pyn 0xffff.ffff)
|
||||
=+ hi=(dis pyn 0xffff.ffff.0000.0000)
|
||||
%+ con hi
|
||||
(add 0x1.0000 (fice (sub lo 0x1.0000)))
|
||||
pyn
|
||||
::
|
||||
++ fend :: restore structure v2
|
||||
|= cry=@ ^- @
|
||||
?: &((gte cry 0x1.0000) (lte cry 0xffff.ffff))
|
||||
(add 0x1.0000 (teil (sub cry 0x1.0000)))
|
||||
?: &((gte cry 0x1.0000.0000) (lte cry 0xffff.ffff.ffff.ffff))
|
||||
=+ lo=(dis cry 0xffff.ffff)
|
||||
=+ hi=(dis cry 0xffff.ffff.0000.0000)
|
||||
%+ con hi
|
||||
(add 0x1.0000 (teil (sub lo 0x1.0000)))
|
||||
cry
|
||||
::
|
||||
++ fice :: adapted from
|
||||
|= nor=@ :: black and rogaway
|
||||
^- @ :: "ciphers with
|
||||
=+ ^= sel :: arbitrary finite
|
||||
%+ rynd 2 :: domains", 2002
|
||||
%+ rynd 1
|
||||
%+ rynd 0
|
||||
[(mod nor 65.535) (div nor 65.535)]
|
||||
(add (mul 65.535 -.sel) +.sel)
|
||||
::
|
||||
++ teil :: reverse ++fice
|
||||
|= vip=@
|
||||
^- @
|
||||
=+ ^= sel
|
||||
%+ rund 0
|
||||
%+ rund 1
|
||||
%+ rund 2
|
||||
[(mod vip 65.535) (div vip 65.535)]
|
||||
(add (mul 65.535 -.sel) +.sel)
|
||||
::
|
||||
++ rynd :: feistel round
|
||||
|= [n=@ l=@ r=@]
|
||||
^- [@ @]
|
||||
:- r
|
||||
?~ (mod n 2)
|
||||
(~(sum fo 65.535) l (en:aesc (snag n raku) r))
|
||||
(~(sum fo 65.536) l (en:aesc (snag n raku) r))
|
||||
::
|
||||
++ rund :: reverse round
|
||||
|= [n=@ l=@ r=@]
|
||||
^- [@ @]
|
||||
:- r
|
||||
?~ (mod n 2)
|
||||
(~(dif fo 65.535) l (en:aesc (snag n raku) r))
|
||||
(~(dif fo 65.536) l (en:aesc (snag n raku) r))
|
||||
::
|
||||
++ raku
|
||||
^- (list ,@ux)
|
||||
:~ 0x15f6.25e3.083a.eb3e.7a55.d4db.fb99.32a3.
|
||||
43af.2750.219e.8a24.e5f8.fac3.6c36.f968
|
||||
0xf2ff.24fe.54d0.1abd.4b2a.d8aa.4402.8e88.
|
||||
e82f.19ec.948d.b1bb.ed2e.f791.83a3.8133
|
||||
0xa3d8.6a7b.400e.9e91.187d.91a7.6942.f34a.
|
||||
6f5f.ab8e.88b9.c089.b2dc.95a6.aed5.e3a4
|
||||
==
|
||||
--
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
:: section 2eO, virtualization ::
|
||||
::
|
||||
|
Loading…
Reference in New Issue
Block a user