Check-in [d38bac7a07]
Not logged in

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

Overview
Comment:create new ID works
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:d38bac7a07d9afc71f0c75f01354ce128f4d2620
User & Date: bernd 2019-01-05 16:29:31
Context
2019-01-06
11:34
Auto-show new id generation if no key is available check-in: 9b227877fc user: bernd tags: trunk
2019-01-05
16:29
create new ID works check-in: d38bac7a07 user: bernd tags: trunk
2019-01-04
23:16
Work on creating a new nick through the GUI check-in: d1e3e9abdf user: bernd tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to gui.fs.

93
94
95
96
97
98
99

100
101
102
103
104
105
106
...
124
125
126
127
128
129
130

131
132
133
134
135
136



137
138
139
140
141
142
143
144
...
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
...
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
...
317
318
319
320
321
322
323

324
325
326
327
328
329
330
331

\ password screen

0 Value pw-err
0 Value pw-num
0 Value phrase-unlock
0 Value create-new-id

0 Value phrase-again
0 Value plus-login
0 Value minus-login
0 Value nick-edit

: err-fade ( r addr -- )
    1e fover [ pi f2* ] Fliteral f* fcos 1e f+ f2/ f-
................................................................................
	o anims[] >stack o>
    LOOP  flag ;

forward show-nicks
forward gui-msgs
0 Value title-vp
0 Value pw-field

0 Value nick-pw

Variable nick$

: nick-done ( max span addr pos -- max span addr pos flag )
    over 3 pick nick$ $!



    pw-field engage 1 to nick-pw  true ;

: clear-edit ( max span addr pos -- max 0 addr 0 true )
    drop nip 0 tuck true ;

: do-shake ( max span addr pos -- max span addr pos flag )
    keys sec[]free
    clear-edit invert
................................................................................
    show-nicks clear-edit ;

: pw-done ( max span addr pos -- max span addr pos flag )
    case nick-pw
	1 of
	    1 +to nick-pw
	    over 3 pick >passphrase +key
	    create-new-id /hflip
	    phrase-again /flop
	    clear-edit invert
	endof
	2 of
	    over 3 pick >passphrase lastkey@ str= IF
		." Create nick " nick$ $. ."  with passphrase (hashed) " lastkey@ 85type cr
		nick$ $@ new-key,
		right-phrase
	    ELSE
		1 to nick-pw
		create-new-id /flop
		phrase-again /hflip
		1 tries# ! do-shake
	    THEN
	endof
	err-fade? IF  false  EXIT  THEN
	over 3 pick >passphrase +key
	read-keys secret-keys# 0= IF
	    \ ." Wrong passphrase" cr
................................................................................
		{{
		    glue*l pw-bg-col# font-size# f2/ f2/ }}frame dup .button3
		    transp# to x-color
		    "f(g" }}text /left 25%b
		    {{
			nt
			white# to x-color \bold
			"nick" }}edit 25%b dup Value nick-field
			glue*lll }}glue \regular
		    }}h bx-tab nick-field ' nick-done edit[]
		}}z box[] blackish
		{{ \large "👤" }}text \normal }}h /phantom
		glue*ll }}glue
	    }}h box[]
	}}v box[] /vflip dup to nick-edit
................................................................................
	    }}z ' id-show-hide false toggle[]
	    glue-sright }}glue
	    glue*lll }}glue
	}}h box[] \skip >bl
	{{  \small dark-blue !i18n
	    l" Enter passphrase to unlock" }}text' /center dup to phrase-unlock
	    l" Create new ID" }}text' /center dup to create-new-id /hflip

	    l" Enter passphrase again" }}text' /center dup to phrase-again /hflip
	    !lit
	}}z box[] /center >bl
	{{ glue*lll }}glue }}v
    }}v box[]
}}z box[] to pw-frame

$0000BFFF text-color, ' dark-blue >body f!







>







 







>






>
>
>
|







 







|

|



|
|



|
|







 







|







 







>
|







93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
...
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
...
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
...
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
...
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337

\ password screen

0 Value pw-err
0 Value pw-num
0 Value phrase-unlock
0 Value create-new-id
0 Value phrase-first
0 Value phrase-again
0 Value plus-login
0 Value minus-login
0 Value nick-edit

: err-fade ( r addr -- )
    1e fover [ pi f2* ] Fliteral f* fcos 1e f+ f2/ f-
................................................................................
	o anims[] >stack o>
    LOOP  flag ;

forward show-nicks
forward gui-msgs
0 Value title-vp
0 Value pw-field
0 Value nick-field
0 Value nick-pw

Variable nick$

: nick-done ( max span addr pos -- max span addr pos flag )
    over 3 pick nick$ $!
    0e pw-field [: data .engage fdrop ;] >animate \ engage delayed
    create-new-id /hflip
    phrase-first /flop +lang
    1 to nick-pw  true ;

: clear-edit ( max span addr pos -- max 0 addr 0 true )
    drop nip 0 tuck true ;

: do-shake ( max span addr pos -- max span addr pos flag )
    keys sec[]free
    clear-edit invert
................................................................................
    show-nicks clear-edit ;

: pw-done ( max span addr pos -- max span addr pos flag )
    case nick-pw
	1 of
	    1 +to nick-pw
	    over 3 pick >passphrase +key
	    phrase-first /hflip
	    phrase-again /flop
	    clear-edit invert +lang
	endof
	2 of
	    over 3 pick >passphrase lastkey@ str= IF
		\ ." Create nick " nick$ $. ."  with passphrase (hashed) " lastkey@ 85type cr
		gen-keys-dir nick$ $@ 0 .new-key,
		right-phrase
	    ELSE
		1 to nick-pw
		phrase-first /flop
		phrase-again /hflip +lang
		1 tries# ! do-shake
	    THEN
	endof
	err-fade? IF  false  EXIT  THEN
	over 3 pick >passphrase +key
	read-keys secret-keys# 0= IF
	    \ ." Wrong passphrase" cr
................................................................................
		{{
		    glue*l pw-bg-col# font-size# f2/ f2/ }}frame dup .button3
		    transp# to x-color
		    "f(g" }}text /left 25%b
		    {{
			nt
			white# to x-color \bold
			"nick" }}edit 25%b dup to nick-field
			glue*lll }}glue \regular
		    }}h bx-tab nick-field ' nick-done edit[]
		}}z box[] blackish
		{{ \large "👤" }}text \normal }}h /phantom
		glue*ll }}glue
	    }}h box[]
	}}v box[] /vflip dup to nick-edit
................................................................................
	    }}z ' id-show-hide false toggle[]
	    glue-sright }}glue
	    glue*lll }}glue
	}}h box[] \skip >bl
	{{  \small dark-blue !i18n
	    l" Enter passphrase to unlock" }}text' /center dup to phrase-unlock
	    l" Create new ID" }}text' /center dup to create-new-id /hflip
	    l" Enter new passphrase" }}text' /center dup to phrase-first /hflip
	    l" Enter new passphrase again" }}text' /center dup to phrase-again /hflip
	    !lit
	}}z box[] /center >bl
	{{ glue*lll }}glue }}v
    }}v box[]
}}z box[] to pw-frame

$0000BFFF text-color, ' dark-blue >body f!

Changes to keys.fs.

891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912

: sksig! ( -- )
    ke-pk $@ ke-sk sec@ c:0key >keyed-hash keypad keysize keccak>
    keypad keysize ke-sksig sec! ;

: +gen-keys ( nick u type -- )
    gen-keys  64#-1 key-read-offset 64!
    pkc keysize2 key:new >o o to my-key
    [ 1 import#self lshift 1 import#new lshift or ]L ke-imports !
    ke-type !  ke-nick $!  nick!
    config:pw-level# @ ke-pwlevel !  perm%myself ke-mask !
    skc keysize ke-sk sec!  +seckey
    skrev keysize ke-rsk sec!
    sksig!
    $10 rng$ ke-wallet sec! \ wallet key is just $10
    key-sign o> ;

: this-key-sign ( -- )
    my-key >r o to my-key  key-sign  r> to my-key ;

: dummy-key ( raddr u nick u -- o )
    \G Generate a deterministic key based on the address and our sksig







|






|







891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912

: sksig! ( -- )
    ke-pk $@ ke-sk sec@ c:0key >keyed-hash keypad keysize keccak>
    keypad keysize ke-sksig sec! ;

: +gen-keys ( nick u type -- )
    gen-keys  64#-1 key-read-offset 64!
    pkc keysize2 key:new >o o to my-key-default  o to my-key
    [ 1 import#self lshift 1 import#new lshift or ]L ke-imports !
    ke-type !  ke-nick $!  nick!
    config:pw-level# @ ke-pwlevel !  perm%myself ke-mask !
    skc keysize ke-sk sec!  +seckey
    skrev keysize ke-rsk sec!
    sksig!
\    $10 rng$ ke-wallet sec! \ wallet key is just $10
    key-sign o> ;

: this-key-sign ( -- )
    my-key >r o to my-key  key-sign  r> to my-key ;

: dummy-key ( raddr u nick u -- o )
    \G Generate a deterministic key based on the address and our sksig

Changes to lang/de.

1
2
3
4
5
6
7

8
9
10
11
12
13
14
15
16
Gforth
🔵
⚪
net2o GUI
Falsche Passphrase
Zum Öffnen Passphrase eingeben
Erzeuge neue ID

Passphrase nochmal eingeben
Spitznamen
Öffentlicher Schlüssel
Schlüsselsignaturdatum
Meine Schlüssel
Meine Gruppen
Meine Freunde
Plaudertagebuch
Senden







>
|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Gforth
🔵
⚪
net2o GUI
Falsche Passphrase
Zum Öffnen Passphrase eingeben
Erzeuge neue ID
Neue Passphrase eingeben
Neue Passphrase nochmal eingeben
Spitznamen
Öffentlicher Schlüssel
Schlüsselsignaturdatum
Meine Schlüssel
Meine Gruppen
Meine Freunde
Plaudertagebuch
Senden

Changes to lang/en.

1
2
3
4
5
6
7

8
9
10
11
12
13
14
15
16
Gforth
🔵
⚪
net2o GUI
Wrong passphrase!
Enter passphrase to unlock
Create new ID

Enter passphrase again
Nick+Pet
Public key
Key signature date
My keys
My groups
My peers
chat log
send







>
|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Gforth
🔵
⚪
net2o GUI
Wrong passphrase!
Enter passphrase to unlock
Create new ID
Enter new passphrase
Enter new passphrase again
Nick+Pet
Public key
Key signature date
My keys
My groups
My peers
chat log
send

Changes to lang/zh.

1
2
3
4
5

6

7
8
9
10
11
12
13
14
15
16
Gforth
🔵
⚪
net2o 图形用户界面
错误的密码

创建新的ID

再次输入密码
输入密码以解锁
昵称
公钥
关键签名日期
我的钥匙
我的集团
我的朋友
聊天记录
发送





>

>
|
<








1
2
3
4
5
6
7
8
9

10
11
12
13
14
15
16
17
Gforth
🔵
⚪
net2o 图形用户界面
错误的密码
输入密码以解锁
创建新的ID
输入新的密码
再次输入新的密码

昵称
公钥
关键签名日期
我的钥匙
我的集团
我的朋友
聊天记录
发送