Check-in [d25d483cd5]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Prepare change of ihave ids: Need to be signed
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d25d483cd5978813a6a2c65724b8fa1d46a2af86
User & Date: bernd 2020-07-22 21:01:34
Context
2020-07-28
21:19
Install n2o-completion.sh check-in: 21c66096d7 user: bernd tags: trunk
2020-07-22
21:01
Prepare change of ihave ids: Need to be signed check-in: d25d483cd5 user: bernd tags: trunk
2020-07-16
20:48
Snap connectors check-in: 1874972023 user: bernd tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to crypt.fs.

641
642
643
644
645
646
647



648
649
650
651
652
653
654
    2dup c:hash + >r >date r> quick-verify-sig ;
: pk-date? ( addr u -- addr u' flag ) \ check only the date
    dup sigpksize# u< IF  sig-unsigned  EXIT  THEN
    check-date ;
: pk2-sig? ( addr u -- addr u' flag )
    dup sigpk2size# u< IF  sig-unsigned  EXIT  THEN
    2dup sigpk2size# - + >r c:0key 2dup sigsize# - c:hash r> date-sig? ;



: sig-params ( -- sksig sk pk )
    my-key? ?dup-IF
	>o ke-sksig sec@ drop ke-sk sec@ drop ke-pk $@ drop o>  EXIT
    THEN  !!FIXME!! ( old version ) sksig skc pkc ;
: pk@ ( -- pk u )
    my-key? .ke-pk $@ ;
: sk@ ( -- sk u )







>
>
>







641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
    2dup c:hash + >r >date r> quick-verify-sig ;
: pk-date? ( addr u -- addr u' flag ) \ check only the date
    dup sigpksize# u< IF  sig-unsigned  EXIT  THEN
    check-date ;
: pk2-sig? ( addr u -- addr u' flag )
    dup sigpk2size# u< IF  sig-unsigned  EXIT  THEN
    2dup sigpk2size# - + >r c:0key 2dup sigsize# - c:hash r> date-sig? ;
: pk2-date? ( addr u -- addr u' flag )
    dup sigpk2size# u< IF  sig-unsigned  EXIT  THEN
    check-date ;
: sig-params ( -- sksig sk pk )
    my-key? ?dup-IF
	>o ke-sksig sec@ drop ke-sk sec@ drop ke-pk $@ drop o>  EXIT
    THEN  !!FIXME!! ( old version ) sksig skc pkc ;
: pk@ ( -- pk u )
    my-key? .ke-pk $@ ;
: sk@ ( -- sk u )

Changes to ip.fs.

38
39
40
41
42
43
44

45
46

47
48
49
50
51
52
53
54

\ convention:
\ '!' is a key revocation, it contains the new key
\ Tags are kept sorted, so you'll get revocations first, then net2o and IPv6+4
\ Symbolic name may start with '@'+len followed by the name

Variable host$


: get-host$ ( -- )

    pad $100 gethostname drop pad cstring>sstring host$ $! ;
: skip.site ( -- )
    host$ $@ s" .site" string-suffix? IF
	host$ dup $@len 5 - 5 $del
    THEN ;
: replace-host ( -- )
    config:orighost$ $@ host$ $@ str=
    config:host$ $@len 0> and  IF







>


>
|







38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

\ convention:
\ '!' is a key revocation, it contains the new key
\ Tags are kept sorted, so you'll get revocations first, then net2o and IPv6+4
\ Symbolic name may start with '@'+len followed by the name

Variable host$
$40 Constant max-host# \ maximum allowed size of a hostname is 63 characters

: get-host$ ( -- )
    max-host# host$ $!len
    host$ $@ gethostname drop host$ $@ drop cstring>sstring host$ $!len drop ;
: skip.site ( -- )
    host$ $@ s" .site" string-suffix? IF
	host$ dup $@len 5 - 5 $del
    THEN ;
: replace-host ( -- )
    config:orighost$ $@ host$ $@ str=
    config:host$ $@len 0> and  IF

Changes to keys.fs.

734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
}scope

key-entry-table $save

' context-table is gen-table

: key:nest-sig ( addr u -- addr u' flag )
    pk2-sig? dup ?EXIT drop
    2dup addnick-owndht
    2dup + sigsize# - sigsize# >$
    sigpk2size# - 2dup + keysize2 key?new n:>o $> ke-selfsig $!
    sim-nick! off c-state off sig-ok ;
' key:nest-sig key-entry to nest-sig

key-entry-table @ sample-key .token-table !







|







734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
}scope

key-entry-table $save

' context-table is gen-table

: key:nest-sig ( addr u -- addr u' flag )
    no-ed-check? IF  pk2-date?  ELSE  pk2-sig?  THEN  dup ?EXIT drop
    2dup addnick-owndht
    2dup + sigsize# - sigsize# >$
    sigpk2size# - 2dup + keysize2 key?new n:>o $> ke-selfsig $!
    sim-nick! off c-state off sig-ok ;
' key:nest-sig key-entry to nest-sig

key-entry-table @ sample-key .token-table !

Changes to msg.fs.

366
367
368
369
370
371
372






373
374
375
376
377
378
379
...
989
990
991
992
993
994
995

996
997
998
999
1000
1001
1002
: .ihaves ( -- )
    ." ====== hash owend by ======" cr
    have# [: dup $@ 85type ." :"
	cell+ $@ bounds U+DO
	    space I $@ .@host.id
	cell +LOOP cr ;] #map ;







: msg:ihave ( id u1 hash u2 -- )
    fetch( ." ihave:" 2over .@host.id 2dup bounds U+DO
    forth:cr I keysize 85type keysize +LOOP forth:cr )
    2over 2over >mehave ihave[] $[]+!
    bounds U+DO  2dup I keysize have# #!ins[]  keysize +LOOP  2drop ;
: >ihave ( hash u -- )
    0 .pk.host 2over  msg:ihave  2drop ( >send-have ) ;
................................................................................
    parent .wait-task @ ?query-task over select event> ;
+net2o: msg-last? ( start end n -- ) \g query messages time start:end, n subqueries
    64>n msg:last? ;
+net2o: msg-last ( $:[tick0,msgs,..tickn] n -- ) \g query result
    64>n msg:last ;
+net2o: msg-want ( $:[hash0,...,hashn] -- ) \g request objects
    $> msg:want ;

+net2o: msg-ihave ( $:[hash0,...,hashn] $:[id] -- ) \g show what objects you have
    $> $> msg:ihave enqueue ;

net2o' nestsig net2o: msg-nestsig ( $:cmd+sig -- ) \g check sig+nest
    $> nest-sig ?dup-0=-IF
	handle-msg
    ELSE  replay-mode @ IF  drop  ELSE  !!sig!!  THEN







>
>
>
>
>
>







 







>







366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
...
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
: .ihaves ( -- )
    ." ====== hash owend by ======" cr
    have# [: dup $@ 85type ." :"
	cell+ $@ bounds U+DO
	    space I $@ .@host.id
	cell +LOOP cr ;] #map ;

: check-ihave ( sig u1 hash u2 -- sig u1 hash u2 )
    c:0key 2dup c:hash 2over  dup sigpksize# u< IF  sig-unsigned !!sig!!  THEN
    2dup sigpksize# - 2dup c:hash + date-sig? !!sig!! 2drop ;
: gen-ihave ( hash u1 -- sig u2 )
    c:0key c:hash host$ $@ 2dup c:hash [: type .pk .sig ;] $tmp ;

: msg:ihave ( id u1 hash u2 -- )
    fetch( ." ihave:" 2over .@host.id 2dup bounds U+DO
    forth:cr I keysize 85type keysize +LOOP forth:cr )
    2over 2over >mehave ihave[] $[]+!
    bounds U+DO  2dup I keysize have# #!ins[]  keysize +LOOP  2drop ;
: >ihave ( hash u -- )
    0 .pk.host 2over  msg:ihave  2drop ( >send-have ) ;
................................................................................
    parent .wait-task @ ?query-task over select event> ;
+net2o: msg-last? ( start end n -- ) \g query messages time start:end, n subqueries
    64>n msg:last? ;
+net2o: msg-last ( $:[tick0,msgs,..tickn] n -- ) \g query result
    64>n msg:last ;
+net2o: msg-want ( $:[hash0,...,hashn] -- ) \g request objects
    $> msg:want ;
\ ID should be <host><pksig> instead of <pk><host>
+net2o: msg-ihave ( $:[hash0,...,hashn] $:[id] -- ) \g show what objects you have
    $> $> msg:ihave enqueue ;

net2o' nestsig net2o: msg-nestsig ( $:cmd+sig -- ) \g check sig+nest
    $> nest-sig ?dup-0=-IF
	handle-msg
    ELSE  replay-mode @ IF  drop  ELSE  !!sig!!  THEN

Changes to wiki/videoconference.md.

14
15
16
17
18
19
20


21
22
23
24
25
26
27
* Push to talk, hotkeys for everything
* Hotkey for cut mark + keyframe
* Local recording with higher res/audio quality for presenter
* Allow multiple devices (cameras, mics) for one participant (Akira Kurosawa
  setup), no own audio in backchannel
  - Bonus points if multiple participants in the same room can be identified
    (e.g. send a short chirp out, and check for it in other audio streams)


* Templates for nice presentation recording
* Set a logo for the talk
* Have a countdown clock for talk slots
* Share slides directly (slides in Markdown)
* Subtitles as option for slides (possibly multiple languages)
* Translated audio tracks to select from (for bigger conferences)
* Rooms for small-group side conversation







>
>







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
* Push to talk, hotkeys for everything
* Hotkey for cut mark + keyframe
* Local recording with higher res/audio quality for presenter
* Allow multiple devices (cameras, mics) for one participant (Akira Kurosawa
  setup), no own audio in backchannel
  - Bonus points if multiple participants in the same room can be identified
    (e.g. send a short chirp out, and check for it in other audio streams)
  - room microphone mode — device does not receive audio or video, and can
    send audio only in push-to-talk mode.
* Templates for nice presentation recording
* Set a logo for the talk
* Have a countdown clock for talk slots
* Share slides directly (slides in Markdown)
* Subtitles as option for slides (possibly multiple languages)
* Translated audio tracks to select from (for bigger conferences)
* Rooms for small-group side conversation