mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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 <neal@g10code.com>
This commit is contained in:
parent
a9e6db6c7e
commit
875ac9216f
6 changed files with 474 additions and 229 deletions
16
doc/DETAILS
16
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 <validity> <sign-count> 0 [<policy> [<tm1> <tm2>]]
|
||||
*** TOFU_STATS <validity> <sign-count> 0 [<policy> [<tm1> <tm2> <tm3> <tm4>]]
|
||||
|
||||
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 <long_string>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue