sachaaaaa
							
						 
						
							 
							
							
							
								
							
								5084d8cfec 
								
							
								 
							
						 
						
							
							
								
								Update libloki/test/libloki-protocol_test.js  
							
							 
							
							... 
							
							
							
							Co-Authored-By: BeaudanBrown <beau@loki.network> 
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								sachaaaaa
							
						 
						
							 
							
							
							
								
							
								1bc1213705 
								
							
								 
							
						 
						
							
							
								
								Update libloki/test/libloki-protocol_test.js  
							
							 
							
							... 
							
							
							
							Co-Authored-By: BeaudanBrown <beau@loki.network> 
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								Beaudan
							
						 
						
							 
							
							
							
								
							
								7782c58d14 
								
							
								 
							
						 
						
							
							
								
								Slight refactor of PoW file to make easier to test plus some tests for the PoW functionality  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								Beaudan
							
						 
						
							 
							
							
							
								
							
								11883cb989 
								
							
								 
							
						 
						
							
							
								
								Cleaner separation of loki tests  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								Beaudan
							
						 
						
							 
							
							
							
								
							
								be878f00a4 
								
							
								 
							
						 
						
							
							
								
								Updated names of some test functions. Added yarn commands to view output of different tests. Added a test and updated existing test to use more efficient asserts  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								Beaudan
							
						 
						
							 
							
							
							
								
							
								a676459229 
								
							
								 
							
						 
						
							
							
								
								Added test for returning the correct prekeybundle after creating a contact, updated the in memory store to reflect how sasha updated the actual store a while ago  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								Beaudan
							
						 
						
							 
							
							
							
								
							
								c93aff7ebe 
								
							
								 
							
						 
						
							
							
								
								Setup grunt/yarn etc for loki tests plus wrote first 2 simple libloki-protocol tests  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								sachaaaaa
							
						 
						
							 
							
							
							
								
							
								d8f4d1f313 
								
							
								 
							
						 
						
							
							
								
								Fixes to get production build working  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								sachaaaaa
							
						 
						
							 
							
							
								
								
							
							
								
							
								05c18d42db 
								
									
								
							
								 
							
						 
						
							
							
								
								Merge pull request  #66  from sachaaaaa/session_reset  
							
							 
							
							... 
							
							
							
							Handle session reset, Loki style 
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								Beaudan Campbell-Brown
							
						 
						
							 
							
							
								
								
							
							
								
							
								c0ee584a2c 
								
									
								
							
								 
							
						 
						
							
							
								
								Update libloki/libloki-protocol.js  
							
							 
							
							... 
							
							
							
							Co-Authored-By: sachaaaaa <40749766+sachaaaaa@users.noreply.github.com> 
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								Beaudan
							
						 
						
							 
							
							
							
								
							
								1e3886cca8 
								
							
								 
							
						 
						
							
							
								
								More consistent naming of key storage functions, moved some loki messenger only functions into new file  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								sachaaaaa
							
						 
						
							 
							
							
							
								
							
								7e612700f7 
								
							
								 
							
						 
						
							
							
								
								Handle session reset, Loki style  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								Beaudan
							
						 
						
							 
							
							
							
								
							
								35c89ea4d9 
								
							
								 
							
						 
						
							
							
								
								Big refactor, prekeybundle moved back to a content message  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								Beaudan
							
						 
						
							 
							
							
							
								
							
								b515fc41e7 
								
							
								 
							
						 
						
							
							
								
								Removed some repetetive logs, made the polling time a variable and lower the polling time and PoW difficulty if we are in debug mode  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								Beaudan
							
						 
						
							 
							
							
							
								
							
								b65d6a6d2c 
								
							
								 
							
						 
						
							
							
								
								Refactor friend request status to use a state enum variable  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								Mikunj
							
						 
						
							 
							
							
							
								
							
								9fd822a7e3 
								
							
								 
							
						 
						
							
							
								
								Remove preKeys on friend request decline.  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								Mikunj
							
						 
						
							 
							
							
							
								
							
								0dabce9e28 
								
							
								 
							
						 
						
							
							
								
								Remove preKeyBundle from message.  
							
							 
							
							... 
							
							
							
							Always save preKeyBundles if we receive them.
Always override preKeys when saving. 
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								Mikunj
							
						 
						
							 
							
							
							
								
							
								4bb93e6e3c 
								
							
								 
							
						 
						
							
							
								
								rename sendEmptyMessageWithPreKeys to sendFriendRequestAccepted.  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								Mikunj
							
						 
						
							 
							
							
							
								
							
								dba6a36e83 
								
							
								 
							
						 
						
							
							
								
								removed old unused code.  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								Mikunj
							
						 
						
							 
							
							
							
								
							
								75219966a7 
								
							
								 
							
						 
						
							
							
								
								Fixed preKeyBundle decryption.  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								sachaaaaa
							
						 
						
							 
							
							
							
								
							
								38d5b6e833 
								
							
								 
							
						 
						
							
							
								
								fix log.notice in libloki-protocol.js  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								Beaudan
							
						 
						
							 
							
							
							
								
							
								3aa135fdb4 
								
							
								 
							
						 
						
							
							
								
								Grabbing last hash from server response. only requesting messages after the lasthash. Keeping track of lasthash for array of nodes (currently hardcoded for one)  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								sachaaaaa
							
						 
						
							 
							
							
							
								
							
								ad1cf94526 
								
							
								 
							
						 
						
							
							
								
								ES2015 classes for LokiServer and FallBackSessionCipher  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								sachaaaaa
							
						 
						
							 
							
							
							
								
							
								c605fff58d 
								
							
								 
							
						 
						
							
							
								
								change FRIEND_REQUEST value to prevent clash with upstream  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								BeaudanBrown
							
						 
						
							 
							
							
								
								
							
							
								
							
								9ceb3c8ac0 
								
									
								
							
								 
							
						 
						
							
							
								
								Merge branch 'development' into message-polling  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								Beaudan
							
						 
						
							 
							
							
							
								
							
								c59b196487 
								
							
								 
							
						 
						
							
							
								
								Now reading messages and adding them to conversations. Some cleaning of unreachable code. Modified the message data to be encoded as base64 string before sending to server  
							
							 
							
							... 
							
							
							
							Sending our public key in header of message
Now attaching our key to the source field when sending messages, allows messages to be decrypted with the fallback cypher
Now polling the server for messages every 5 seconds
Sending the source device with messages
Added mock respond function to request to leave it that same as the websocket stuff. RetrieveMessages now just returns the result
Polling now continues if the server responds with an error. Returning only the result from sendMessage and retrieveMessages
Revert commenting of unreachable code
Refactored http logic into own file
Revert a change to websocket-resources 
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								Mikunj
							
						 
						
							 
							
							
							
								
							
								77602e3dbb 
								
							
								 
							
						 
						
							
							
								
								Moved contactPreKey and contactSignedPreKey to sql.  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								sachaaaaa
							
						 
						
							 
							
							
							
								
							
								bf69e9e897 
								
							
								 
							
						 
						
							
							
								
								re-lint proof-of-work  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								sachaaaaa
							
						 
						
							 
							
							
							
								
							
								8a354c8e5c 
								
							
								 
							
						 
						
							
							
								
								Revert dodgy linting on proof-of-work.js  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								sachaaaaa
							
						 
						
							 
							
							
							
								
							
								4b9fcb98d4 
								
							
								 
							
						 
						
							
							
								
								Linting and other housekeeping stuff  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								sachaaaaa
							
						 
						
							 
							
							
								
								
							
							
								
							
								d91f04930c 
								
									
								
							
								 
							
						 
						
							
							
								
								Merge pull request  #21  from loki-project/bugfix/pow-nonce-calc  
							
							 
							
							... 
							
							
							
							Bugfix/pow nonce calc 
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								Beaudan
							
						 
						
							 
							
							
							
								
							
								4598fd222a 
								
							
								 
							
						 
						
							
							
								
								Cleaned up newNonce stuff. Now doing target calculation with BigIntegers  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								sachaaaaa
							
						 
						
							 
							
							
							
								
							
								7b1fbe362e 
								
							
								 
							
						 
						
							
							
								
								Allow choosing language for mnemonic seed  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								sachaaaaa
							
						 
						
							 
							
							
								
								
							
							
								
							
								bbabeb34b8 
								
									
								
							
								 
							
						 
						
							
							
								
								Merge pull request  #18  from sachaaaaa/mnemonic  
							
							 
							
							... 
							
							
							
							Allow registering using a mnemonic word list 
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								Beaudan
							
						 
						
							 
							
							
							
								
							
								7f12746d8c 
								
							
								 
							
						 
						
							
							
								
								Made NONCE_LEN a more globally scoped variable  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								Beaudan
							
						 
						
							 
							
							
							
								
							
								fe3898b9d8 
								
							
								 
							
						 
						
							
							
								
								Reintroduced function to compare Uint8Arrays again because < isn't working as expected (<3 javascript). Fixed some bugs with the way the Uint8Arrays were being manipulated and made some of the logic more clear  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								Beaudan
							
						 
						
							 
							
							
							
								
							
								d4180b3ca6 
								
							
								 
							
						 
						
							
							
								
								Some syntax tidying up, plus fixed bug with message data not being a uint8array after IPC message  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								sachaaaaa
							
						 
						
							 
							
							
							
								
							
								1ce29d77c3 
								
							
								 
							
						 
						
							
							
								
								Moved mnemonic to node side. Added sc_reduce32 (asm) to generate privkey. Moved mnemonic languages to separate files.  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								sachaaaaa
							
						 
						
							 
							
							
								
								
							
							
								
							
								1cf8710127 
								
									
								
							
								 
							
						 
						
							
							
								
								Merge pull request  #16  from sachaaaaa/friend_response  
							
							 
							
							... 
							
							
							
							Handle prekeys in incoming friend request 
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								sachaaaaa
							
						 
						
							 
							
							
							
								
							
								a418a9d23b 
								
							
								 
							
						 
						
							
							
								
								allow registering using a mnemonic word list (seed used as privKey for now)  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								sachaaaaa
							
						 
						
							 
							
							
							
								
							
								93f1534512 
								
							
								 
							
						 
						
							
							
								
								Save prekeys upon reception of friend request. Add function to send an empty message as friend request acceptance  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								Beaudan
							
						 
						
							 
							
							
							
								
							
								dfa8b59bc3 
								
							
								 
							
						 
						
							
							
								
								Using let and const properly, updated number to uint function, general cleaning  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								sachaaaaa
							
						 
						
							 
							
							
							
								
							
								b9dbf11ebc 
								
							
								 
							
						 
						
							
							
								
								Fix various things from previous commits  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								Beaudan
							
						 
						
							 
							
							
							
								
							
								ee57c698d7 
								
							
								 
							
						 
						
							
							
								
								Client side proof of work attached to messages  
							
							 
							
							... 
							
							
							
							Skeleton calcPoW function that prepares payload for hashingFunction to increment Uint8Array nonce
Util function for converting a number to its Uint8Array representation
Actually perform calculate PoW nonce for every message
Adding bytebuffer as dependency and updated package-lock
Move PoW to new file and execute it in child process
TODO: Move send message logic to callback after child process has finished calculating the PoW
Refactored nonce calculation to function to be awaited
More readable timestamp grab plus converted to seconds
Nonce is now returned as a base64 string and included in request header
Also converted timestamp and ttl to string when including them in the header
Added a couple comments and tidied up some nonce logic 
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								sachaaaaa
							
						 
						
							 
							
							
								
								
							
							
								
							
								886f47b8e7 
								
									
								
							
								 
							
						 
						
							
							
								
								Prekeys sending: first pass ( #12 )  
							
							 
							
							... 
							
							
							
							* add 'recipient' attribute in prekey database to allow binding a prekey to a recipient pub key
* Attach a PreKeyBundleMessage to the ContentMessage in fallback encryption mode
* Skip generating 100 prekeys upon registration
* Store the signed key signature in database 
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								sachaaaaa
							
						 
						
							 
							
							
							
								
							
								54201d6665 
								
							
								 
							
						 
						
							
							
								
								fix bad merge: missing FallBackDecryptionError  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								sachaaaaa
							
						 
						
							 
							
							
							
								
							
								eb488f9305 
								
							
								 
							
						 
						
							
							
								
								fix bad merge in libloki-protocol  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								sachaaaaa
							
						 
						
							 
							
							
							
								
							
								0283c6428f 
								
							
								 
							
						 
						
							
							
								
								Ignore friend request messages that could not be decrypted  
							
							 
							
							
							
						 
						
							7 years ago  
						
					 
				
					
						
							
							
								 
								sachaaaaa
							
						 
						
							 
							
							
							
								
							
								04b45f6aa1 
								
							
								 
							
						 
						
							
							
								
								Decrypt friend-request messages (the ones using fallback encryption). Moved logic into a new file libloki-protocol.js and concat loki code into js/libloki.js  
							
							 
							
							
							
						 
						
							7 years ago