silc_buffer_format reallocates automatically now.
[silc.git] / TODO
1 TODO for 1.1 And Beyond
2 =======================
3
4 lib/silccrypt                   ****PARTLY DONE****
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]    ****DONE****
32 ============================
33
34  o SilcPacketEngine.
35
36  o New SILC Packet API.
37
38
39 lib/silccore/silcpacket.[ch]
40 ============================
41
42  o IV Included flag support, UDP transport support
43
44
45 lib/silccore/silcid.[ch]        ****DONE****
46 ========================
47
48   o Add silc_id_str2id to accept the destination buffer as argument
49     and thus not require any memory allocation.  Same will happen
50     with silc_id_payload_* functions.
51
52   o silc_id_str2id, silc_id2str to non-allocating routines.
53
54
55 lib/silccore
56 ============
57
58   o All payload encoding routines should take SilcStack as argument.
59
60
61 lib/silcutil                    ****PARTLY DONE****
62 ============
63
64  o Compression routines are missing.  The protocol supports packet
65    compression thus it must be implemented.  SILC Zip API must be
66    defined.
67
68  o Add builtin SOCKS and HTTP Proxy support, well the SOCKS at least.
69    SILC currently supports SOCKS4 and SOCKS5 but it needs to be compiled
70    in separately.
71
72  o bool -> SilcBool
73
74  o SilcBit, bit field:
75
76    #define SilcBit(b) unsigned int b : 1
77
78
79 lib/silcutil/silcbuffer.h       ****DONE****
80 =========================
81
82  o Remove the `truelen' field from SilcBuffer as it is entirely
83    redundant since we can get the true length of the buffer by
84    doing buffer->end - buffer->header.  Add silc_buffer_truelen
85    macro instead.  Consider also removing `len' field too since
86    it effectively is buffer->tail - buffer->data, and adding
87    silc_buffer_len macro can do the same.  These would save
88    totally 8 bytes of memory per buffer.
89
90
91 lib/silcutil/silcbuffmt.[ch]    ****PARTLY DONE****
92 ============================
93
94  o SilcStack aware silc_buffer_unformat
95
96  o silc_buffer_format reallocates automatically
97
98  o SILC_STR_OFFSET
99
100
101 lib/silcutil/silcstack.[ch]     ****DONE****
102 ===========================
103
104  o Data stack implementation
105
106
107 lib/silcutil/silcstream.[ch]    ****DONE****
108 ============================
109
110  o Add abstract SilcStream.
111
112
113 lib/silcutil/silcsocketstream.[ch]      ****PARTY DONE****
114 ==================================
115
116  o Add SilcSocketStream.
117
118  o Test QoS
119
120
121 lib/silcutil/epoc/*
122 ===================
123
124   o lib/silcutil/epoc routines missing or not completed.
125
126   o The PKCS#1 also calls global RNG (even though it is not used
127     currently in SILC, the interface allows its use).
128
129   o Something needs to be thought to the logging globals as well,
130     like silc_debug etc.  They won't work on EPOC.  Perhaps logging
131     and debugging is to be disabled on EPOC.
132
133
134 lib/silcutil/silcschedule*.[ch]         ****DONE****
135 ===============================
136
137  o Scheduler can be optimized for FD tasks by changing the fd_queue
138    to SilcHashTable instead of using linked list.  We need to do
139    one-to-one mapping of FD to task and hash table is more efficient
140    for this usage.
141
142    Also redefine the silc_select to perhaps return a separate
143    structure of the events that actually occurred, instead of
144    returning the events in the fd_list which is then traversed
145    in the generic code to find the changed events.  This can be
146    made faster by having own struct which includes only the
147    changed events, thus the tarversing is faster since the whole
148    fd_list is not traversed anymore (it is still traversed in the
149    silc_select but at least it removes one extra tarversing later
150    for the same list).
151
152    Other task queues should be changed to use SilcList.
153
154  o Add SILC scheduler's internal routines into a table of implementation
155    function pointers, that the generic code then takes as extern from
156    implementation.  These are the silc_schedule_internal_* routines.
157
158  o Change SILC_TASK_CALLBACK to non-static, and remove the macro
159    SILC_TASK_CALLBACK_GLOBAL.
160
161
162 lib/silcutil/silcasync.[ch]     ****DONE****
163 ===========================
164
165  o Add SilcAsyncOperation to utility library.  Any function that takes
166    callback as an argument must/should return SilcAsyncOperation.
167
168
169 lib/silcutil/silctime.[ch]      ****DONE****
170 ===========================
171
172  o SilcTime.
173
174  o system time, universal, generalized.
175
176
177 lib/silcmath
178 ============
179
180  o Import TFM.  Talk to Tom to add the missing functions.  Use TFM in
181    client and client library, but TMA in server, due to the significantly
182    increased memory consumption with TFM, and the rare need for public
183    key operations in server.
184
185  o The SILC MP API function must start returning indication of success
186    and failure of the operation.
187
188  o Do SilcStack support for silc_mp_init, silc_mp_init_size and other
189    any other MP function (including utility ones) that may allocate
190    memory.
191
192  o All utility functions should be made non-allocating ones.
193
194
195 lib/silcasn1                    ****PARTLY DONE****
196 ============
197
198  o ASN.1 library
199
200  o Header documentation missing.
201
202  o Some string encodings missing (copy/paste matter).
203
204  o Negative integer encoding
205
206
207 lib/silcpkix
208 ============
209
210  o PKIX implementation
211
212
213 lib/silcutil/silcfsm.[ch]       ****DONE****
214 =========================
215
216  o SILC Finite State Machine API.  Replaces SILC Protocol API,
217
218
219 lib/silcutil/silcnet*, lib/silcutil/*/silc*net*         ****PARTLY DONE****
220 ===============================================
221
222  o Add UDP interface
223
224  o New network interfaces
225
226  o Other functions should remain as they are since these new functions have
227    to use them.  This way we also provide them for applications that want
228    to handle the sockets by themself.
229
230
231 lib/silcserver
232 ==============
233
234  o (Re)write commands/command replys.
235
236  o (Re)write notify handling.
237
238  o The SERVER_SIGNOFF notify handing is not optimal, because it'll
239    cause sending of multiple SIGNOFF notify's instead of the one
240    SERVER_SIGNOFF notify that the server received.  This should be
241    optimized so that the only SERVER_SIGNOFF is sent and not
242    SIGNOFF of notify at all (using SIGNOFF takes the idea about
243    SERVER_SIGNOFF away entirely).
244
245  o Another SERVER_SIGNOFF opt/bugfix:  Currently the signoff is
246    sent to a client if it is on same channel as the client that
247    signoffed.  However, the entire SERVER_SIGNOFF list is sent to
248    the client, ie. it may receive clients that was not on the
249    same channel.  This is actually against the specs.  It must be
250    done per channel.  It shouldn't receive the whole list just
251    because one client happened to be on same channel.
252
253  o MAYBE: The SilcChannelClientEntry can be:
254         SilcUInt32 address;
255         SilcUInt32 mode;
256
257   where address is SilcClientEntry address XOR SilcChannelEntry.
258   You can get SilcClientEntry by doing client = chl->address XOR channel,
259   and SilcChannelEntry by doing channel = chl->address XOR client.
260   As long as the other pointer is always available when accessing the
261   structure this can be done.
262
263  o Add reference counters to all Silc*Entry structures
264
265  o SERVICEs support (plugin, SIM)
266
267  o If client's public key is saved in the server (and doing public key
268    authentication) then the hostname and the username information could
269    be taken from the public key.  Should be a configuration option!
270
271  o Add a timeout to handling incoming JOIN commands.  It should be
272    enforced that JOIN command is executed only once in a second or two
273    seconds.  Now it is possible to accept n incoming JOIN commands
274    and process them without any timeouts.  THis must be employed because
275    each JOIN command will create and distribute the new channel key
276    to everybody on the channel (Fix this to 0.9.x).
277
278  o Related to above.  If multiple JOINs are received in sequence perhaps
279    new key should be created only once, if the JOINs are handeled at the same
280    time.  Now we create multiple keys and never end up using them because
281    many JOINs are processed at the same time in sequence.  Only the last
282    key ends up being used.
283
284  o The CMODE cipher & hmac change problem (#101).
285
286
287 lib/silcclient
288 ==============
289
290  o Some form of rewrite to make it more efficient.
291
292  o Clear up interfaces.
293
294  o Remove silc_client_run and silc_client_run_one from calling SilcSchedule.
295    Leave the scheduling entirely to application.