Displaying 1 result from an estimated 1 matches for "timespecadd".
2023 Sep 07
1
Privacy improving suggestions for ObscureKeystrokeTiming
...;internal error: fuzz %u%% %lldns > interval %lldns",
+ interval_fuzz_pct, fuzz_ns, interval_ns);
+ }
+ interval_ns -= fuzz_ns / 2;
+ interval_ns += arc4random_uniform(fuzz_ns);
+
+ tmp.tv_sec = interval_ns / (1000 * 1000 * 1000);
+ tmp.tv_nsec = interval_ns % (1000 * 1000 * 1000);
+
+ timespecadd(now, &tmp, next_interval);
+}
+
/*
* Performs keystroke timing obfuscation. Returns non-zero if the
* output fd should be polled.
@@ -586,8 +616,9 @@ obfuscate_keystroke_timing(struct ssh *ssh, struct timespec *timeout,
options.obscure_keystroke_timing_interval);
just_started = h...