Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

S/Key implementation question

0 views
Skip to first unread message

CyberPsychotic

unread,
Feb 1, 2000, 3:00:00 AM2/1/00
to W. Stockwell
~ :/* Make sure line is all seven bits */
~ :void
~ :sevenbit(s)
~ : char *s;
~ :{
~ : while (*s)
~ : *s++ &= 0x7f;
~ :}


drops the 8th bit of every byte in string. (so if you had something like
АБВГД, it would be something like ABVGD when proccessed).

--
Key fingerprint = 4422 16FC 3C7D E10A B044 CA4F 2BE0 3943 9758 9324
http://www.kalug.lug.net/fygrave/

James Howard

unread,
Feb 1, 2000, 3:00:00 AM2/1/00
to W. Stockwell
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


Jim Rees

unread,
Feb 1, 2000, 3:00:00 AM2/1/00
to te...@openbsd.org
You youngsters have no sense of history. Don't they teach you anything in
school?

Many, many years ago, the top bit was used as a parity check on the other
seven. You'll find vestiges of this in the tty driver today. In those days
many programs stripped the top bit. The default character set was ascii,
and obsolete seven bit code, so no information was lost.

About 15 years ago ISO 8859 replaced ascii for most things and there was a
campaign to make the whole system "eight bit clean."

If the s/key spec says the seed and pass phrase must be ascii, then this
routine does no harm but is probably not useful. If the pass phrase is
allowed to contain non-ascii, this routine should probably be removed.

W. Stockwell

unread,
Feb 1, 2000, 3:00:00 AM2/1/00
to te...@openbsd.org
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;
}

It's called with the seed and pass phrase passed to i before it is passed
through the hash algorithm. What function does this serve? I haven't
been able to identify anything in the related rfc (1938). Can someone
give me an idea?

Please reply to me as I am not a normal list subscriber.

Will Stockwell
wa...@antisocial.net
www.antisocial.net


Artur Grabowski

unread,
Feb 1, 2000, 3:00:00 AM2/1/00
to Jim Rees
Jim Rees <re...@umich.edu> writes:

> You youngsters have no sense of history. Don't they teach you anything in
> school?

[...]


> About 15 years ago ISO 8859 replaced ascii for most things and there was a
> campaign to make the whole system "eight bit clean."

http://www.lysator.liu.se/åttabitars/

//art

0 new messages