36c3 presentation update

parent 85b09d6e
......@@ -271,7 +271,8 @@ Sema id-sema
nest[ sec-cookie, ]nest ;
+net2o: qr-challenge ( $:challenge $:respose -- )
\ !!FIXME!! the qr-challenge should include pubkey+sig into the hash
$> $> c:0key qr-key $8 >keyed-hash qr-hash $40 c:hash@
$> $> c:0key ." challenge: " 2dup 85type space
qr-key $8 2dup 85type forth:cr >keyed-hash qr-hash $40 c:hash@
qr-hash over $10 umax str= dup invit:qr# and ulit, <invite-result>
\ challenge will fail if less than 16 bytes
IF msg( ." challenge accepted" forth:cr )
......
This diff is collapsed.
doc/qr-code-inv.png

11.7 KB | W: | H:

doc/qr-code-inv.png

4.89 KB | W: | H:

doc/qr-code-inv.png
doc/qr-code-inv.png
doc/qr-code-inv.png
doc/qr-code-inv.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -1352,7 +1352,7 @@ event: :>qr-invitation { task w^ pk -- }
: scanned-ownkey { d: pk -- }
pk scanned-key-in
<event up@ elit, pk $10 + $make elit, :>qr-invitation ?query-task event>
false ;
true ;
\ the idea of scan an own key is to send a invitation,
\ and receive a signature that proofs the scanned device
\ has access to the secret key
......
......@@ -127,7 +127,7 @@ $FFFFFFFF ,
\ generate checksum and tag bits
: >qr-key ( addr u -- ) qr-key keysize move-rep ;
: rng>qr-key ( -- ) $8 rng$ >qr-key ;
: rng>qr-key ( -- ) $8 rng$ >qr-key qr( qr-key 8 xtype cr ) ;
: date>qr-key ( -- ) sigdate $8 >qr-key ;
: taghash-rest ( addr1 u1 addrchallenge u2 tag -- tag ) >r
c:0key $8 umin qrecc $8 smove r@ qrecc $8 + c!
......@@ -137,7 +137,8 @@ $FFFFFFFF ,
qr-key $8 rot taghash-rest ;
: taghash? ( addr u1 ecc u2 tag -- flag )
>r 2tuck over $8 >qr-key
r> taghash-rest drop 8 /string qrecc 8 + 8 str= ;
r> taghash-rest drop 8 /string qrecc 8 + 8 str=
qr( dup IF ." ecc= " qrecc $10 xtype cr THEN ) ;
: >ecc ( addr u tag -- ) >taghash
qr( ." ecc: " qrecc $10 xtype cr )
keyqr [ keyqr# #03 * #4 + ]L + qrecc >keyhline drop
......
......@@ -92,7 +92,8 @@ require minos2/gl-helper.fs
qr-key $8 rot taghash-rest ;
: taghash? ( addr u1 ecc u2 tag -- flag )
>r 2tuck over $8 >qr-key
r> taghash-rest drop 8 /string qrecc 8 + 8 str= ;
r> taghash-rest drop 8 /string qrecc 8 + 8 str=
qr( dup IF ." ecc= " qrecc $10 xtype cr THEN ) ;
[THEN]
\ scan matrix manipulation
......@@ -550,8 +551,7 @@ previous
ekey? IF ekey dup k-volup = swap bl = or IF save-pngs THEN THEN ;
: scan-loop ( -- )
1 level# +!@ >r
BEGIN scan-once >looper
level# @ r@ <= scanned? scan-once? and or UNTIL
BEGIN scan-once >looper level# @ r@ <= UNTIL
rdrop ;
: scan-qr ( -- )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment