remove changelog entry for undone update
[silc.git] / TODO-1.0
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]
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]
191 =========================
192
193  o SILC Finite State Machine API.  Replaces SILC Protocol API,
194    (see ~silcfsm or ask Pekka).
195
196
197 lib/silcutil/silcnet*, lib/silcutil/*/silc*net*
198 ===============================================
199
200  o Add UDP interface
201
202  o New network interfaces
203
204 tyepdef enum {
205   SILC_NET_OK,
206   SILC_NET_UNKNOWN_IP,
207   SILC_NET_UNKNOWN_HOST,
208   SILC_NET_HOST_UNREACHABLE,
209   SILC_NET_CONNECTION_REFUSED,
210   SILC_NET_CONNECTION_TIMEOUT,
211   SILC_NET_NO_MEMORY,
212   SILC_NET_ERROR,
213 } SilcNetStatus;
214
215 /* A callback function of this type is returned by silc_net_create_server
216    and silc_net_create_connection_async.  For silc_net_create_server this
217    callback means that new incoming connection was accepted, and the
218    `stream' is the socket stream representing the socket connection.  For
219    silc_net_create_connection_async this means that we have connected to
220    the remote host and the `stream' is the socket stream for the socket
221    connection. */
222 typedef void (*SilcNetCallback)(SilcNetStatus status,
223                                 SilcStream stream, void *context);
224
225 typedef SilcNetServerStruct *SilcNetServer;
226
227 struct SilcNetServerStruct {
228   SilcNetCallback callback;
229   void *context;
230   int sock;
231   bool require_fqdn;
232 };
233
234 /* This function creates server or daemon or listener or what ever.  This
235    does not fork a new process, it must be done by the caller if caller
236    wants to create a child process.  This is used to create network
237    listener for incoming connections, and `callback' will be called
238    everytime new connection is received.  If `local_ip_addr' is NULL
239    any address is used.  If provided it can be used bind the server to
240    `local_ip_count' many IP addresses provided in `local_ip_addr' table.
241    On success returns the SilcNetServer context, or NULL on error.  If
242    `require_fqdn' is TRUE the server will require that the incoming
243    connection has FQDN to be able to connect. */
244 SilcNetServer
245 silc_net_create_server(const char **local_ip_addr, SilcUInt32 local_ip_count,
246                        int port, bool require_fqdn, SilcSchedule schedule,
247                        SilcNetCallback callback, void *context);
248
249 /* Closes the server indicated by the `server'. */
250 silc_net_close_server(SilcNetServer server);
251
252 /* Creates TCP/IP connection to the remote host indicated by `remote_host'
253    which may be hostname or IP address, on the port indicated by `remote_port'.
254    If the `local_ip_addr' is provided the local host is bound to that address
255    before creating the connection.  This is synchronous call, and the
256    `callback' is called before this function returns.  The `callback'
257    delivers the SilcStream for the created connection. */
258 SilcNetStatus
259 silc_net_create_connection(const char *local_ip_addr,
260                            const char *remote_host, int remote_port,
261                            SilcNetCallback callback, void *context);
262
263 /* Creates TCP/IP connection to the remote host indicated by `remote_host'
264    which may be hostname or IP address, on the port indicated by `remote_port'.
265    If the `local_ip_addr' is provided the local host is bound to that address
266    before creating the connection.  This is asynchronous call, and this
267    function returns before the connection is actually established.  The
268    `callback' will be called after the connection is created to deliver the
269    SilcStream for the created connection. */
270 SilcAsyncOperation
271 silc_net_create_connection_async(const char *local_ip_addr,
272                                  const char *remote_ip_addr, int remote_port,
273                                  SilcNetCallback callback, void *context);
274
275
276  o Other functions should remain as they are since these new functions have
277    to use them.  This way we also provide them for applications that want
278    to handle the sockets by themself.
279
280
281 apps/silcd
282 ==========
283
284  o Remove the big switch statement from the function
285    silc_server_packet_parse_type and replace it with predefined
286    table of function pointers where each of the slot in table
287    represents the packet type value.
288
289    Same could be done with notify packets which has big switch
290    statement too.  Same kind of table of notify callbacks could be
291    done as well.
292
293  o The parser callback in the server will add a timeout task for
294    all packets.  It will require registering and allocating a
295    new task to the SilcSchedule.  Maybe, at least, for server
296    and router packets the parser would be called immediately
297    instead of adding it to the scheduler with 0 timeout.  It
298    should be analyzed too how slow the task registering process
299    actually is, and find out ways to optimize it.
300
301  o The SERVER_SIGNOFF notify handing is not optimal, because it'll
302    cause sending of multiple SIGNOFF notify's instead of the one
303    SERVER_SIGNOFF notify that the server received.  This should be
304    optimized so that the only SERVER_SIGNOFF is sent and not
305    SIGNOFF of notify at all (using SIGNOFF takes the idea about
306    SERVER_SIGNOFF away entirely).
307
308  o Another SERVER_SIGNOFF opt/bugfix:  Currently the signoff is
309    sent to a client if it is on same channel as the client that
310    signoffed.  However, the entire SERVER_SIGNOFF list is sent to
311    the client, ie. it may receive clients that was not on the
312    same channel.  This is actually against the specs.  It must be
313    done per channel.  It shouldn't receive the whole list just
314    because one client happened to be on same channel.
315
316  o MAYBE: The SilcChannelClientEntry can be:
317         SilcUInt32 address;
318         SilcUInt32 mode;
319
320   where address is SilcClientEntry address XOR SilcChannelEntry.
321   You can get SilcClientEntry by doing client = chl->address XOR channel,
322   and SilcChannelEntry by doing channel = chl->address XOR client.
323   As long as the other pointer is always available when accessing the
324   structure this can be done.
325
326  o Add reference counters to all Silc*Entry structures
327
328  o SERVICEs support (plugin, SIM)
329
330  o If client's public key is saved in the server (and doing public key
331    authentication) then the hostname and the username information could
332    be taken from the public key.  Should be a configuration option!
333
334  o Add a timeout to handling incoming JOIN commands.  It should be
335    enforced that JOIN command is executed only once in a second or two
336    seconds.  Now it is possible to accept n incoming JOIN commands
337    and process them without any timeouts.  THis must be employed because
338    each JOIN command will create and distribute the new channel key
339    to everybody on the channel (Fix this to 0.9.x).
340
341  o The CMODE cipher & hmac change problem (#101).