Displaying 1 result from an estimated 1 matches for "interval_ns".
2023 Sep 07
1
Privacy improving suggestions for ObscureKeystrokeTiming
...522,33 @@ send_chaff(struct ssh *ssh)
return 1;
}
+/* Sets the next interval to send a keystroke or chaff packet */
+static void
+set_next_interval(const struct timespec *now, struct timespec *next_interval,
+ u_int interval_ms, u_int interval_fuzz_pct)
+{
+ struct timespec tmp;
+ long long interval_ns, fuzz_ns;
+
+ interval_ns = interval_ms * (1000LL * 1000);
+ fuzz_ns = (interval_ns * interval_fuzz_pct) / 100;
+ /* Center fuzz around requested interval */
+ if (fuzz_ns > INT_MAX)
+ fuzz_ns = INT_MAX;
+ if (fuzz_ns > interval_ns) {
+ /* Shouldn't happen */
+ fatal_f("internal e...