CTCP SED
The revised CTCP specification compiled by Ben Mesander in ’94 mentions CTCP extended data tag SED which was used for encrypted messages but he wrote he didn't have any reference for it.
SED stands for Simple Encrypted Data and it was introduced by ircII 2.1 together with CTCP to exchange encrypted messages.
Rudimentary encryption support was present in ircII even before CTCP. It required user to configure external program to preform actual encryption and then transmitted encrypted messages prefixed with ^C^R^Y^P^T and with ad-hoc escaping similar to the one used later in CTCP.
IrcII 2.1 introduced CTCP and encrypted messages would then look like this:
<!-- .ctrl-2cf947adcc { color: #050; background: #eee; } -->
^ASED encrypted-data^A
The payload would be encrypted with then-introduced SED cipher or again using external program.
SED was a trivial repeating-key XOR cipher that can be succinctly described with the following C code which encrypts buffer of given length in place using null-terminated key provided by user for given target nick or channel:
void sed_encrypt(char *buf, int len, const char *key) { int i, key_len = strlen(key); for (i = 1; i < len; i++) buf[i] ^= buf[i - 1]; for (i = 0; i < len; i++) buf[i] ^= key[i % key_len]; }
I paraphrased the code slightly to make it more obvious what it does and that it offers absolutely no security at all, but it's functionally equivalent to encrypt function from source/crypt.c in 2.1.4e or to sed_encrypt_str in 20030709.
Later (version 4.4I), it was replaced by CAST5 encryption (CTCP CAST128ED-CBC) and by version 20040216, support for SED “cipher” was altogether removed from ircII codebase.











