From: "boyd, rounin" <boyd@insultant.net>
To: <9fans@cse.psu.edu>
Subject: Re: [9fans] Microsoft Visual C++ Toolkit 2003
Date: Tue, 20 Apr 2004 01:26:27 +0200 [thread overview]
Message-ID: <04eb01c42665$becced30$0fca7d50@SOMA> (raw)
In-Reply-To: <31c092fb1a6b81a657845f36752eacba@juice.thebigchoice.com>
> there are some other minor errors too
>
> such as auth.c(104) : warning C4013: 'des56to64' undefined; assuming
extern returning int
my theory is that you need the inverse of this:
-/*
- * Convert a Plan 9 key to a DES key.
- */
-uchar *
-des9key(uchar *key)
-{
- int i;
- int m1[] = { 0x00, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F };
- int m2[] = { 0x00, 0xFC, 0xF8, 0xF0, 0xE0, 0xC0, 0x80 };
- static uchar nkey[DESKEYPLEN];
-
- nkey[0] = key[0] & 0xFE;
-
- for (i = 1; i < 7; i++)
- nkey[i] = (key[i - 1] & m1[i]) << 8 - i | (key[i] & m2[i]) >> i;
-
- nkey[7] = (key[6] & 0x7F) << 1;
-
-
- return nkey;
-}
as Plan 9 packs a DES key into 7 bytes, the 8th bit being a 'parity' bit and
unused.
next prev parent reply other threads:[~2004-04-19 23:26 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-19 23:17 matt
2004-04-19 23:26 ` boyd, rounin [this message]
2004-04-19 23:46 ` Russ Cox
2004-04-20 0:04 ` boyd, rounin
2004-04-20 0:13 ` Bruce Ellis
2004-04-20 0:25 ` Bruce Ellis
2004-04-20 0:32 ` Geoff Collyer
2004-04-20 0:58 ` Bruce Ellis
2004-04-20 1:02 ` boyd, rounin
2004-04-20 9:25 ` a
2004-04-20 9:42 ` Derek Fawcus
2004-04-20 9:46 ` a
2004-04-20 10:22 ` matt
2004-04-20 12:26 ` boyd, rounin
2004-04-20 12:22 ` boyd, rounin
2004-04-20 15:20 ` Derek Fawcus
2004-06-04 22:54 ` Derek Fawcus
2004-06-04 22:59 ` boyd, rounin
2004-06-05 0:33 ` Derek Fawcus
2004-06-05 0:33 ` boyd, rounin
2004-04-21 2:56 ` Bruce Ellis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='04eb01c42665$becced30$0fca7d50@SOMA' \
--to=boyd@insultant.net \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).