summaryrefslogtreecommitdiff
path: root/toxcore/net_crypto.c
AgeCommit message (Collapse)Author
2014-06-10Const correctness in various interdependent filesMarc Schütz
2014-06-06Renamed list functions to fix conflict issue on certain machines.irungentoo
2014-06-05Fixed regression that made packet_send_rate increase even whenirungentoo
no data was transmitted.
2014-06-05Optimized net_crypto UDP packet sorting using list.irungentoo
2014-06-04Doubled minimum transfer rate.irungentoo
File transfers got stuck because it was too low.
2014-06-04Request packets are now sent with send_data_packet_helper().irungentoo
This means all data packets are now padded the same way.
2014-06-04Added data packet padding to toxcore.irungentoo
Data sent as lossless or lossy is now padded with: ((MAX_CRYPTO_DATA_SIZE - data_length) % CRYPTO_MAX_PADDING) bytes in order to reduce the possibility of length related attacks. I set CRYPTO_MAX_PADDING to 8 but it can be changed anytime without breaking network compatibility between tox cores.
2014-06-03Tweaked file transfers a bit.irungentoo
2014-06-02Increased some timeouts to try to prevent disconnections whenirungentoo
transferring files on wireless networks.
2014-05-30Renamed tox_do_run_interval to tox_do_interval.irungentoo
tox_do_interval now returns a time in ms based on how much action is going on in net_crypto.
2014-05-26file transfer fixesnotsecure
-removed rate limit -send rate no longer gets reset on local/LAN connections
2014-05-22more conjestion controlnotsecure
needs testing
2014-05-21improved conjestion controlnotsecure
2014-05-21Added functions to send and receive lossy encrypted packets overirungentoo
the Tox connection. A/V should now work over TCP.
2014-05-18Save a couple TCP relays on save and reconnect to them on load.irungentoo
Removed some old code.
2014-05-18Fixed connection issue.irungentoo
2014-05-18TCP branch now ready for start of real testing.irungentoo
Friends can now exchange TCP relay addresses so that they can connect together. Currently all bootstrap nodes are treated as TCP relays.
2014-05-17add_tcp_relay_peer() can be used to add relays that we know thatirungentoo
peer is connected to. Some cleanups/fixes.
2014-05-17net_crypto now works again on pure UDP.irungentoo
2014-05-17Added a function to get the DHT public key stored in net_crypto.irungentoo
The DHT public keys in onion_client/net_crypto are synced and set to whichever is more recent. Tox peers now try to connect directly even when already connected with a TCP relay.
2014-05-17Net_crypto can now handle packets sent as TCP OOB packets.irungentoo
Added timestamp to know which DHT public key is good in case onion_client and net_crypto report different ones.
2014-05-17Changed cookie/cookie request packet.irungentoo
Cookie now contains the dht public key of the peer which makes more sense than including the real public key of the reciever. It means we no longer have to rely entirely on onion_client to find the dht public key of the other peer.
2014-05-16Fixed typo.irungentoo
2014-05-16Some TCP code added to net_crypto.irungentoo
add_tcp_relay() can be used to connect to some TCP relays. If both Toxes are connected to the same TCP relay(s) and create a connection on which they set the others dht_public_key, they will connect.
2014-05-15Fixed possibility that packet_send_rate would get stuck.irungentoo
2014-05-12Fixed some issues.irungentoo
Friends with multiple ips (on LAN) should be handled better. Remade the function to check the crypto connection status.
2014-05-11Fixed issue where callbacks were not set for accepted connection.irungentoo
2014-05-11Added kill packets.irungentoo
There should be no more delay between a peer closing their client and their friend being notified of them going offline. (unless the kill packet is lost)
2014-05-10Added basic congestion control to net_crypto.irungentoo
2014-05-09Fixed small issues.irungentoo
Added set_buffer_end(). File transfer test now checks if pieces arrive correctly.
2014-05-08Connection between toxes is lossless once again.irungentoo
2014-05-05Fixed bug.irungentoo
2014-05-04Added arrays to store packets on send/recv in net crypto.irungentoo
Wrote down more of the protocol. Padding support has been added and implemented which will make it possible for us to pad packets to mitigate length related attacks.
2014-05-03All time in core is now monotonic.irungentoo
2014-05-02Messenger now works with the new net_crypto api.irungentoo
Added callbacks in net_crypto for the data packets and status changes. Added onion_getfriend_DHT_pubkey to onion_client. Net crypto isn't done yet so connections between toxes are not lossless, this means file sending is broken hence why the test fails.
2014-05-02Move the handshake creating code to a function.irungentoo
Fixed another instance where it was not sent.
2014-05-02Fixed one case of the handshake not being sent.irungentoo
2014-05-02Small fixes.irungentoo
2014-05-02Remove Lossless UDP (This breaks Tox.)irungentoo
2014-05-01Protocol implementation is starting to look ok.irungentoo
Still need to decide exactly how data packets will work though.
2014-04-30Remove duplicates.irungentoo
2014-04-30Some more code written for the middle level protocol stuff.irungentoo
2014-04-30Added number to cookie request/response packets to prevent possibleirungentoo
DoS issue.
2014-04-29Some more work done on the middle network protocol.irungentoo
Handshake most likely has no more possible flaws to it, next thing to do is to do the same with the data packets. Wrote a couple more functions.
2014-04-28Added some functions to create/handle middle level protocol packets.irungentoo
2014-04-27Added raw UDP cookie request packet handler.irungentoo
2014-04-23Major cleanups.irungentoo
Fixed circular dependency between DHT and net_crypto: DHT no longer depends on net_crypto. Moved the crypto request packets functions to crypto core and DHT. Cleaned up/added some defines that can be used to get the true maximum length of things like the friends request message. MAX_DATA_SIZE has been replaced in most places by more appropriate defines.
2014-04-22Decided pretty much how the handshake would work.irungentoo
Started writing the code. Astyled some files.
2014-04-21Crypto related cleanups.irungentoo
Moved Bunch of functions from net_crypto to crypto_core. decrypt_data_fast and decrypt_data_symmetric were the same thing therefore, removed decrypt_data_fast. Replaced all the crypto_secretbox_* defines with the equivalent crypto_box_* one. New define: crypto_box_KEYBYTES that is equal to crypto_box_BEFORENMBYTES.
2014-04-18Added function to increment nonce by specified number.irungentoo
Nonces now behave like big endian numbers.