Testing stuff
This commit is contained in:
		
							parent
							
								
									aed36dab90
								
							
						
					
					
						commit
						0249ac35eb
					
				| @ -133,13 +133,13 @@ bool CryptionHandler::setupSharedSecretNew(const std::string &alpha, const std:: | |||||||
| 	uint8_t shared[32]; | 	uint8_t shared[32]; | ||||||
| 	uint8_t shared_iv[64]; | 	uint8_t shared_iv[64]; | ||||||
| 
 | 
 | ||||||
| 	//ed25519_key_exchange(shared, (uint8_t*) publicKey, (uint8_t*) privateKey);
 | 	ed25519_key_exchange(shared, (uint8_t*) publicKey, (uint8_t*) privateKey); | ||||||
| 	keyMul(shared, reinterpret_cast<const uint8_t *>(publicKey), reinterpret_cast<const uint8_t *>(privateKey), true); //Remote key get negated
 | 	keyMul(shared, reinterpret_cast<const uint8_t *>(publicKey), reinterpret_cast<const uint8_t *>(privateKey), true); //Remote key get negated
 | ||||||
| 	digest::sha512((char*) shared, 32, shared_iv); | 	digest::sha512((char*) shared, 32, shared_iv); | ||||||
| 
 | 
 | ||||||
| 	auto xor_key = alpha + beta; | 	auto xor_key = alpha + beta; | ||||||
| 	for(int i = 0; i < 64; i++) | 	for(int i = 0; i < 64; i++) | ||||||
| 		shared_iv[i] ^= (uint8_t) xor_key[i]; | 		shared_iv[i] ^= xor_key[i]; | ||||||
| 
 | 
 | ||||||
| 	{ | 	{ | ||||||
| 		lock_guard lock(this->cache_key_lock); | 		lock_guard lock(this->cache_key_lock); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user