-
Notifications
You must be signed in to change notification settings - Fork 0
/
ObjectTypes.txt
117 lines (95 loc) · 2.4 KB
/
ObjectTypes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Static CHK Object ... Blob
updatable symbolic name of other object ... Link
Object identifier is 24 Byte
Bit[254]=1 ... Blob, SHA256 of Blob data truncated to 255 bits
Bit[254]=0 ... Link, SHA256 of public key
6BC03BAFE0EFF54A0011637C4A96E734 (16B, NodeID)
7172C0964DBCA42D8F334AC6A357A2085394FED8 (20B, Old)
54FF2F830E0954C5978A2AD94AE51DE825B8ECD1BECA92D8 (24B, Blob)
BC4ED4695AC98ADB9B5A4CC3F25AE928BBD6D91B9F75C497 (24B, Link)
BC4ED4695AC98ADB9B5A4CC3F25AE928BBD6D91B9F75C49F3F05E7BE933C7EF7 (32B, pubkey)
* All blobs, announce to DHT.
* Link (132), store on Target.
Link format:
signed_data:
what:24B;
pubkey:32B;
updated:6B;
expires:6B;
signature:64B;
API, Blob:
- Open -> Stream
- Insert <- mem
- Insert <- tmpfile, hash
- InsertSoft <- filename, hash
- Stat
- Delete
API, Link:
- Readlink -> id
- ReadLinkData -> mem
- WriteLinkData
- Delete
- Open -> Stream
* rewrite OT units for new protocol.
* rewrite protile things to use mutable Links
* write mutable server
* fix ctrl
cli unit: Keyring, rpc primitives
Prof:
$ bin/bnedit profi
$ bin/bnc put prof.dat
$ bin/bnc sign prof_hash new keyring.dat
$ bin/bnc sign lnk_1 new masterkey.dat
sign what pub [keyring] [expires]
Profile Keys for messages
To send: - single key from progfile
To verify: all previously used keys
* All keys in profile
- scalability
- current
* Link to previous profile versions
- old blobs already deleted
* Sign message hash with Lv2 key
- save space on MAC
- easy to verify with data in store
- breaks when lv2 key changes
* Sign messages with lv2 key and attach lv1 sig
- sig64,pub1:32,exp:12,sig1:64
* Don't care
- breaks on any key change
* Multiple modes
- SIMPLE, HMAC, Lv2+Lv1
New message formats:
ElGamal: r, P, m -> R, Sm
file Message is
format identifier
flags
created
expires
TempPubKey
if MultiRecipient in flags then
rcpt_count
for each rcpt
rcpt.id
prio
rcpt.pub_first_3B
E(DH(TempSecKey,rcpt.pub),sk);
end for
end else
prio
rcpt.pub_first_3B
let sk=H(DH(TempSecKey,rcpt.pub))
end
encrypted E(sk,Z(...))
message
if Signed in flags then
SenderSigPub
if MasterCert in flags then
MasterPub
Master upd/exp
MasterSig
end
Signeture
end if
end encrypted
end file