New Encryption Algorithm
An AC sends "BLiND is a brand new encryption algorithm which is fast, and very easy to implement. Check it out at freshmeat. This is... well... good for a laugh at least." Unfortunately you'll have to download the source and take a look at enc.c to get the joke. I think Lotus uses this level of encryption in some of their products...
They shoulda named it BLoNDe.
And, no, the Lotus security doesn't suck that much.
I was expecting something funny - like maybe the encryptor portion of the code changed everything to spaces (hence, the name - it's encrypted when you can't see it). But instead, we see this.
It looks like a simple substitution cypher - easy to break via frequency analysis. Might be useful in simple contexts, but I wouldn't trust this for any 'real' security uses.
On top of it all, the code is awful - since it is just a substitution cypher, why not set up a couple of global arrays of chars for the input and output substitution strings, key into the input, and output the character at that position? This guy's way of using a TON of 'if' statements just glares at me.
Finally (and this may be because my C is rusty), he declares the variable 'c' in the function as an int, but then later tries to compare (in the 'if' statements) 'c' to a character (ie, if(c=='a') fputc('~', dst);) - unless 'a' evaluates in the end to 65, and that is what you are comparing to (which, when I think about it, may be what it does).
The code also doesn't look quite right - like the syntax is wrong, and it would blow up massively on first compile. I haven't tried compiling it yet, so it may be fine (like I said, my C is rusty)...
Maybe this is the joke, and I am just stupid.
At first I thought it was some kind of encryption for safety... but it seems that it is only encryption for making things harder to read for humans...
(Kinda like ROT13, but the replacement scheme seems to be more complex...)
I just wonder:
Do we really need a thing like this?
--
Ner lbh sebz gur HFN? Gura lbh'ir whfg ivbyngrq gur QZPN!
I'm too lazy to translate this into 2 lines or less of perl. Maybe someone wants to do so, just for the possible karma?
Seems tr(1) would suffice, too...
<sigh>
--
It's pretty pathetic when karma can drop when you do nothing
"The urge to save humanity is almost always a false front for the urge to rule." --H.L. Mencken
{
const char Low='/';
const char High='z';
for(int x=0;x<val.length()-1;x++)
{
char Letter=val[x];
if((Letter>=Low)&&(Letter<=High))
{
for(int index=38;index>0;index--)//shift chars 38 in ASCII
{
Letter=Letter+1;
if(Letter==High+1)
Letter=Low;
}
val[x]=~Letter;//invert after shift
}
}
return(val);
}
And my comments are in english
--
Spelling by m-w.com.
Had the author even looked at any crypto-book (e.g. Schneier's "Applied Cryptography" or Menezes's "Handbook of Applied Cryptography"), he'd never posted the algorithm.