[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: S/Key implementation question



On Mon, 31 Jan 2000, W. Stockwell wrote:

> Just out of curiosity I've been looking at the implementation of S/Key.  I
> have been unable to figure out what purpose this function has:
> 
> /* Make sure line is all seven bits */
> void
> sevenbit(s)
> 	char *s;
> {
> 	while (*s)
> 		*s++ &= 0x7f;
> }

Without knowledge of anything else, this function takes each character in
a string pointed at by s and strips off the most significant bit.  This
means that each character is now between 0 and 127 inclusive rather than 0
and 255 inclusive.  Why this is done here I do not know.

Jamie