Sunday, December 25, 2016

If Putin's His Bro, Why Begin a New Arm's Race?


Trump blustering out another incomprehensible, threatening, ambiguous tweet launching another cold war with Russia?

Not so fast. Remember, Putin is the fellow who Trump owes his victory in the United States.

If instead of assuming that each is advancing their peoples stature with their aggressive nuclear policy, assume for a moment that each other's sole mutually agreed upon policy is to simply accumulate unimaginable personal wealth and power.

Their entire country means absolutely nothing to them. They don't care about immigrants, walls, Syria, lebensraum, swamps, NATO, healthcare, or the future--except as a means of helping each other enrich himself using their positions of political power driven by their people’s emotions.

Each ostensibly threatens the other. The populace shrinks back in horror of apocalyptic nuclear hell. Then, just before new elections--breakthrough! Putin signs comprehensive weapons control and non-aggression pact with the West.

The populace swoons! The alt-reich shouts that Trump was the great peacemaker! He wins by a landslide.

Add a similar ploy with China with trade agreements and perhaps select European capitals, whose only common denominator is that each is run by a far-right plutocrat willing to play along with the game of manipulating public opinion to aggrandize themselves and each other.


The first ever trans-national oligarchy. Now everything is clear. The country's people are slowly ground down for personal wealth never before seen on the planet. Heil Trump!

Saturday, August 13, 2016

The Unbearable Lightness of Title Generators. Seed: Clickbait



Apply These 10 Secret Techniques To Improve Clickbait
Believing These 10 Myths About Clickbait Keeps You From Growing
Don’t Waste Time! 10 Facts Until You Reach Your Clickbait
How 10 Things Will Change The Way You Approach Clickbait
Clickbait Awards: 10 Reasons Why They Don’t Work & What You Can Do About It
Clickbait Doesn't Have To Be Hard. Read These 10 Tips
Clickbait Is Your Worst Enemy. 10 Ways To Defeat It
Clickbait On A Budget: 10 Tips From The Great Depression
Knowing These 10 Secrets Will Make Your Clickbait Look Amazing
Master The Art Of Clickbait With These 10 Tips
My Life, My Job, My Career: How 10 Simple Clickbait Helped Me Succeed
Take Advantage Of Clickbait - Read These 10 Tips
The Next 10 Things You Should Do For Clickbait Success
The Time Is Running Out! Think About These 10 Ways To Change Your Clickbait
The 10 Best Things About Clickbait
The 10 Biggest Clickbait Mistakes You Can Easily Avoid
The 10 Most Successful Clickbait Companies In Region
Think Your Clickbait Is Safe? 10 Ways You Can Lose It Today
Thinking About Clickbait? 10 Reasons Why It’s Time To Stop!
10 Places To Get Deals On Clickbait
10 Reasons People Laugh About Your Clickbait
10 Amazing Clickbait Hacks
10 Awesome Tips About Clickbait From Unlikely Sources
10 Creative Ways You Can Improve Your Clickbait
10 Easy Steps To More Clickbait Sales
10 Effective Ways To Get More Out Of Clickbait
10 Enticing Ways To Improve Your Clickbait Skills
10 Examples Of Clickbait
10 Facts Everyone Should Know About Clickbait
10 Guilt Free Clickbait Tips
10 Incredible Clickbait Examples
10 Incredible Clickbait Transformations
10 Key Tactics The Pros Use For Clickbait
10 Clickbait April Fools
10 Clickbait Mistakes That Will Cost You $1m Over The Next 10 Years
10 Clickbait You Should Never Make
10 Life-saving Tips About Clickbait
10 Little Known Ways To Make The Most Out Of Clickbait
10 Mesmerizing Examples Of Clickbait
10 Most Well Guarded Secrets About Clickbait
10 Must-haves Before Embarking On Clickbait
10 Places To Look For A Clickbait
10 Questions You Need To Ask About Clickbait
10 Reasons Abraham Lincoln Would Be Great At Clickbait
10 Reasons To Love The New Clickbait
10 Reasons Why Having An Excellent Clickbait Is Not Enough
10 Reasons Why You Are Still An Amateur At Clickbait
10 Reasons Your Clickbait Is Not What It Could Be
10 Ridiculously Simple Ways To Improve Your Clickbait
10 Secrets About Clickbait They Are Still Keeping From You
10 Signs You Made A Great Impact On Clickbait
10 Simple Ways The Pros Use To Promote Clickbait
10 Solid Reasons To Avoid Clickbait
10 Steps To Clickbait Of Your Dreams
10 Stories You Didn’t Know About Clickbait
10 Strange Facts About Clickbait
10 Stunning Examples Of Beautiful Clickbait
10 Stylish Ideas For Your Clickbait
10 Super Useful Tips To Improve Clickbait
10 Surprisingly Effective Ways To Clickbait
10 Things To Demystify Clickbait
10 Things You Can Learn From Buddhist Monks About Clickbait
10 Things You Didn't Know About Clickbait
10 Things You Have In Common With Clickbait
10 Things You Must Know About Clickbait
10 Things Your Mom Should Have Taught You About Clickbait
10 Tips About Clickbait You Can't Afford To Miss
10 Tips For Clickbait Success
10 Tips For Clickbait
10 Tips That Will Make You Guru In Clickbait
10 Tips To Reinvent Your Clickbait And Win
10 Tips To Start Building A Clickbait You Always Wanted
10 Tips With Clickbait
10 Tricks About Clickbait You Wish You Knew Before
10 Unforgivable Sins Of Clickbait
10 Unheard Of Ways To Achieve Greater Clickbait
10 Very Simple Things You Can Do To Save Clickbait
10 Warning Signs Of Your Clickbait Demise
10 Ways Create Better Clickbait With The Help Of Your Dog
10 Ways Facebook Destroyed My Clickbait Without Me Noticing
10 Ways Clickbait Can Make You Invincible
10 Ways Sluggish Economy Changed My Outlook On Clickbait
10 Ways To Get Through To Your Clickbait
10 Ways To Immediately Start Selling Clickbait
10 Ways To Keep Your Clickbait Growing Without Burning The Midnight Oil
10 Ways To Master Clickbait Without Breaking A Sweat
10 Ways To Reinvent Your Clickbait
10 Ways Twitter Destroyed My Clickbait Without Me Noticing
10 Ways You Can Get More Clickbait While Spending Less
10 Ways You Can Grow Your Creativity Using Clickbait
10 Ways You Can Reinvent Clickbait Without Looking Like An Amateur
10 Ways You Can Use Clickbait To Become Irresistible To Customers
Using 10 Clickbait Strategies Like The Pros
Warning: These 10 Mistakes Will Destroy Your Clickbait
You Can Thank Us Later - 10 Reasons To Stop Thinking About Clickbait
You Will Thank Us - 10 Tips About Clickbait You Need To Know
Best Clickbait Android Apps
Best Clickbait Tips You Will Read This Year
Best 50 Tips For Clickbait
Should Fixing Clickbait Take 50 Steps?
The A - Z Of Clickbait
The Next 50 Things To Immediately Do About Clickbait
The Ultimate Guide To Clickbait
Top 50 Funny Clickbait Quotes
Top 50 Quotes On Clickbait
Top 10 Lessons About Clickbait To Learn Before You Hit 30
Top 10 Ways To Buy A Used Clickbait
50 Best Ways To Sell Clickbait
50 Ideas For Clickbait
50 Lessons About Clickbait You Need To Learn Before You Hit 40
50 Methods Of Clickbait Domination
50 Things To Do Immediately About Clickbait
50 Tips To Grow Your Clickbait
50 Ways To Avoid Clickbait Burnout
50 Ways To Improve Clickbait
How To Make More Clickbait By Doing Less
How To Make Clickbait
How To Buy A Clickbait On A Shoestring Budget
How To Sell Clickbait
How To Rent A Clickbait Without Spending An Arm And A Leg
How To Learn Clickbait
How To Teach Clickbait
How To Restore Clickbait
How To Use Clickbait To Desire
How To Something Your Clickbait
How To Gain Clickbait
How To Earn $1,000,000 Using Clickbait
How To Lose Clickbait In 10 Days
How To Make Your Clickbait Look Amazing In 10 Days
How To Teach Clickbait Better Than Anyone Else
How To Become Better With Clickbait In 10 Minutes
How To Improve At Clickbait In 60 Minutes
How To Handle Every Clickbait Challenge With Ease Using These Tips
How To Get A Fabulous Clickbait On A Tight Budget
How To Turn Your Clickbait From Blah Into Fantastic
Are You Embarrassed By Your Clickbait Skills? Here’s What To Do
Do You Make These Simple Mistakes In Clickbait?
Do You Need A Clickbait?
Does Clickbait Sometimes Make You Feel Stupid?
I Don't Want To Spend This Much Time On Clickbait. How About You?
If Clickbait Is So Bad, Why Don't Statistics Show It?
Is Clickbait A Scam?
Shhhh... Listen! Do You Hear The Sound Of Clickbait?
Sick And Tired Of Doing Clickbait The Old Way? Read This
Some People Excel At Clickbait And Some Don't - Which One Are You?
10 Amazing Tricks To Get The Most Out Of Your Clickbait
Want An Easy Fix For Your Clickbait? Read This!
Want To Have A More Appealing Clickbait? Read This!
Want To Step Up Your Clickbait? You Need To Read This First
What Are Clickbait?
What Can The Music Industry Teach You About Clickbait
What Can You Do To Save Your Clickbait From Destruction By Social Media?
What Everybody Ought To Know About Clickbait
What Clickbait Experts Don't Want You To Know
What Shakespeare Can Teach You About Clickbait
What The Pentagon Can Teach You About Clickbait
What Your Customers Really Think About Your Clickbait?
What Zombies Can Teach You About Clickbait
Where Is The Best Clickbait?
Who Is Clickbait?
Why Have A Clickbait?
Why Clickbait Is The Only Skill You Really Need
Why You Need A Clickbait
Wondering How To Make Your Clickbait Rock? Read This!
You Make These Clickbait Mistakes?
You Want Clickbait?
Everyone Loves Clickbait
Fall In Love With Clickbait
Clickbait And Love - How They Are The Same
Clickbait And Love Have 10 Things In Common
Kids Love Clickbait
Marriage And Clickbait Have More In Common Than You Think
10 Romantic Clickbait Holidays
10 Romantic Clickbait Ideas
10 Romantic Clickbait Vacations
10 Ways To Make People Fall In Love With Your Product
Use Clickbait To Make Someone Fall In Love With You
Why Kids Love Clickbait
Can Sex Sell Clickbait?
Erotic Clickbait Uses
Gay Men Know The Secret Of Great Sex With Clickbait
Get More And Better Sex With Clickbait
How To Pick Up Women With Clickbait
Clickbait For Great Sex
Sexy Clickbait
The Lesbian Secret Revealed: Clickbait For Great Sex.
10 Sexy Ways To Improve Your Clickbait
10 Ways Clickbait Will Improve Your Sex Life
Albert Einstein On Clickbait
Being A Rockstar In Your Industry Is A Matter Of Clickbait
Charlie Sheen's Guide To Clickbait
Do Clickbait Better Than Seth Godin
Everything I Learned About Clickbait I Learned From Potus
Genghis Khan's Guide To Clickbait Excellence
Houdini's Guide To Clickbait
Joseph's Stalin's Secret Guide To Clickbait
Clickbait And The Mel Gibson Effect
Sun Tzu’s Awesome Tips On Clickbait
The Angelina Jolie Guide To Clickbait
The Justin Bieber Guide To Clickbait
What Donald Trump Can Teach You About Clickbait
What Google Can Teach You About Clickbait
What Oprah Can Teach You About Clickbait
What The Dalai Lama Can Teach You About Clickbait
What The Pope Can Teach You About Clickbait
What Warren Buffett Can Teach You About Clickbait
What You Can Learn From Tiger Woods About Clickbait
Cracking The Clickbait Code
Cracking The Clickbait Secret
Give Me 10 Minutes, I'll Give You The Truth About Clickbait
Clickbait Secrets Revealed
Clickbait Secrets
Omg! The Best Clickbait Ever!
Secrets Your Parents Never Told You About Clickbait
The Hidden Mystery Behind Clickbait
The Clickbait Mystery
The Mayans’ Lost Guide To Clickbait
The Secret Behind Clickbait
The Secret Guide To Clickbait
The Secret History Of Clickbait
The Secret Life Of Clickbait
The Secret Of Clickbait
The Truth About Clickbait In 3 Little Words
The Ultimate Secret Of Clickbait
10 Clickbait Secrets You Never Knew
What Everyone Ought To Know About Clickbait
Who Else Wants To Know The Mystery Behind Clickbait?
You, Me And Clickbait: The Truth
 10 Reasons Clickbait Is A Waste Of Time
Beware The Clickbait Scam
Congratulations! Your Clickbait Is About To Stop Being Relevant
Create A Clickbait A High School Bully Would Be Afraid Of
Don’t Be Fooled By Clickbait
Don’t Fall For This Clickbait Scam
How Clickbait Made Me A Better Salesperson Than You
How To Be Happy At Clickbait - Not!
How To Deal With A Very Bad Clickbait
How To Lose Money With Clickbait
How To Slap Down A Clickbait
In 10 Minutes, I'll Give You The Truth About Clickbait
It’s About The Clickbait, Stupid!
Clickbait Smackdown!
Lies And Damn Lies About Clickbait
Most People Will Never Be Great At Clickbait. Read Why
Never Changing Clickbait Will Eventually Destroy You
Rules Not To Follow About Clickbait
Slacker’s Guide To Clickbait
The Lazy Man's Guide To Clickbait
The Mafia Guide To Clickbait
10 Lies Clickbaits Tell
10 Mistakes In Clickbait That Make You Look Dumb
10 Myths About Clickbait
10 Ridiculous Rules About Clickbait
10 Rules About Clickbait Meant To Be Broken
10 Surefire Ways Clickbait Will Drive Your Business Into The Ground
10 Things A Child Knows About Clickbait That You Don’t
10 Ways A Clickbait Lies To You Everyday
10 Ways Clickbait Can Drive You Bankrupt - Fast!
What Ancient Greeks Knew About Clickbait That You Still Don't
What You Should Have Asked Your Teachers About Clickbait
Why Everything You Know About Clickbait Is A Lie
Why I Hate Clickbait
Why Most Clickbait Fail
Why My Clickbait Is Better Than Yours
Why You Never See A Clickbait That Actually Works
Fascinating Clickbait Tactics That Can Help Your Business Grow
How Green Is Your Clickbait?
How To Get Clickbait For Under $100
How To Make Your Product The Ferrari Of Clickbait
How To Start A Business With Only Clickbait
Clickbait Is Bound To Make An Impact In Your Business
Clickbait Is Crucial To Your Business. Learn Why!
Clickbait Strategies For The Entrepreneurially Challenged
Listen To Your Customers. They Will Tell You All About Clickbait
One Word: Clickbait
Prioritizing Your Clickbait To Get The Most Out Of Your Business
Pump Up Your Sales With These Remarkable Clickbait Tactics
Read These 10 Tips About Clickbait To Double Your Business
The Simple Clickbait That Wins Customers
10 Easy Steps To A Winning Clickbait Strategy
10 Incredibly Useful Clickbait For Small Businesses
10 Tips For Using Clickbait To Leave Your Competition In The Dust
10 Ways Clickbait Will Help You Get More Business
10 Ways You Can Eliminate Clickbait Out Of Your Business
Want A Thriving Business? Avoid Clickbait!
Want A Thriving Business? Focus On Clickbait!
Why Ignoring Clickbait Will Cost You Sales
Why Clickbait Is No Friend To Small Business
You Don't Have To Be A Big Corporation To Have A Great Clickbait
14 Days To A Better Clickbait
Believe In Your Clickbait Skills But Never Stop Improving
Build A Clickbait Anyone Would Be Proud Of
Create A Clickbait You Can Be Proud Of
Create A Clickbait Your Parents Would Be Proud Of
Don't Just Sit There! Start Getting More Clickbait
Easy Ways You Can Turn Clickbait Into Success
Famous Quotes On Clickbait
Fear? Not If You Use Clickbait The Right Way!
Get Better Clickbait Results By Following 3 Simple Steps
Have You Heard? Clickbait Is Your Best Bet To Grow
How To Make Your Clickbait Look Like A Million Bucks
If You Want To Be A Winner, Change Your Clickbait Philosophy Now!
Make Your Clickbait A Reality
Picture Your Clickbait On Top. Read This And Make It So
Remarkable Website - Clickbait Will Help You Get There
Revolutionize Your Clickbait With These Easy-peasy Tips
This Article Will Make Your Clickbait Amazing: Read Or Miss Out
Turn Your Clickbait Into A High Performing Machine
Want More Money? Get Clickbait
Who Else Wants Clickbait?
You Can Have Your Cake And Clickbait, Too
Your Key To Success: Clickbait
Death, Clickbait And Taxes: Tips To Avoiding Clickbait
Fighting For Clickbait: The Samurai Way
Get Rid Of Clickbait Problems Once And For All
Get Rid Of Clickbait Problems Once And For All
Having A Provocative Clickbait Works Only Under These Conditions
Here’s A Quick Way To Solve The Clickbait Problem
If You Don't Clickbait Now, You'll Hate Yourself Later
Clickbait Shortcuts - The Easy Way
Clickbait: Do You Really Need It? This Will Help You Decide!
Clickbait: What A Mistake!
Clickbait? It's Easy If You Do It Smart
Need More Time? Read These Tips To Eliminate Clickbait
Never Lose Your Clickbait Again
No More Mistakes With Clickbait
Open The Gates For Clickbait By Using These Simple Tips
Super Easy Ways To Handle Your Extra Clickbait
The Death Of Clickbait And How To Avoid It
Too Busy? Try These Tips To Streamline Your Clickbait
Warning: What Can You Do About Clickbait Right Now
Attention: Clickbait
Boost Your Clickbait With These Tips
Essential Clickbait Smartphone Apps
Interesting Factoids I Bet You Never Knew About Clickbait
Clickbait Adventures
Clickbait Expert Interview
Clickbait Guide To Communicating Value
Clickbait Iphone Apps
Clickbait Is Essential For Your Success. Read This To Find Out Why
Clickbait May Not Exist!
Little Known Facts About Clickbait - And Why They Matter
The Philosophy Of Clickbait
Warning: Clickbait

Thursday, April 14, 2016

Grady Ward's Passphrase FAQ from 1993 (and a seminal FBI attack on software encryption)

I wrote this back in late 1993; it accidentally logs clandestine efforts by the LASD and FBI to crack a subject's PGP encryption. Deputy Ponder with the Los Angeles County Sheriff's Department as FBI liaison asked me to supply a tool to assist decryption.

Taken from alt.security.pgp

Passphrase FAQ

V. 1.0
2 October 1993 '"PGP," warns Dorothy Denning, a Georgetown University professor who has worked closely with the National Security Agency, "could potentially become a widespread problem.' -- (E. Dexheimer)
Comments to: Grady Ward, grady@netcom.com
Contributors:
John Kelsey, c445585@mizzou1.missouri.edu (Appendix A)
RSA Data Security (Appendix C. The MD5 Algorithm)
Jim Gillogly (Appendix D. The Secure Hash Algorithm)

FAQ: How do I choose a good password or phrase?

ANS: Shocking nonsense makes the most sense With the intrinsic strength of some of the modern encryption, authentication, and message digest algorithms such as RSA, MD5, SHS and IDEA the user password or phrase is becoming more and more the focus of vulnerability.
For example, Deputy Ponder with the Los Angeles County Sheriff's Department admitted in early 1993 that both they and the FBI despaired of breaking the PGP 1.0 system except through a successful dictionary attack (trying many possible passwords or phrases from lists of probable choices and their variations) rather than "breaking" the underlying cryptographic algorithm mathematically.
The fundamental reason why attacking or trying to guess the user's password or phrase will increasingly be the focus of cryptanalysis is that the user's choice of password may represent a much simpler cryptographic key than optimal for the encryption algorithm being used. This weakness of the user's password choice provides the potential cryptanalytic wedge.
For example, suppose a user chooses the password 'david.' On the surface the entropy of this key (or the number of different equiprobable key states) appears to be five characters chosen from a set of twenty-six with replacements: 26^5 or 1.188 x 10^7. But since the user is apparently biased toward common given names, which a majority appear in lists numbering only 6,000-7,000 entries, the true entropy is undoubtedly much closer to 6.5 x 10^3, or about four orders of magnitude smaller than the raw length might suggest. (In fact this password probably possesses a much smaller entropy than even this for the very common name "david" would be one of the first names to be checked by an optimized dictionary attack program.)
In other words the "entropy" of a keyspace is not a fixed physical quantity: the cryptanalyst can exploit whole cultural biases and contexts, not just byte frequencies, digraphs, or even whole-word correlations to reduce the key space he or she is trying to explore.
To thwart this avenue of attack we would like to discover a method of selecting passwords or phrases that have at least as many bits of entropy (or "hard-to-guessness") as the entropy of the cryptographic key of the underlying algorithm being used.
To compare, DES (Data Encryption Standard) is believed to have about 54-55 bits (~4 x 10 ^16) of entropy while the IDEA algorithm is believed to have about 128 bits (~3.5 x 10^38) of entropy. The closer the entropy of the user's password or phrase is to the intrinsic entropy of the cryptographic key of the underlying algorithm being used, the more likely an attacker would need to search a substantially larger portion of the algorithm's key space in order to rediscover the key.
Unfortunately many documents suggest choosing passwords or phrases that are distinctly inferior to the latest method. For example, one white paper widely archived on the internet suggests selecting an original password by constructing an acronym from a popular song lyric or from a line of script from, for example, the SF movie "Star Wars". Both of these ideas turn out to be weak because both the entire script to Stars Wars and entire sets of song lyrics to thousands of popular songs are available on-line to everyone and, in some cases, are already embedded into "crack" dictionary attack programs (See ftp.uwp.edu).
However, the conflict between choosing an easy-to-remember key and choosing a key with a high level of entropy is not a hopeless task if we exploit mnemonic devices that have been used for a long time outside the field of cryptography. With the goal of making up a passphrase not included in any existing corpus yet very easy to remember, an effective technique is one known as "shocking nonsense."
"Shocking nonsense" means to make up a short phrase or sentence that is both nonsensical and shocking in the culture of the user, that is, it contains grossly obscene, racist, impossible or other extreme juxtaposition of ideas. This technique is permissable because the passphrase, by its nature, is never revealed to anyone with sensibilities to be offended.
Shocking nonsense is unlikely to be duplicated anywhere because it does not describe a matter-of-fact that could be accidentally rediscovered by anyone else and the emotional evocation makes it difficult for the creator to forget. A mild example of such shocking nonsense might be: "mollusks peck my galloping genitals ." The reader can undoubtedly make up many far more shocking or entertaining examples for himself or herself.
Even relatively short phrases offer acceptable entropy because the far larger "alphabet" pool of word symbols that may be chosen than the 26 characters that form the Roman alphabet. Even choosing from a vocabulary of a few thousand words a five word phrase might have on the order of 58 to 60 bits of entropy -- more than what is needed for the DES algorithm, for example.
When you are permitted to use passphrases of arbitrary length (in PGP for example) it is not necessary to further perturb your 'shocking nonsense' passphrase to include numbers or special symbols because the pool of word choices is already very high. Not needing those special symbols or numbers (that are not intrinsically meaningful) makes the shocking nonsense passphrase that much easier to remember.
If you are forced to use, say, a Unix password utility that permits only passwords of restricted length, one good strategy is to process a your secret passphrase using MD5 or SHA, then UUENCODE the result and select your shorter key from the output. See Appendix C and D for actual MD5 and SHA source implmentations.

Appendix A. For software developers

For software developers designing "front-ends" or user interfaces to conventional short-password applications, very good results will come from permitting the user arbitrary length passphrases that are then "crunched" or processed using a strong digest algorithm such as the 160-bit SHS (Secure Hash Standard) or the 128-bit MD5 (Message Digest rev.5).[See following Appendices] The interface program then chooses the appropriate number of bits from the digest and supplies them to the engine enforcing a short password. This 'key crunching' technique will assure the developer that even the short password key space will have a far greater opportunity of being fully exploited by the user. John Kelsey writes:
"I think it's a really good idea to use a randomly-generated salt to generate a key from a password, and that this salt should be as large as possible. Basically, this is to keep an attacker from spending lots of computer power once to generate a dictionary of likely keys. If users use good techniques to choose passwords, this won't matter much, but if they don't, this may save them from having their encrypted files or transmissions routinely read. The simplest scheme I can see for this is simply to prepend a 128-bit salt (generated as strongly as possible) to each encrypted file. Generate the key from the password by pre-filling a buffer with the 128-bit salt, then XORing in the keyed-in password, or by appending the key to the keyed-in password. Then, run SHA or MD5 or whatever to get the key.
A secondary point: Adding a random salt ensures that people who use the same password/passphrase for lots of files/transmissions don't get the same key every time. Since most successful attacks against modern encryption schemes use lots of ciphertext from the same key, this might add some practical security, at relatively low cost."
--John Kelsey, c445585@mizzou1.missouri.edu

Appendix B. A tool to experimentally investigate entropy

A practical Unix tool for investigating the entropy of typical user keys can be found in Wu and Manber's 'agrep' (approximate grep) similarity pattern matching tool available in C source from cs.arizona.edu [192.12.69.5]. This tool can determine the "edit distance," that is, the number of insertions, substitutions, or deletions that would be required of an arbitrary pattern in order for it to match any of a large corpus of words or phrases, say the usr/dict word list, or over the set of Star Trek trivia archives. The user can then adjust the pattern to give an arbitrary high threshold difference between it and common words and phrases in the corpus to make crack programs that systematically vary known strings less likely to succeed. It is often surprising to discover that a substring pattern like "hxirtes" is only of edit distance two from as many as forty separate words ranging from "bushfires" to "whitest." Certainly no password or phrase ought to be chosen as a working password or phrase that is within two or fewer edit distance from a known string or substring in any on-line collection.

Appendix C. An implementation in C of the Message Digest Rev.5 Algorithm

/*
 
md5.h -- header file for implementation of MD5                    
RSA Data Security, Inc. MD5 Message-Digest Algorithm              
Created: 2/17/90 RLR                                              
Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version               
Revised (for MD5): RLR 4/27/91                                    
-- G modified to have y&~z instead of y&z                       -- 
FF, GG, HH modified to add in last register done             -- 
Access pattern: round 2 works mod 5, round 3 works mod 3     -- 
distinct additive constant for each step                     -- 
round 4 added, working mod 7
*/
 
/*
 
Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. 
License to copy and use this software is granted provided that it 
is identified as the "RSA Data Security, Inc. MD5 Message-Digest 
Algorithm" in all material mentioning or referencing this software 
or this function.                                        
 
License is also granted to make and use derivative works           
provided that such works are identified as "derived from the RSA 
Data Security, Inc. MD5 Message-Digest Algorithm" in all          
material mentioning or referencing the derived work.              
RSA Data Security, Inc. makes no representations concerning       
either the merchantability of this software or the suitability of 
this software for any particular purpose.  It is provided "as is" 
without express or implied warranty of any kind.
 
These notices must be retained in any copies of any part of this 
documentation and/or software.
                                  
*/
 
typedef unsigned int UINT4;
 
/* Data structure for MD5 (Message-Digest) computation */
typedef struct {
  UINT4 i[2]; /* number of _bits_ handled mod 2^64 */
  UINT4 buf[4]; /* scratch buffer */
  unsigned char in[64]; /* input buffer */
  unsigned char digest[16]; /* actual digest after MD5Final call 
*/
} MD5_CTX;
 
void MD5Init(MD5_CTX *);
void MD5Update(MD5_CTX *,unsigned char *,unsigned int);
void MD5Final(MD5_CTX *);
void Transform(UINT4 *,UINT4 *);
 
#include <stdio.h>                              
#include <stdlib.h>
 
#include "md5.h"
 
void
findhash( FILE *fp )
{
        MD5_CTX         ctx;
        char            buffer[ BUFSIZ ];
        size_t          count;
        int             i,j;
 
        MD5Init( &ctx );
        while ( (count=fread(buffer,1,sizeof(buffer),fp)) > 0 )
                MD5Update( &ctx, buffer, count );
        MD5Final( &ctx );
  j = 0;
        for ( i=0; i<sizeof(ctx.digest); i++ )
        {
                printf( "%02x",
                        (unsigned int) ctx.digest[i],
                        i == (sizeof(ctx.digest)-1) ? '\n' : ' ' 
);
    j++;
    if ( j == 4 || j == 8 || j == 12) 
{printf(" ");}
    if ( j == 16 ) printf("\n");
        }
}
 
 
 
 
int
main( int argc, char **argv )
{            
        int     i;
 
        if ( argc <= 1 )
        {
                fprintf( stderr, "Usage: %s filename\n", argv[0] 
);
                exit( 1 );
        }
 
        for ( i=1; i<argc; i++ )
        {
                FILE    *fp;
 
                fp = fopen( argv[i], "rb" );
                if ( fp == NULL )
                {
                        perror( argv[i] );
                        exit( 1 );
                }
                printf( "%s:\t\t", argv[i] );
                findhash( fp );
                fclose( fp );
        }
        return 0;
}
 
 
 
 
/*
 
md5.c -- the source code for MD5 routines                         
 
RSA Data Security, Inc. MD5 Message-Digest Algorithm
Created: 2/17/90 RLR
Revised: 1/91 SRD,AJ,BSK,JT Reference C Version 
*/
 
 
 
/*
 
Message-digest routines:                                         
 
To form the message digest for a message M                       
 
(1) Initialize a context buffer mdContext using MD5Init
(2) Call MD5Update on mdContext and M 
(3) Call MD5Final on mdContext 
The message digest is now in mdContext->digest[0...15]
 
*/
 
static unsigned char PADDING[64] = {
  0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
 
/* F, G, H and I are basic MD5 functions */
#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
#define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
#define H(x, y, z) ((x) ^ (y) ^ (z))
#define I(x, y, z) ((y) ^ ((x) | (~z)))
 
/* ROTATE_LEFT rotates x left n bits */
#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
 
/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4 */
/* Rotation is separate from addition to prevent recomputation */
#define FF(a, b, c, d, x, s, ac) \
  {(a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \
   (a) = ROTATE_LEFT ((a), (s)); \
   (a) += (b); \
  }
#define GG(a, b, c, d, x, s, ac) \
  {(a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \
   (a) = ROTATE_LEFT ((a), (s)); \
   (a) += (b); \
  }
#define HH(a, b, c, d, x, s, ac) \
  {(a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \
   (a) = ROTATE_LEFT ((a), (s)); \
   (a) += (b); \
  }
#define II(a, b, c, d, x, s, ac) \
  {(a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \
   (a) = ROTATE_LEFT ((a), (s)); \
   (a) += (b); \
  }
 
/* The routine MD5Init initializes the message-digest context
   mdContext. All fields are set to zero.
 */
void MD5Init ( MD5_CTX *mdContext)
{
  mdContext->i[0] = mdContext->i[1] = (UINT4)0;
 
  /* Load magic initialization constants.
   */
  mdContext->buf[0] = (UINT4)0x67452301L;
  mdContext->buf[1] = (UINT4)0xefcdab89L;
  mdContext->buf[2] = (UINT4)0x98badcfeL;
  mdContext->buf[3] = (UINT4)0x10325476L;
}
 
/*
The routine MD5Update updates the message-digest context to
account for the presence of each of the characters
inBuf[0..inLen-1]
in the message whose digest is being computed.
*/
 
void MD5Update (register MD5_CTX *mdContext, unsigned char *inBuf,
   unsigned int inLen)
{
  register int i, ii;
  int mdi;
  UINT4 in[16];
 
  /* compute number of bytes mod 64 */
  mdi = (int)((mdContext->i[0] >> 3) & 0x3F);
 
  /* update number of bits */
  if ((mdContext->i[0] + ((UINT4)inLen << 3)) < mdContext->i[0])
    mdContext->i[1]++;
  mdContext->i[0] += ((UINT4)inLen << 3);
  mdContext->i[1] += ((UINT4)inLen >> 29);
 
  while (inLen--) {
    /* add new character to buffer, increment mdi */
    mdContext->in[mdi++] = *inBuf++;
 
    /* transform if necessary */
    if (mdi == 0x40) {
      for (i = 0, ii = 0; i < 16; i++, ii += 4)
        in[i] = (((UINT4)mdContext->in[ii+3]) << 24) |
                (((UINT4)mdContext->in[ii+2]) << 16) |
                (((UINT4)mdContext->in[ii+1]) << 8) |
                ((UINT4)mdContext->in[ii]);
      Transform (mdContext->buf, in);
      mdi = 0;
    }
  }
}
 
/*
The routine MD5Final terminates the message-digest computation and
ends with the desired message digest in mdContext->digest[0...15].
*/
void MD5Final (MD5_CTX *mdContext)
{
  UINT4 in[16];
  int mdi;
  unsigned int i, ii;
  unsigned int padLen;
 
  /* save number of bits */
  in[14] = mdContext->i[0];
  in[15] = mdContext->i[1];
 
  /* compute number of bytes mod 64 */
  mdi = (int)((mdContext->i[0] >> 3) & 0x3F);
 
  /* pad out to 56 mod 64 */
  padLen = (mdi < 56) ? (56 - mdi) : (120 - mdi);
  MD5Update (mdContext, PADDING, padLen);
 
  /* append length in bits and transform */
  for (i = 0, ii = 0; i < 14; i++, ii += 4)
    in[i] = (((UINT4)mdContext->in[ii+3]) << 24) |
            (((UINT4)mdContext->in[ii+2]) << 16) |
            (((UINT4)mdContext->in[ii+1]) << 8) |
            ((UINT4)mdContext->in[ii]);
  Transform (mdContext->buf, in);
 
  /* store buffer in digest */
  for (i = 0, ii = 0; i < 4; i++, ii += 4) {
    mdContext->digest[ii] = (unsigned char)(mdContext->buf[i] & 
0xFF);
    mdContext->digest[ii+1] =
      (unsigned char)((mdContext->buf[i] >> 8) & 0xFF);
    mdContext->digest[ii+2] =
      (unsigned char)((mdContext->buf[i] >> 16) & 0xFF);
    mdContext->digest[ii+3] =
      (unsigned char)((mdContext->buf[i] >> 24) & 0xFF);
  }
}
 
/*
Basic MD5 step. Transforms buf based on in.  Note that if the 
Mysterious Constants are arranged backwards in little-endian order 
and decrypted with the DES they produce OCCULT MESSAGES!
*/
void Transform(register UINT4 *buf,register UINT4 *in)
{
register UINT4 a = buf[0], b = buf[1], c = buf[2], d = buf[3];
 
  /* Round 1 */
#define S11 7
#define S12 12
#define S13 17
#define S14 22
  FF ( a, b, c, d, in[ 0], S11, 0xD76AA478L); /* 1 */
  FF ( d, a, b, c, in[ 1], S12, 0xE8C7B756L); /* 2 */
  FF ( c, d, a, b, in[ 2], S13, 0x242070DBL); /* 3 */
  FF ( b, c, d, a, in[ 3], S14, 0xC1BDCEEEL); /* 4 */
  FF ( a, b, c, d, in[ 4], S11, 0xF57C0FAFL); /* 5 */
  FF ( d, a, b, c, in[ 5], S12, 0x4787C62AL); /* 6 */
  FF ( c, d, a, b, in[ 6], S13, 0xA8304613L); /* 7 */
  FF ( b, c, d, a, in[ 7], S14, 0xFD469501L); /* 8 */
  FF ( a, b, c, d, in[ 8], S11, 0x698098D8L); /* 9 */
  FF ( d, a, b, c, in[ 9], S12, 0x8B44F7AFL); /* 10 */
  FF ( c, d, a, b, in[10], S13, 0xFFFF5BB1L); /* 11 */
  FF ( b, c, d, a, in[11], S14, 0x895CD7BEL); /* 12 */
  FF ( a, b, c, d, in[12], S11, 0x6B901122L); /* 13 */
  FF ( d, a, b, c, in[13], S12, 0xFD987193L); /* 14 */
  FF ( c, d, a, b, in[14], S13, 0xA679438EL); /* 15 */
  FF ( b, c, d, a, in[15], S14, 0x49B40821L); /* 16 */
 
  /* Round 2 */
#define S21 5
#define S22 9
#define S23 14
#define S24 20
  GG ( a, b, c, d, in[ 1], S21, 0xF61E2562L); /* 17 */
  GG ( d, a, b, c, in[ 6], S22, 0xC040B340L); /* 18 */
  GG ( c, d, a, b, in[11], S23, 0x265E5A51L); /* 19 */
  GG ( b, c, d, a, in[ 0], S24, 0xE9B6C7AAL); /* 20 */
  GG ( a, b, c, d, in[ 5], S21, 0xD62F105DL); /* 21 */
  GG ( d, a, b, c, in[10], S22, 0x02441453L); /* 22 */
  GG ( c, d, a, b, in[15], S23, 0xD8A1E681L); /* 23 */
  GG ( b, c, d, a, in[ 4], S24, 0xE7D3FBC8L); /* 24 */
  GG ( a, b, c, d, in[ 9], S21, 0x21E1CDE6L); /* 25 */
  GG ( d, a, b, c, in[14], S22, 0xC33707D6L); /* 26 */
  GG ( c, d, a, b, in[ 3], S23, 0xF4D50D87L); /* 27 */
  GG ( b, c, d, a, in[ 8], S24, 0x455A14EDL); /* 28 */
  GG ( a, b, c, d, in[13], S21, 0xA9E3E905L); /* 29 */
  GG ( d, a, b, c, in[ 2], S22, 0xFCEFA3F8L); /* 30 */
  GG ( c, d, a, b, in[ 7], S23, 0x676F02D9L); /* 31 */
  GG ( b, c, d, a, in[12], S24, 0x8D2A4C8AL); /* 32 */
 
  /* Round 3 */
#define S31 4
#define S32 11
#define S33 16
#define S34 23
  HH ( a, b, c, d, in[ 5], S31, 0xFFFA3942L); /* 33 */
  HH ( d, a, b, c, in[ 8], S32, 0x8771F681L); /* 34 */
  HH ( c, d, a, b, in[11], S33, 0x6D9D6122L); /* 35 */
  HH ( b, c, d, a, in[14], S34, 0xFDE5380CL); /* 36 */
  HH ( a, b, c, d, in[ 1], S31, 0xA4BEEA44L); /* 37 */
  HH ( d, a, b, c, in[ 4], S32, 0x4BDECFA9L); /* 38 */
  HH ( c, d, a, b, in[ 7], S33, 0xF6BB4B60L); /* 39 */
  HH ( b, c, d, a, in[10], S34, 0xBEBFBC70L); /* 40 */
  HH ( a, b, c, d, in[13], S31, 0x289B7EC6L); /* 41 */
  HH ( d, a, b, c, in[ 0], S32, 0xEAA127FAL); /* 42 */
  HH ( c, d, a, b, in[ 3], S33, 0xD4EF3085L); /* 43 */
  HH ( b, c, d, a, in[ 6], S34, 0x04881D05L); /* 44 */
  HH ( a, b, c, d, in[ 9], S31, 0xD9D4D039L); /* 45 */
  HH ( d, a, b, c, in[12], S32, 0xE6DB99E5L); /* 46 */
  HH ( c, d, a, b, in[15], S33, 0x1FA27CF8L); /* 47 */
  HH ( b, c, d, a, in[ 2], S34, 0xC4AC5665L); /* 48 */
 
  /* Round 4 */
#define S41 6
#define S42 10
#define S43 15
#define S44 21
  II ( a, b, c, d, in[ 0], S41, 0xF4292244L); /* 49 */
  II ( d, a, b, c, in[ 7], S42, 0x432AFF97L); /* 50 */
  II ( c, d, a, b, in[14], S43, 0xAB9423A7L); /* 51 */
  II ( b, c, d, a, in[ 5], S44, 0xFC93A039L); /* 52 */
  II ( a, b, c, d, in[12], S41, 0x655B59C3L); /* 53 */
  II ( d, a, b, c, in[ 3], S42, 0x8F0CCC92L); /* 54 */
  II ( c, d, a, b, in[10], S43, 0xFFEFF47DL); /* 55 */
  II ( b, c, d, a, in[ 1], S44, 0x85845DD1L); /* 56 */
  II ( a, b, c, d, in[ 8], S41, 0x6FA87E4FL); /* 57 */
  II ( d, a, b, c, in[15], S42, 0xFE2CE6E0L); /* 58 */
  II ( c, d, a, b, in[ 6], S43, 0xA3014314L); /* 59 */
  II ( b, c, d, a, in[13], S44, 0x4E0811A1L); /* 60 */
  II ( a, b, c, d, in[ 4], S41, 0xF7537E82L); /* 61 */
  II ( d, a, b, c, in[11], S42, 0xBD3AF235L); /* 62 */
  II ( c, d, a, b, in[ 2], S43, 0x2AD7D2BBL); /* 63 */
  II ( b, c, d, a, in[ 9], S44, 0xEB86D391L); /* 64 */
 
  buf[0] += a;
  buf[1] += b;
  buf[2] += c;
  buf[3] += d;
}
 
 
/*
 
MD5 test vectors:
d41d8cd98f00b204e9800998ecf8427e ""
0cc175b9c0f1b6a831c399e269772661 "a"
900150983cd24fb0d6963f7d28e17f72 "abc"
f96b697d7cb7938d525a2f31aaf161d0 "message digest"
c3fcd3d76192e4007dfb496cca67e13b "abcdefghijklmnopqrstuvwxyz"
d174ab98d277d9f5a5611c2c9f419d9f 
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijk\
lmnopqrstuvwxyz0123456789"
57edf4a22be3c955ac49da2e2107b67a 
"1234567890123456789012345678901234567\
8901234567890123456789012345678901234567890"
900150983cd24fb0d6963f7d28e17f72 foo
 
*/

Appendix D. The Secure Hash Algorithm

/* Implementation of NIST's Secure Hash Algorithm (FIPS 180)
 * Lightly bummed for execution efficiency.
 *
 * Jim Gillogly 3 May 1993
 *
 * Compile: cc -O -o sha sha.c
 *
 * To remove the test wrapper and use just the nist_hash() 
routine,
 * compile with -DONT_WRAP
 *
 * Usage: sha [-vt] [filename ...]
 *
 *      -v switch: output the filename as well
 *      -t switch: suppress spaces between 32-bit blocks
 *
 *      If no input files are specified, process standard input.
 *
 * Output: 40-hex-digit digest of each file specified (160 bits)
 *
 * Synopsis of the function calls:
 *
 *   sha_file(char *filename, unsigned long *buffer)
 *      Filename is a file to be opened and processed.
 *      buffer is a user-supplied array of 5 or more longs.
 *      The 5-word buffer is filled with 160 bits of non-
terminated hash.
 *      Returns 0 if successful, non-zero if bad file.
 *
 *   void sha_stream(FILE *stream, unsigned long *buffer)
 *      Input is from already-opened stream, not file.
 *
 * void sha_memory(char *mem, long length, unsigned long *buffer)
 *      Input is a memory block "length" bytes long.
 *
 * Caveat:
 * Not tested for case that requires the high word of the length,
 *      which would be files larger than 1/2 gig or so.
 *
 * Limitation:
 * sha_memory (the memory block function) will deal with blocks no 
longer
 * than 4 gigabytes; for longer samples, the stream version will
 * probably be most convenient (e.g. perl moby_data.pl | sha).
 *
 * Bugs:
 *      The standard is defined for bit strings; I assume bytes.
 *
 * test vector: 
"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
 * should compute:
 *                  0xd2516ee1L
 *                  0xacfa5bafL
 *                  0x33dfc1c4L
 *                  0x71e43844L
 *                  0x9ef134c8L
 *
 * test vector: "abc"
 * should compute:
 *                  0x0164b8a9L
 *                  0x14cd2a5eL
 *                  0x74c4f7ffL
 *                  0x082c4d97L
 *                  0xf1edf880L
 *
 * Copyright 1993, Dr. James J. Gillogly
 * This code may be freely used in any application.
 */
 
#include <stdio.h>
#include <memory.h>
 
#define TRUE  1
#define FALSE 0
 
#define SUCCESS 0
#define FAILURE -1
 
int sha_file();                         /* External entries */
void sha_stream(), sha_memory();
 
static void nist_guts();
 
#ifndef ONT_WRAP        /* Using just the hash routine itself */
 
#define HASH_SIZE 5     /* Produces 160-bit digest of the message 
*/
 
main(argc, argv)
int argc;
char **argv;
{
    unsigned long hbuf[HASH_SIZE];
    char *s;
    int file_args = FALSE;  /* If no files, take it from stdin */
    int verbose = FALSE;
    int terse = FALSE;
 
#ifdef MEMTEST
    sha_memory("abc", 3l, hbuf);         /* NIST test value from 
appendix A */
    if (verbose) printf("Memory:");
    if (terse) printf("%08x%08x%08x%08x%08x\n",
 hbuf[0], hbuf[1], hbuf[2], hbuf[3], hbuf[4]);
    else printf("%08x %08x %08x %08x %08x\n",
 hbuf[0], hbuf[1], hbuf[2], hbuf[3], hbuf[4]);
#endif
 
    for (++argv; --argc; ++argv)  /* March down the arg list */
    {
 verbose = TRUE;
 if (**argv == '-')         /* Process one or more flags */
     for (s = &(*argv)[1]; *s; s++) /* Obfuscated C contest 
entry */
  switch(*s)
  {
      case 'v': case 'V':
   verbose = TRUE;
   break;
      case 't': case 'T':
   terse = TRUE;
   break;
      default:
   fprintf(stderr, "Unrecognized flag: %c\n", *s);
   return FALSE;
  }
 else                            /* Process a file */
 {
     if (verbose) printf("%s:\t\t", *argv);
     file_args = TRUE;           /* Whether or not we could 
read it */
 
     if (sha_file(*argv, hbuf) == FAILURE)
  printf("Can't open file %s.\n", *argv);
     else
  if (terse) printf("%08x%08x%08x%08x%08x\n",
      hbuf[0], hbuf[1], hbuf[2], hbuf[3], hbuf[4]);
  else printf("%08x %08x %08x %08x %08x\n",
      hbuf[0], hbuf[1], hbuf[2], hbuf[3], hbuf[4]);
 }
    }
    if (! file_args)    /* No file specified */
    {
 if (verbose) printf("%s:\t\t", *argv);
 sha_stream(stdin, hbuf);
 
 if (terse) printf("%08x%08x%08x%08x%08x\n",
     hbuf[0], hbuf[1], hbuf[2], hbuf[3], hbuf[4]);
 else printf("%08x %08x %08x %08x %08x\n",
     hbuf[0], hbuf[1], hbuf[2], hbuf[3], hbuf[4]);
    }
    return TRUE;
}
 
#endif ONT_WRAP
 
union longbyte
{
    unsigned long W[80];        /* Process 16 32-bit words at a 
time */
    char B[320];                /* But read them as bytes for 
counting */
};
 
sha_file(filename, buffer)      /* Hash a file */
char *filename;
unsigned long *buffer;
{
    FILE *infile;
 
    if ((infile = fopen(filename, "rb")) == NULL)
    {
 int i;
 
 for (i = 0; i < 5; i++)
     buffer[i] = 0xdeadbeef;
 return FAILURE;
    }
    (void) sha_stream(infile, buffer);
    fclose(infile);
    return SUCCESS;
}
 
void sha_memory(mem, length, buffer)    /* Hash a memory block */
char *mem;
unsigned long length;
unsigned long *buffer;
{
    nist_guts(FALSE, (FILE *) NULL, mem, length, buffer);
}
 
void sha_stream(stream, buffer)
FILE *stream;
unsigned long *buffer;
{
    nist_guts(TRUE, stream, (char *) NULL, 0l, buffer);
}
 
#define f0(x,y,z) (z ^ (x & (y ^ z)))           /* Magic functions 
*/
#define f1(x,y,z) (x ^ y ^ z)
#define f2(x,y,z) ((x & y) | (z & (x | y)))
#define f3(x,y,z) (x ^ y ^ z)
 
#define K0 0x5a827999                           /* Magic constants 
*/
#define K1 0x6ed9eba1
#define K2 0x8f1bbcdc
#define K3 0xca62c1d6
 
#define S(n, X) ((X << n) | (X >> (32 - n)))    /* Barrel roll */
 
#define r0(f, K) \
    temp = S(5, A) + f(B, C, D) + E + *p0++ + K; \
    E = D;  \
    D = C;  \
    C = S(30, B); \
    B = A;  \
    A = temp
 
#define r1(f, K) \
    temp = S(5, A) + f(B, C, D) + E + \
    (*p0++ = *p1++ ^ *p2++ ^ *p3++ ^ *p4++) + K; \
    E = D;  \
    D = C;  \
    C = S(30, B); \
    B = A;  \
    A = temp
 
static void nist_guts(file_flag, stream, mem, length, buf)
int file_flag;                  /* Input from memory, or from 
stream? */
FILE *stream;
char *mem;
unsigned long length;
unsigned long *buf;
{
    int i, nread, nbits;
    union longbyte d;
    unsigned long hi_length, lo_length;
    int padded;
    char *s;
 
    register unsigned long *p0, *p1, *p2, *p3, *p4;
    unsigned long A, B, C, D, E, temp;
 
    unsigned long h0, h1, h2, h3, h4;
 
    h0 = 0x67452301;                            /* Accumulators */
    h1 = 0xefcdab89;
    h2 = 0x98badcfe;
    h3 = 0x10325476;
    h4 = 0xc3d2e1f0;
 
    padded = FALSE;
    s = mem;
    for (hi_length = lo_length = 0; ;)  /* Process 16 longs at a 
time */
    {
 if (file_flag)
 {
  nread = fread(d.B, 1, 64, stream);  /* Read as 64 
bytes */
 }
 else
 {
  if (length < 64) nread = length;
  else             nread = 64;
  length -= nread;
  memcpy(d.B, s, nread);
  s += nread;
 }
 if (nread < 64)   /* Partial block? */
 {
  nbits = nread << 3;               /* Length: bits */
  if ((lo_length += nbits) < nbits)
   hi_length++;              /* 64-bit integer */
 
  if (nread < 64 && ! padded)  /* Append a single bit */
  {
   d.B[nread++] = 0x80; /* Using up next byte */
   padded = TRUE;       /* Single bit once */
  }
  for (i = nread; i < 64; i++) /* Pad with nulls */
   d.B[i] = 0;
  if (nread <= 56)   /* Room for length in this block */
  {
   d.W[14] = hi_length;
   d.W[15] = lo_length;
  }
 }
 else    /* Full block -- get efficient */
 {
  if ((lo_length += 512) < 512)
   hi_length++;    /* 64-bit integer */
 }
 
 p0 = d.W;
 A = h0; B = h1; C = h2; D = h3; E = h4;
 
 r0(f0,K0); r0(f0,K0); r0(f0,K0); r0(f0,K0); r0(f0,K0);
 r0(f0,K0); r0(f0,K0); r0(f0,K0); r0(f0,K0); r0(f0,K0);
 r0(f0,K0); r0(f0,K0); r0(f0,K0); r0(f0,K0); r0(f0,K0);
 r0(f0,K0);
 
 p1 = &d.W[13]; p2 = &d.W[8]; p3 = &d.W[2]; p4 = &d.W[0];
 
     r1(f0,K0); r1(f0,K0); r1(f0,K0); r1(f0,K0);
 r1(f1,K1); r1(f1,K1); r1(f1,K1); r1(f1,K1); r1(f1,K1);
 r1(f1,K1); r1(f1,K1); r1(f1,K1); r1(f1,K1); r1(f1,K1);
 r1(f1,K1); r1(f1,K1); r1(f1,K1); r1(f1,K1); r1(f1,K1);
 r1(f1,K1); r1(f1,K1); r1(f1,K1); r1(f1,K1); r1(f1,K1);
 r1(f2,K2); r1(f2,K2); r1(f2,K2); r1(f2,K2); r1(f2,K2);
 r1(f2,K2); r1(f2,K2); r1(f2,K2); r1(f2,K2); r1(f2,K2);
 r1(f2,K2); r1(f2,K2); r1(f2,K2); r1(f2,K2); r1(f2,K2);
 r1(f2,K2); r1(f2,K2); r1(f2,K2); r1(f2,K2); r1(f2,K2);
 r1(f3,K3); r1(f3,K3); r1(f3,K3); r1(f3,K3); r1(f3,K3);
 r1(f3,K3); r1(f3,K3); r1(f3,K3); r1(f3,K3); r1(f3,K3);
 r1(f3,K3); r1(f3,K3); r1(f3,K3); r1(f3,K3); r1(f3,K3);
 r1(f3,K3); r1(f3,K3); r1(f3,K3); r1(f3,K3); r1(f3,K3);
 
 h0 += A; h1 += B; h2 += C; h3 += D; h4 += E;
 
 if (nread <= 56) break; /* If it's greater, length in next 
block */
    }
    buf[0] = h0; buf[1] = h1; buf[2] = h2; buf[3] = h3; buf[4] = 
h4;
}
 

Appendix E. Select References

Selection and of Passwords in Differing Threat Environments, Department of Defense Password Management Guideline, CSC-STD-002-85, published by the Computer Security Center of the Department of Defense Fort George G. Meade, MD 20755 Discovering Weak Passwords, The COPS Security Checker System by D. Farmer, E. Spafford, Purdue University Technical Report CSD-TR-993, West Lafayette, IN 47907
An Example of Automated Key Cracking, With Microscope and Tweezers: An Analysis of the Internet Virus of 1988, by M. Eichin, J. Rochlis, Massachusetts Institute of Technology, Cambridge, MA 02139
Password Vulnerabilities in Distributed Systems, Computer Emergency Response - An International Problem, by R. Pethia, K. van Wyk CERT/Software Engineering Institute, Carnegie Mellon University, Pittsburgh, PA 15213
Key Metrics and the MD5 Message Digest Algorithm, Answers to Frequently Asked Questions About Today's Cryptography, Second edition, by Paul Fahn, RSA Laboratories, Redwood City, CA 94065
(available through anonymous FTP from rsa.com)
Implementation Details of the MD5 Message Digest Algorithm, RFC-1321 ('request for comments') The MD5 algorithm, by R. Rivest, MIT Center for Computer Science
(available on the internet from gatekeeper.dec.com)
Implementation Details of the NIST Secure Hash Standard, The Secure Hash Standard (SHS) Specification, Jan 1992 DRAFT Federal Information Processing Standards Publication YY Director, Computer Systems Laboratory, National Institute of Standards and Technology, Gaithersburg, MD 20899
(The SHS was approved as a Federal Standard in May, 1993)
Other Possible Approaches to Password Generation, Automated Password Generator, NIST publication ????, Director, Computer Systems Laboratory, National Institute of Standards and Technology, Gaithersburg, MD 20899
(a pronounceable password algorithm using DES)

Saturday, February 20, 2016

Semiotic War and the passing of Umberto Eco

 Remembering Umberto Eco, including his works on the theory of semiotics:

 
     Conducting a war using a full range of signs and symbols -- but pointedly excluding violence or other unlawful or violent acts. A war of ideas in the age of internet and multimedia. Compare scamizdat
     The Internet's response to Scientology's attempt to rmgroup alt.religion.scientology included publishing their trade-secret "scriptures," graphically reviling them, putting billboards on trucks and buses, hosting radio talk-show segments, songwriting, projecting laser glyphs on walls, having aircraft pull pennants with slogans, picketing their headquarters, deconstructing their newsletters, creating cartoon lampoons and webpages, and, in other words, full semiotic war. 
     Neologized by Grady Ward, referring to the continuing response to Church of Scientology litigation threats by publishing "secret scriptures" to the Internet. c. 1995 in alt.religion.scientology. "Scam" + "samizdat" q.v.

More generally, any publishing of texts to expose a scam, when those texts are the fiercely protected copyright of the alleged scammer.\
I have Scamizdat issue #4, does anyone have issue #10 with the Fishman Declaration?

or 

The scamizdat is revealing all their bogus secrets.