mirror of
https://github.com/ntop/n2n.git
synced 2024-09-19 00:21:11 +02:00
iwym: pearson.h
This commit is contained in:
parent
04ce678969
commit
15ad901b41
|
@ -17,10 +17,8 @@
|
|||
*/
|
||||
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "portable_endian.h"
|
||||
#include <stddef.h> // for size_t
|
||||
#include <stdint.h> // for uint8_t, uint16_t, uint32_t, uint64_t
|
||||
|
||||
|
||||
void pearson_hash_256 (uint8_t *out, const uint8_t *in, size_t len);
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "auth.h" // for generate_private_key, generate_p...
|
||||
#include "n2n.h"
|
||||
#include "pearson.h" // for pearson_hash_64
|
||||
|
||||
/* *************************************************** */
|
||||
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
|
||||
#include "auth.h" // for generate_private_key
|
||||
#include "header_encryption.h" // for packet_header_encrypt, packet_he...
|
||||
#include "n2n.h"
|
||||
#include "n2n.h" // for n2n_edge_t, peer_info, n2n_edge_...
|
||||
#include "pearson.h" // for pearson_hash_128, pearson_hash_64
|
||||
#include "network_traffic_filter.h"
|
||||
#include "edge_utils_win32.h"
|
||||
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
|
||||
|
||||
#include "header_encryption.h" // for packet_header_change_dynamic_key, pac...
|
||||
#include "n2n.h"
|
||||
#include "n2n.h" // for he_context_t, N2N_COMMUNITY_SIZE, TRA...
|
||||
#include "pearson.h" // for pearson_hash_128, pearson_hash_64
|
||||
|
||||
|
||||
#define HASH_FIND_COMMUNITY(head, name, out) HASH_FIND_STR(head, name, out)
|
||||
|
|
|
@ -9,6 +9,9 @@
|
|||
#include <netdb.h>
|
||||
#endif
|
||||
|
||||
#include <pearson.h> // for pearson_hash_64
|
||||
#include "n2n.h" // for TRACE_DEBUG, traceEvent
|
||||
|
||||
// TODO: move logging defs in their own header and include that
|
||||
void setTraceLevel (int level);
|
||||
int getTraceLevel ();
|
||||
|
@ -16,8 +19,6 @@ int getTraceLevel ();
|
|||
#include <pearson.h>
|
||||
#include "management.h"
|
||||
|
||||
#include "n2n.h" // for traceEvent and friends
|
||||
|
||||
ssize_t send_reply (mgmt_req_t *req, strbuf_t *buf, size_t msg_len) {
|
||||
// TODO: better error handling (counters?)
|
||||
return sendto(req->mgmt_sock, buf->str, msg_len, 0,
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
|
||||
#include "pearson.h"
|
||||
#include "portable_endian.h" // for le64toh, htobe64
|
||||
|
||||
|
||||
// Christopher Wellons' triple32 from https://github.com/skeeto/hash-prospector
|
||||
|
|
|
@ -16,9 +16,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "auth.h" // for ascii_to_bin, calculate_dynamic_key
|
||||
#include "header_encryption.h" // for packet_header_encrypt, packet_header_...
|
||||
#include "n2n.h"
|
||||
#include "n2n.h" // for sn_community, n2n_sn_t, peer_info
|
||||
#include "pearson.h" // for pearson_hash_128, pearson_hash_32
|
||||
|
||||
|
||||
#define HASH_FIND_COMMUNITY(head, name, out) HASH_FIND_STR(head, name, out)
|
||||
|
||||
|
|
|
@ -18,7 +18,10 @@
|
|||
|
||||
/* Supernode for n2n-2.x */
|
||||
|
||||
#include "n2n.h"
|
||||
|
||||
#include "n2n.h" // for n2n_sn_t, sn_community, traceEvent
|
||||
#include "pearson.h" // for pearson_hash_64
|
||||
|
||||
|
||||
#define HASH_FIND_COMMUNITY(head, name, out) HASH_FIND_STR(head, name, out)
|
||||
|
||||
|
|
|
@ -17,7 +17,8 @@
|
|||
*/
|
||||
|
||||
|
||||
#include "n2n.h"
|
||||
#include "n2n.h" // for n2n_trans_op_t, traceEvent, TRACE_ERROR
|
||||
#include "pearson.h" // for pearson_hash_256
|
||||
|
||||
|
||||
// size of random value prepended to plaintext defaults to AES BLOCK_SIZE;
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
|
||||
|
||||
#include "cc20.h" // for CC20_IV_SIZE, cc20_crypt, cc20_deinit
|
||||
#include "n2n.h"
|
||||
#include "n2n.h" // for n2n_trans_op_t, traceEvent, TRACE_ERROR
|
||||
#include "pearson.h" // for pearson_hash_256
|
||||
|
||||
|
||||
// ChaCha20 plaintext preamble
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
*/
|
||||
|
||||
|
||||
#include "n2n.h"
|
||||
|
||||
#include "n2n.h" // for n2n_trans_op_t, traceEvent, TRACE_DEBUG
|
||||
#include "pearson.h" // for pearson_hash_256
|
||||
|
||||
// Speck plaintext preamble
|
||||
#define TRANSOP_SPECK_PREAMBLE_SIZE (N2N_SPECK_IVEC_SIZE)
|
||||
|
|
|
@ -17,7 +17,8 @@
|
|||
*/
|
||||
|
||||
|
||||
#include "n2n.h"
|
||||
#include "n2n.h" // for n2n_trans_op_t, traceEvent, TRACE_ERROR
|
||||
#include "pearson.h" // for pearson_hash_256
|
||||
|
||||
|
||||
// size of random value prepended to plaintext defaults to TF_BLOCK_SIZE;
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#include "n2n.h"
|
||||
#include "n2n.h" // for n2n_trans_op_t, n2n_common_t, n2n_edge_conf_t
|
||||
#include "pearson.h" // for pearson_hash_64, pearson_hash_init
|
||||
|
||||
#define DURATION 2.5 // test duration per algorithm
|
||||
#define PACKETS_BEFORE_GETTIME 2047 // do not check time after every packet but after (2 ^ n - 1)
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
#include <inttypes.h>
|
||||
|
||||
#include "n2n.h"
|
||||
#include "hexdump.h"
|
||||
#include "hexdump.h" // for fhexdump
|
||||
#include "pearson.h" // for pearson_hash_128, pearson_hash_16, pearson_has...
|
||||
|
||||
|
||||
uint8_t PKT_CONTENT[]={
|
||||
|
|
Loading…
Reference in New Issue
Block a user