mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-01 03:23:09 +03:00
give correct answers to jael scrys on fake ships
This commit is contained in:
parent
4da3b71e33
commit
b6d4783660
@ -334,15 +334,6 @@
|
||||
:: fake keys are deterministically derived from the ship
|
||||
::
|
||||
=/ cub (pit:nu:crub:crypto 512 our)
|
||||
:: save our parent signature (only for moons)
|
||||
::
|
||||
:: XX move logic to zuse
|
||||
::
|
||||
=. sig.own.pki
|
||||
?. ?=(%earl (clan:title our))
|
||||
~
|
||||
=/ yig (pit:nu:crub:crypto 512 (^sein:title our))
|
||||
[~ (sign:as:yig (shaf %earl (sham our 1 pub:ex:cub)))]
|
||||
:: our initial public key
|
||||
::
|
||||
=. pos.zim.pki
|
||||
@ -974,6 +965,18 @@
|
||||
=/ pos (~(get by pos.zim.pki.lex) u.who)
|
||||
?~ pos ~
|
||||
``[%atom !>(rift.u.pos)]
|
||||
::
|
||||
%vein
|
||||
?. ?=([@ ~] tyl) [~ ~]
|
||||
?. &(?=(%& -.why) =(p.why our))
|
||||
[~ ~]
|
||||
=/ lyf (slaw %ud i.tyl)
|
||||
?~ lyf [~ ~]
|
||||
::
|
||||
?~ r=(~(get by jaw.own.pki.lex) u.lyf)
|
||||
[~ ~]
|
||||
::
|
||||
[~ ~ %noun !>(u.r)]
|
||||
::
|
||||
%deed
|
||||
?. ?=([@ @ ~] tyl) [~ ~]
|
||||
@ -983,8 +986,13 @@
|
||||
=/ lyf (slaw %ud i.t.tyl)
|
||||
?~ who [~ ~]
|
||||
?~ lyf [~ ~]
|
||||
=/ rac (clan:title u.who)
|
||||
::
|
||||
?: fak.own.pki.lex
|
||||
=/ cub (pit:nu:crub:crypto 512 u.who)
|
||||
:^ ~ ~ %noun
|
||||
!> `deed:ames`[1 pub:ex:cub ~]
|
||||
::
|
||||
=/ rac (clan:title u.who)
|
||||
?: ?=(%pawn rac)
|
||||
?. =(u.who p.why)
|
||||
[~ ~]
|
||||
@ -997,19 +1005,6 @@
|
||||
!> ^- deed:ames
|
||||
[1 pub:ex:cub `sig]
|
||||
::
|
||||
?: ?=(%earl rac)
|
||||
?. =(u.who p.why)
|
||||
[~ ~]
|
||||
?: (gth u.lyf lyf.own.pki.lex)
|
||||
~
|
||||
?: (lth u.lyf lyf.own.pki.lex)
|
||||
[~ ~]
|
||||
=/ sec (~(got by jaw.own.pki.lex) u.lyf)
|
||||
=/ cub (nol:nu:crub:crypto sec)
|
||||
:^ ~ ~ %noun
|
||||
!> ^- deed:ames
|
||||
[u.lyf pub:ex:cub sig.own.pki.lex]
|
||||
::
|
||||
=/ pub (~(get by pos.zim.pki.lex) u.who)
|
||||
?~ pub
|
||||
~
|
||||
|
Loading…
Reference in New Issue
Block a user