From 875ac9216f1383851a82bd240cadb17c7112f6a8 Mon Sep 17 00:00:00 2001 From: "Neal H. Walfield" Date: Tue, 6 Sep 2016 15:45:38 +0200 Subject: g10: Record and show statistics for encrypted messages when using TOFU * g10/tofu.c: Include "sqrtu32.h". (struct tofu_dbs_s.s): Rename get_trust_gather_other_keys to get_trust_gather_signature_stats. Add new field get_trust_gather_encryption_stats. (initdb): Create the encryptions table. (ask_about_binding): Show the encryption statistics too. (tofu_register): Rename from this... (tofu_register_signature): ... to this and update callers. (tofu_register_encryption): New function. (write_stats_status): Add parameters encryption_count, encryption_first_done and encryption_most_recent. Update callers. Compute the trust using the euclidean distance of the signature and signature count. Compare with twice the threshold. Include encryption count information in the TFS and TOFU_STATS lines. (show_statistics): Also get information about the encrypted messages. * g10/trustdb.c (tdb_get_validity_core): Use it. -- Signed-off-by: Neal H. Walfield --- doc/DETAILS | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/DETAILS b/doc/DETAILS index cf779d27d..b5431d004 100644 --- a/doc/DETAILS +++ b/doc/DETAILS @@ -238,8 +238,10 @@ pkd:0:1024:B665B1435F4C2 .... FF26ABB: - Field 4 :: signcount - The number of signatures seen. - Field 5 :: encrcount - The number of encryptions done. - Field 6 :: policy - A string with the policy - - Field 7 :: first-seen - a timestamp or 0 if not known. - - Field 8 :: most-recent-seen - a timestamp or 0 if not known. + - Field 7 :: signture-first-seen - a timestamp or 0 if not known. + - Field 8 :: signature-most-recent-seen - a timestamp or 0 if not known. + - Field 9 :: encryption-first-done - a timestamp or 0 if not known. + - Field 10 :: encryption-most-recent-done - a timestamp or 0 if not known. *** TRU - Trust database information Example for a "tru" trust base record: @@ -715,7 +717,7 @@ pkd:0:1024:B665B1435F4C2 .... FF26ABB: userid encoded in UTF-8 and percent escaped. The fingerprint is indentical for all TOFU_USER lines up to a NEWSIG line. -*** TOFU_STATS 0 [ [ ]] +*** TOFU_STATS 0 [ [ ]] Statistics for the current user id. @@ -734,9 +736,11 @@ pkd:0:1024:B665B1435F4C2 .... FF26ABB: - ask :: Policy is "ask" - unknown :: Policy is not known. - TM1 ist the time the first messages was verified. TM2 is the time - the most recent message was verified. Both may either be seconds - since Epoch or an ISO time string (yyyymmddThhmmss). + TM1 ist the time the first message was verified. TM2 is the time + the most recent message was verified. TM3 is the time the first + message was encrypted. TM4 is the most recent encryption. All may + either be seconds since Epoch or an ISO time string + (yyyymmddThhmmss). *** TOFU_STATS_SHORT -- cgit v1.2.3