Merge pull request #1598 from urbit/philip/jael-fake

Give correct answers to jael scrys on fake ships
This commit is contained in:
Jared Tobin 2019-08-12 11:08:43 -04:00 committed by GitHub
commit f0b38e748a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 25 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:15ce852981f8d6cd1079192db72f468228fe894819cf427da34fd4768052699b
size 12325161
oid sha256:2a7be485bbece9d4a4624a8267d2e969bed2a2923b4b67f0ed6423cd71d49373
size 13474032

View File

@ -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
~