summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-07-07 23:09:00 -0400
committerirungentoo <irungentoo@gmail.com>2013-07-07 23:09:00 -0400
commit9a0d74908340e1a5e244eebae54feef584544261 (patch)
treeeabb238c666de8aeb1f11a508438cd418cc57a1c
parenta632d960f8d8095566530d1d0dc1393f02e1e07f (diff)
Added IDEAS.txt and added checks to 2 net_crypto functions.
-rw-r--r--core/net_crypto.c8
-rw-r--r--docs/IDEAS.txt27
2 files changed, 35 insertions, 0 deletions
diff --git a/core/net_crypto.c b/core/net_crypto.c
index 9a7500ea..3a3785ff 100644
--- a/core/net_crypto.c
+++ b/core/net_crypto.c
@@ -154,6 +154,10 @@ void random_nonce(uint8_t * nonce)
154//return length of recieved data if successful 154//return length of recieved data if successful
155int read_cryptpacket(int crypt_connection_id, uint8_t * data) 155int read_cryptpacket(int crypt_connection_id, uint8_t * data)
156{ 156{
157 if(crypt_connection_id < 0 || crypt_connection_id >= MAX_CRYPTO_CONNECTIONS)
158 {
159 return 0;
160 }
157 if(crypto_connections[crypt_connection_id].status != 3) 161 if(crypto_connections[crypt_connection_id].status != 3)
158 { 162 {
159 return 0; 163 return 0;
@@ -184,6 +188,10 @@ int read_cryptpacket(int crypt_connection_id, uint8_t * data)
184//return 1 if data was put into the queue 188//return 1 if data was put into the queue
185int write_cryptpacket(int crypt_connection_id, uint8_t * data, uint32_t length) 189int write_cryptpacket(int crypt_connection_id, uint8_t * data, uint32_t length)
186{ 190{
191 if(crypt_connection_id < 0 || crypt_connection_id >= MAX_CRYPTO_CONNECTIONS)
192 {
193 return 0;
194 }
187 if(length - crypto_box_BOXZEROBYTES + crypto_box_ZEROBYTES > MAX_DATA_SIZE - 1) 195 if(length - crypto_box_BOXZEROBYTES + crypto_box_ZEROBYTES > MAX_DATA_SIZE - 1)
188 { 196 {
189 return 0; 197 return 0;
diff --git a/docs/IDEAS.txt b/docs/IDEAS.txt
new file mode 100644
index 00000000..c00b242e
--- /dev/null
+++ b/docs/IDEAS.txt
@@ -0,0 +1,27 @@
1A couple of ideas posted in the threads.
2
3#############
4 Prescence (online/offline)
5 - A user's id being present with a valid signature in the DHT implies they have been online recently. A ping to the user would confirm this, as well as notifying them that you are online. If both friends in a pair actively search for the other then disruption due to lag in inserting records will be mimimised
6
7 Username (nick) changes
8 - When a user wants to change their nick they are free to do so, the nick is not cryptographically significant. The nick change could be shared in-band with the chat (ie, each message in the format "username - message") or out of band, perhaps in the dht values or in the ping messgaes.
9
10 File send
11 - I see a file being sent as ultimately the same as an audio stream or a video stream being sent, they could use the same protocol parts. The client would handle what to do with the data whether it is a stream of media data or a stream of b64'd file. both would require explicit verification from the other participant. This would also allow sharing of streamed files, eg incomplete downloads.
12
13##############
14
15- ability to log in with username and password
16 possible implementation: store keys in a server and use user/pass to retrieve keys from server transparently
17- looking up people and adding as contacts, etc by name or username
18 possible implementation: store pubkey-hash/info correspondences in a public directory, integrate access into client
19- portable contact list/profile/other account data
20 just store it along with keys in aforementioned server; cost of storage could rise... potential problem
21- POSSIBLY interfacing with regular phones. probably not possible, but plebs might complain (THIS IS EXPENSIVE (hence 'probably not possible')) <3
22
23IMPORTANT: release two major sanctioned UIs, one for autists, one with inbuilt support for the previous list so that plebs can't get confused with setting it up and autists don't complain about it getting in their way. de geso
24
25
26##############
27