# numbers_log for 007-unit7-security (rerun 2026-10-11 02:10)

===== analysis_numbers.py (exit 0, 1.1 s)
-- passwords (bits, expected guesses, time at 1e3 / 1e6 / 1e9 guesses per second)
4-digit PIN               13.29 bits  guesses 5e+03  times s: 5 0.005 5e-06  years at 1e9/s: 1.58e-13
8 lowercase letters       37.60 bits  guesses 1.04e+11  times s: 1.04e+08 1.04e+05 104  years at 1e9/s: 3.31e-06
8 mixed alnum             47.63 bits  guesses 1.09e+14  times s: 1.09e+11 1.09e+08 1.09e+05  years at 1e9/s: 0.00346
12 random alnum           71.45 bits  guesses 1.61e+21  times s: 1.61e+18 1.61e+15 1.61e+12  years at 1e9/s: 5.11e+04
one of Mirai's 62 pairs    5.95 bits  guesses 31  times s: 0.031 3.1e-05 3.1e-08  years at 1e9/s: 9.82e-16
-- dictionary coverage of Zipf(1) over 200 default credentials: {1: 0.17, 5: 0.388, 10: 0.498, 20: 0.612, 62: 0.802, 100: 0.883, 200: 1.0}
-- HMAC experiments
100000 random envelopes accepted: 0 ; expected 5.421010862427522e-15
single-bit flips accepted: 0 of 184
replay: (False, 'replay')  first use: (True, 'ok')  wrong device key: (False, 'bad_tag')
envelope overhead: 4-byte counter + 8-byte tag = 12 bytes on top of the command; message 23 bytes for an 11-byte command
tag  2 B: forgery per guess 1.53e-05  expected guesses 6.55e+04  at 100 guesses/s: 0.00759 days = 2.08e-05 years
tag  4 B: forgery per guess 2.33e-10  expected guesses 4.29e+09  at 100 guesses/s: 497 days = 1.36 years
tag  8 B: forgery per guess 5.42e-20  expected guesses 1.84e+19  at 100 guesses/s: 2.14e+12 days = 5.84e+09 years
tag 16 B: forgery per guess 2.94e-39  expected guesses 3.4e+38  at 100 guesses/s: 3.94e+31 days = 1.08e+29 years
-- TLS meter (self-signed single certificate, OpenSSL in memory, 31-byte application record)
ec TLS1.3: cert 324 B | full 327+1204=1531 B, 1 RTT | resumed 598+496=1094 B, 1 RTT | record overhead 22 B
ec TLS1.2: cert 325 B | full 282+782=1064 B, 2 RTT | resumed 568+141=709 B, 1 RTT | record overhead 29 B
rsa TLS1.3: cert 722 B | full 327+1788=2115 B, 1 RTT | resumed 598+496=1094 B, 1 RTT | record overhead 22 B
rsa TLS1.2: cert 722 B | full 282+1363=1645 B, 2 RTT | resumed 568+141=709 B, 1 RTT | record overhead 29 B
MQTT fresh QoS 1 plain: 540 B; plus TLS 1.3 ECDSA full handshake:  2073 B, ratio 3.84
-- Ed25519 sizes (bytes): manifest 104 = 4 version + 4 length + 32 hash + 64 signature; public key 32
public key bytes: 32  signature bytes: 64
genuine update, newer version      -> (True, 'ok')
one image byte changed             -> (False, 'bad_hash')
signed by another key              -> (False, 'bad_signature')
old version replayed (rollback)    -> (False, 'rollback')
manifest version edited            -> (False, 'bad_signature')
image truncated                    -> (False, 'bad_length')
SHA-256 of 200 kB image: manifest signs only 40 bytes, so signing cost does not grow with image size
-- ACL matrix
node1 [1, 0, 0, 0, 0, 0]
rover [0, 0, 1, 0, 0, 1]
dashboard [0, 1, 0, 1, 1, 1]
stranger [0, 0, 0, 0, 0, 0]

===== fig01_stride.py (exit 0, 0.7 s)


===== fig02_passwords.py (exit 0, 0.9 s)


===== fig03_hmac.py (exit 0, 1.5 s)
genuine command (counter 10) -> True ok
one bit of the command flipped -> False bad_tag
command text edited, tag kept -> False bad_tag
same envelope replayed -> False replay
signed with another device's key -> False bad_tag
tag shortened by one byte -> False bad_tag
old counter, valid tag -> False replay

===== fig04_tls.py (exit 0, 1.0 s)
ECDSA TLS 1.3 full 327 1206
ECDSA TLS 1.2 full 282 779
RSA-2048 TLS 1.3 full 327 1788
RSA-2048 TLS 1.2 full 282 1363

===== fig05_ota_acl.py (exit 0, 0.9 s)
genuine, newer version -> True ok
one image byte changed -> False bad_hash
signed by another key -> False bad_signature
old version (rollback) -> False rollback
manifest version edited -> False bad_signature
image truncated -> False bad_length

===== fig06_privacy.py (exit 0, 1.6 s)
window 1 min: identify kettle vs heater 100.0 percent; detect that something happened 100.0 percent
window 2 min: identify kettle vs heater 100.0 percent; detect that something happened 100.0 percent
window 3 min: identify kettle vs heater 100.0 percent; detect that something happened 100.0 percent
window 5 min: identify kettle vs heater 100.0 percent; detect that something happened 100.0 percent
window 10 min: identify kettle vs heater 89.5 percent; detect that something happened 100.0 percent
window 15 min: identify kettle vs heater 78.0 percent; detect that something happened 100.0 percent
window 30 min: identify kettle vs heater 61.8 percent; detect that something happened 92.2 percent
