From 61682d3405e6b7c72ec8295fec1467333e336b65 Mon Sep 17 00:00:00 2001 Message-Id: <61682d3405e6b7c72ec8295fec1467333e336b65.1714914346.git.mdw@distorted.org.uk> From: Mark Wooding Date: Wed, 25 Jan 2012 00:43:14 +0000 Subject: [PATCH] server/keyexch.c: Prefix crypto-details trace messages correctly. Organization: Straylight/Edgeware From: Mark Wooding --- server/keyexch.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/server/keyexch.c b/server/keyexch.c index 8eaf1e88..4280f86e 100644 --- a/server/keyexch.c +++ b/server/keyexch.c @@ -133,14 +133,14 @@ static octet *mpmask(buf *b, mp *x, size_t n, const octet *k, size_t ksz) return (0); mgf = GC_INIT(algs.mgf, k, ksz); IF_TRACING(T_KEYEXCH, IF_TRACING(T_CRYPTO, { - trace(T_CRYPTO, "masking index = %s", mpstr(x)); - trace_block(T_CRYPTO, "masking key", k, ksz); + trace(T_CRYPTO, "crypto: masking index = %s", mpstr(x)); + trace_block(T_CRYPTO, "crypto: masking key", k, ksz); })) mp_storeb(x, buf_t, n); GC_ENCRYPT(mgf, buf_t, p, n); IF_TRACING(T_KEYEXCH, IF_TRACING(T_CRYPTO, { - trace_block(T_CRYPTO, "index plaintext", buf_t, n); - trace_block(T_CRYPTO, "masked ciphertext", p, n); + trace_block(T_CRYPTO, "crypto: index plaintext", buf_t, n); + trace_block(T_CRYPTO, "crypto: masked ciphertext", p, n); })) GC_DESTROY(mgf); return (p); @@ -166,14 +166,14 @@ static mp *mpunmask(mp *d, const octet *p, size_t n, mgf = GC_INIT(algs.mgf, k, ksz); IF_TRACING(T_KEYEXCH, IF_TRACING(T_CRYPTO, { - trace_block(T_CRYPTO, "unmasking key", k, ksz); - trace_block(T_CRYPTO, "masked ciphertext", p, n); + trace_block(T_CRYPTO, "crypto: unmasking key", k, ksz); + trace_block(T_CRYPTO, "crypto: masked ciphertext", p, n); })) GC_DECRYPT(mgf, p, buf_t, n); d = mp_loadb(d, buf_t, n); IF_TRACING(T_KEYEXCH, IF_TRACING(T_CRYPTO, { - trace_block(T_CRYPTO, "index plaintext", buf_t, n); - trace(T_CRYPTO, "unmasked index = %s", mpstr(d)); + trace_block(T_CRYPTO, "crypto: index plaintext", buf_t, n); + trace(T_CRYPTO, "crypto: unmasked index = %s", mpstr(d)); })) GC_DESTROY(mgf); return (d); @@ -209,12 +209,12 @@ static const octet *hashcheck(ge *kpub, ge *cc, ge *c, ge *y) hashge(h, y); GH_DONE(h, buf_t); IF_TRACING(T_KEYEXCH, IF_TRACING(T_CRYPTO, { - trace(T_CRYPTO, "computing challenge check hash"); - trace(T_CRYPTO, "public key = %s", gestr(gg, kpub)); - trace(T_CRYPTO, "receiver challenge = %s", gestr(gg, cc)); - trace(T_CRYPTO, "sender challenge = %s", gestr(gg, c)); - trace(T_CRYPTO, "sender reply = %s", gestr(gg, y)); - trace_block(T_CRYPTO, "hash output", buf_t, algs.hashsz); + trace(T_CRYPTO, "crypto: computing challenge check hash"); + trace(T_CRYPTO, "crypto: public key = %s", gestr(gg, kpub)); + trace(T_CRYPTO, "crypto: receiver challenge = %s", gestr(gg, cc)); + trace(T_CRYPTO, "crypto: sender challenge = %s", gestr(gg, c)); + trace(T_CRYPTO, "crypto: sender reply = %s", gestr(gg, y)); + trace_block(T_CRYPTO, "crypto: hash output", buf_t, algs.hashsz); })) GH_DESTROY(h); return (buf_t); -- [mdw]