X-Git-Url: https://git.distorted.org.uk/~mdw/tripe/blobdiff_plain/c70a7c5cedab62209640b76f03d97c1876e38dc6..47828bd9813b146e8569355b3083847299dd8729:/server/keyset.c diff --git a/server/keyset.c b/server/keyset.c index 1d7817c8..9429fa4a 100644 --- a/server/keyset.c +++ b/server/keyset.c @@ -9,19 +9,18 @@ * * This file is part of Trivial IP Encryption (TrIPE). * - * TrIPE is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * TrIPE is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at your + * option) any later version. * - * TrIPE is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * TrIPE is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. * * You should have received a copy of the GNU General Public License - * along with TrIPE; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * along with TrIPE. If not, see . */ /*----- Header files ------------------------------------------------------*/ @@ -83,7 +82,7 @@ static int doencrypt(keyset *ks, unsigned ty, buf *b, buf *bb) IF_TRACING(T_KEYSET, { trace(T_KEYSET, - "keyset: encrypting packet %lu (type %u) using keyset %u", + "keyset: encrypting packet %lu (type 0x%02x) using keyset %u", (unsigned long)ks->oseq, ty, ks->seq); trace_block(T_CRYPTO, "crypto: plaintext packet", BCUR(b), sz); }) @@ -135,7 +134,7 @@ static int dodecrypt(keyset *ks, unsigned ty, buf *b, buf *bb, uint32 *seq) IF_TRACING(T_KEYSET, { trace(T_KEYSET, - "keyset: try decrypting packet (type %u) using keyset %u", + "keyset: try decrypting packet (type 0x%02x) using keyset %u", ty, ks->seq); trace_block(T_CRYPTO, "crypto: ciphertext packet", BCUR(b), BLEFT(b)); }) @@ -220,7 +219,7 @@ void ks_derivekey(octet *k, size_t ksz, const struct rawkey *rk, GH_DESTROY(h); IF_TRACING(T_KEYSET, { IF_TRACING(T_CRYPTO, { char _buf[32]; - sprintf(_buf, "crypto: %s key %s", dir ? "incoming" : "outgoing", what); + sprintf(_buf, "crypto: %s key %s", dir ? "outgoing" : "incoming", what); trace_block(T_CRYPTO, _buf, k, ksz); }) }) } @@ -239,9 +238,8 @@ void ks_derivekey(octet *k, size_t ksz, const struct rawkey *rk, * the key material; between @k + x@ and @k + y@ is `your' * contribution; and between @k + y@ and @k + z@ is a shared * value we made together. These are used to construct two - * pairs of symmetric keys. Each pair consists of an encryption - * key and a message authentication key. One pair is used for - * outgoing messages, the other for incoming messages. + * collections of symmetric keys: one for outgoing messages, the + * other for incoming messages. * * The new key is marked so that it won't be selected for output * by @ksl_encrypt@. You can still encrypt data with it by