Initial code commit for Toolkit 1.1.
[silc.git] / TODO
1 TODO for 1.1 And Beyond
2 =======================
3
4 lib/silccrypt
5 =============
6
7  o Implement the defined SilcDH API.  The definition is in
8    lib/silccrypt/silcdh.h.
9
10  o SSH2 public keys support, allowing the use of SSH2 public keys in
11    SILC.
12
13  o OpenPGP certificate support, allowing the use of PGP public keys
14    in SILC.
15
16  o SILC PKCS (silcpkcs.h) reorganizing when other PK supports added.
17    Move the SILC Public Key routines away from the crypto library into
18    the core library (silccore).  silc_pkcs_public/private_key_* routines
19    to silc_public/private_key_* routines.  The silc_public_key_* routines
20    should also automatically handle SILC Public Keys, and other keys
21    and certificates as well.  Add fe. silcpk.h into silccore.  It should
22    also include the Public Key Payload encoding and decoding routines.
23
24  o Add DSS support.
25
26  o Cipher optimizations (asm, that this) at least for i386 would be nice.
27
28  o ECDSA and ECDH.
29
30
31 lib/silccore/silcpacket.[ch]    ****PARTLY DONE****
32 ============================
33
34  o SilcPacketEngine.
35
36  o New SILC Packet API.
37
38
39 lib/silccore/silcid.[ch]
40 ========================
41
42   o Add silc_id_str2id to accept the destination buffer as argument
43     and thus not require any memory allocation.  Same will happen
44     with silc_id_payload_* functions.
45
46   o silc_id_str2id, silc_id2str to non-allocating routines.
47
48
49 lib/silcutil
50 ============
51
52  o Compression routines are missing.  The protocol supports packet
53    compression thus it must be implemented.  SILC Zip API must be
54    defined.
55
56  o Add builtin SOCKS and HTTP Proxy support, well the SOCKS at least.
57    SILC currently supports SOCKS4 and SOCKS5 but it needs to be compiled
58    in separately.
59
60  o bool -> SilcBool
61
62  o SilcBit, bit field:
63
64    #define SilcBit(b) unsigned int b : 1
65
66
67 lib/silcutil/silcbuffer.h       ****DONE****
68 =========================
69
70  o Remove the `truelen' field from SilcBuffer as it is entirely
71    redundant since we can get the true length of the buffer by
72    doing buffer->end - buffer->header.  Add silc_buffer_truelen
73    macro instead.  Consider also removing `len' field too since
74    it effectively is buffer->tail - buffer->data, and adding
75    silc_buffer_len macro can do the same.  These would save
76    totally 8 bytes of memory per buffer.
77
78
79 lib/silcutil/silcbuffmt.[ch]    ****PARTY DONE****
80 ============================
81
82  o SILC_STR_APPEND, _APPEND_TAIL.
83
84  o SILC_STR_OFFSET
85
86
87 lib/silcutil/silcstack.[ch]     ****DONE****
88 ===========================
89
90  o Data stack implementation
91
92
93 lib/silcutil/silcstream.[ch]    ****DONE****
94 ============================
95
96  o Add abstract SilcStream.
97
98
99 lib/silcutil/silcsocketstream.[ch]      ****PARTY DONE****
100 ==================================
101
102  o Add SilcSocketStream.
103
104
105 lib/silcutil/epoc/*
106 ===================
107
108   o lib/silcutil/epoc routines missing or not completed.
109
110   o The PKCS#1 also calls global RNG (even though it is not used
111     currently in SILC, the interface allows its use).
112
113   o Something needs to be thought to the logging globals as well,
114     like silc_debug etc.  They won't work on EPOC.  Perhaps logging
115     and debugging is to be disabled on EPOC.
116
117
118 lib/silcutil/silcschedule*.[ch]         ****DONE****
119 ===============================
120
121  o Scheduler can be optimized for FD tasks by changing the fd_queue
122    to SilcHashTable instead of using linked list.  We need to do
123    one-to-one mapping of FD to task and hash table is more efficient
124    for this usage.
125
126    Also redefine the silc_select to perhaps return a separate
127    structure of the events that actually occurred, instead of
128    returning the events in the fd_list which is then traversed
129    in the generic code to find the changed events.  This can be
130    made faster by having own struct which includes only the
131    changed events, thus the tarversing is faster since the whole
132    fd_list is not traversed anymore (it is still traversed in the
133    silc_select but at least it removes one extra tarversing later
134    for the same list).
135
136    Other task queues should be changed to use SilcList.
137
138  o Add SILC scheduler's internal routines into a table of implementation
139    function pointers, that the generic code then takes as extern from
140    implementation.  These are the silc_schedule_internal_* routines.
141
142  o Change SILC_TASK_CALLBACK to non-static, and remove the macro
143    SILC_TASK_CALLBACK_GLOBAL.
144
145
146 lib/silcutil/silcasync.[ch]     ****DONE****
147 ===========================
148
149  o Add SilcAsyncOperation to utility library.  Any function that takes
150    callback as an argument must/should return SilcAsyncOperation.
151
152
153 lib/silcutil/silctime.[ch]      ****DONE****
154 ===========================
155
156  o SilcTime.
157
158  o system time, universal, generalized.
159
160
161 lib/silcmath
162 ============
163
164  o The SILC MP API function must start returning indication of success
165    and failure of the operation.
166
167  o Do SilcStack support for silc_mp_init, silc_mp_init_size and other
168    any other MP function (including utility ones) that may allocate
169    memory.
170
171  o All utility functions should be made non-allocating ones.
172
173
174 lib/silcasn1                    ****PARTLY DONE****
175 ============
176
177  o ASN.1 library
178
179  o Header documentation missing.
180
181  o Some string encodings missing (copy/paste matter).
182
183
184 lib/silcpkix
185 ============
186
187  o PKIX implementation
188
189
190 lib/silcutil/silcfsm.[ch]       ****DONE****
191 =========================
192
193  o SILC Finite State Machine API.  Replaces SILC Protocol API,
194
195
196 lib/silcutil/silcnet*, lib/silcutil/*/silc*net*         ****PARTLY DONE****
197 ===============================================
198
199  o Add UDP interface
200
201  o New network interfaces
202
203  o Other functions should remain as they are since these new functions have
204    to use them.  This way we also provide them for applications that want
205    to handle the sockets by themself.
206
207
208 apps/silcd
209 ==========
210
211  o Remove the big switch statement from the function
212    silc_server_packet_parse_type and replace it with predefined
213    table of function pointers where each of the slot in table
214    represents the packet type value.
215
216    Same could be done with notify packets which has big switch
217    statement too.  Same kind of table of notify callbacks could be
218    done as well.
219
220  o The parser callback in the server will add a timeout task for
221    all packets.  It will require registering and allocating a
222    new task to the SilcSchedule.  Maybe, at least, for server
223    and router packets the parser would be called immediately
224    instead of adding it to the scheduler with 0 timeout.  It
225    should be analyzed too how slow the task registering process
226    actually is, and find out ways to optimize it.
227
228  o The SERVER_SIGNOFF notify handing is not optimal, because it'll
229    cause sending of multiple SIGNOFF notify's instead of the one
230    SERVER_SIGNOFF notify that the server received.  This should be
231    optimized so that the only SERVER_SIGNOFF is sent and not
232    SIGNOFF of notify at all (using SIGNOFF takes the idea about
233    SERVER_SIGNOFF away entirely).
234
235  o Another SERVER_SIGNOFF opt/bugfix:  Currently the signoff is
236    sent to a client if it is on same channel as the client that
237    signoffed.  However, the entire SERVER_SIGNOFF list is sent to
238    the client, ie. it may receive clients that was not on the
239    same channel.  This is actually against the specs.  It must be
240    done per channel.  It shouldn't receive the whole list just
241    because one client happened to be on same channel.
242
243  o MAYBE: The SilcChannelClientEntry can be:
244         SilcUInt32 address;
245         SilcUInt32 mode;
246
247   where address is SilcClientEntry address XOR SilcChannelEntry.
248   You can get SilcClientEntry by doing client = chl->address XOR channel,
249   and SilcChannelEntry by doing channel = chl->address XOR client.
250   As long as the other pointer is always available when accessing the
251   structure this can be done.
252
253  o Add reference counters to all Silc*Entry structures
254
255  o SERVICEs support (plugin, SIM)
256
257  o If client's public key is saved in the server (and doing public key
258    authentication) then the hostname and the username information could
259    be taken from the public key.  Should be a configuration option!
260
261  o Add a timeout to handling incoming JOIN commands.  It should be
262    enforced that JOIN command is executed only once in a second or two
263    seconds.  Now it is possible to accept n incoming JOIN commands
264    and process them without any timeouts.  THis must be employed because
265    each JOIN command will create and distribute the new channel key
266    to everybody on the channel (Fix this to 0.9.x).
267
268  o The CMODE cipher & hmac change problem (#101).