1 TODO for 1.1 And Beyond
2 =======================
7 o Implement the defined SilcDH API. The definition is in
8 lib/silccrypt/silcdh.h.
10 o SSH2 public keys support, allowing the use of SSH2 public keys in
13 o OpenPGP certificate support, allowing the use of PGP public keys
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.
26 o Cipher optimizations (asm, that this) at least for i386 would be nice.
31 lib/silccore/silcpacket.[ch] ****PARTLY DONE****
32 ============================
36 o New SILC Packet API.
39 lib/silccore/silcid.[ch]
40 ========================
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.
46 o silc_id_str2id, silc_id2str to non-allocating routines.
52 o Compression routines are missing. The protocol supports packet
53 compression thus it must be implemented. SILC Zip API must be
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
64 #define SilcBit(b) unsigned int b : 1
67 lib/silcutil/silcbuffer.h ****DONE****
68 =========================
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.
79 lib/silcutil/silcbuffmt.[ch] ****PARTY DONE****
80 ============================
82 o SILC_STR_APPEND, _APPEND_TAIL.
87 lib/silcutil/silcstack.[ch] ****DONE****
88 ===========================
90 o Data stack implementation
93 lib/silcutil/silcstream.[ch] ****DONE****
94 ============================
96 o Add abstract SilcStream.
99 lib/silcutil/silcsocketstream.[ch] ****PARTY DONE****
100 ==================================
102 o Add SilcSocketStream.
108 o lib/silcutil/epoc routines missing or not completed.
110 o The PKCS#1 also calls global RNG (even though it is not used
111 currently in SILC, the interface allows its use).
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.
118 lib/silcutil/silcschedule*.[ch]
119 ===============================
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
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
136 Other task queues should be changed to use SilcList.
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.
142 o Change SILC_TASK_CALLBACK to non-static, and remove the macro
143 SILC_TASK_CALLBACK_GLOBAL.
146 lib/silcutil/silcasync.[ch] ****DONE****
147 ===========================
149 o Add SilcAsyncOperation to utility library. Any function that takes
150 callback as an argument must/should return SilcAsyncOperation.
153 lib/silcutil/silctime.[ch] ****DONE****
154 ===========================
158 o system time, universal, generalized.
164 o The SILC MP API function must start returning indication of success
165 and failure of the operation.
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
171 o All utility functions should be made non-allocating ones.
174 lib/silcasn1 ****PARTLY DONE****
179 o Header documentation missing.
181 o Some string encodings missing (copy/paste matter).
187 o PKIX implementation
190 lib/silcutil/silcfsm.[ch]
191 =========================
193 o SILC Finite State Machine API. Replaces SILC Protocol API,
194 (see ~silcfsm or ask Pekka).
197 lib/silcutil/silcnet*, lib/silcutil/*/silc*net*
198 ===============================================
202 o New network interfaces
207 SILC_NET_UNKNOWN_HOST,
208 SILC_NET_HOST_UNREACHABLE,
209 SILC_NET_CONNECTION_REFUSED,
210 SILC_NET_CONNECTION_TIMEOUT,
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
222 typedef void (*SilcNetCallback)(SilcNetStatus status,
223 SilcStream stream, void *context);
225 typedef SilcNetServerStruct *SilcNetServer;
227 struct SilcNetServerStruct {
228 SilcNetCallback callback;
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. */
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);
249 /* Closes the server indicated by the `server'. */
250 silc_net_close_server(SilcNetServer server);
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. */
259 silc_net_create_connection(const char *local_ip_addr,
260 const char *remote_host, int remote_port,
261 SilcNetCallback callback, void *context);
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. */
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);
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.
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.
289 Same could be done with notify packets which has big switch
290 statement too. Same kind of table of notify callbacks could be
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.
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).
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.
316 o MAYBE: The SilcChannelClientEntry can be:
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.
326 o Add reference counters to all Silc*Entry structures
328 o SERVICEs support (plugin, SIM)
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!
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).
341 o The CMODE cipher & hmac change problem (#101).