9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] encrypt(void*, void*, int) and authentication
@ 2000-05-08 12:45 Lucio
  0 siblings, 0 replies; 11+ messages in thread
From: Lucio @ 2000-05-08 12:45 UTC (permalink / raw)


On Mon, May 08, 2000 at 03:12:57PM +0400, Roman V. Shaposhnick wrote:
> If yes, than, please, tell me whether 'encrypt(void*, void*, int)' uses
> classical DES algorithm ( as described in Bruce Schneier: Applied Cryptography.
> John Wiley & Sons, 1994. and implemented in libdes ) or not.
>
I used des.c straight out of Phil Karn's implementation, although I can't
quite remember where I found it, and I'm sure it ttok very little
adjustment.  If you need more details, mail me privately.

(I used des.c for the 9auth implementation under NetBSD, I must confess
I can't remember whether I ever tested it against the real thing).

I am curious about implementing 9fs for Linux, I presume you're
looking at 9P, as u9fs works out the box on NetBSD, so I can't
imagine any difficulties with Linux.

I've been dreaming of adding IL to the IP stack on NetBSD, and more
recently adding VNC to 9P (the latter without even looking at VNC's
protocol, so I'm merely dreaming...)

Anyway, anything that propagates the plan 9 faith always appeals
to my curiosity :-)

++L




^ permalink raw reply	[flat|nested] 11+ messages in thread

* [9fans] encrypt(void*, void*, int) and authentication
@ 2000-05-08 21:13 Roman
  0 siblings, 0 replies; 11+ messages in thread
From: Roman @ 2000-05-08 21:13 UTC (permalink / raw)


Thank you all. It really helps.

Roman.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* [9fans] encrypt(void*, void*, int) and authentication
@ 2000-05-08 15:46 forsyth
  0 siblings, 0 replies; 11+ messages in thread
From: forsyth @ 2000-05-08 15:46 UTC (permalink / raw)



>>http://www.planete.net/~boyd/des.msg
>should help

quite likely: vita nuova uses a slight variant of boyd's des.c in Inferno's /crypt.
the us regulations are less of a fuss now, but restrictions still exist,
and anyway it's done now.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* [9fans] encrypt(void*, void*, int) and authentication
@ 2000-05-08 13:06 Lucio
  0 siblings, 0 replies; 11+ messages in thread
From: Lucio @ 2000-05-08 13:06 UTC (permalink / raw)


On Mon, May 08, 2000 at 08:28:10AM -0400, presotto@plan9.bell-labs.com wrote:
>
> By the way, dong lin (dong@research.bell-labs.com) has implemented
> both IL and 9P in the FreeBSD kernel.  Mail him if you want a
> copy.

That's exciting (for real, too!).  I presume that the OS to be released
still uses these natively.

It also begs the question: what about that dinosaur-to-be called IPv6?  No
risk of bringing back Alef just for that implementation? :-)

To quote another thread: I mourn Alef too, for very much the same reasons.

++L




^ permalink raw reply	[flat|nested] 11+ messages in thread

* [9fans] encrypt(void*, void*, int) and authentication
@ 2000-05-08 12:37 Lucio
  0 siblings, 0 replies; 11+ messages in thread
From: Lucio @ 2000-05-08 12:37 UTC (permalink / raw)


On Mon, May 08, 2000 at 08:28:10AM -0400, presotto@plan9.bell-labs.com wrote:
>
> By the way, dong lin (dong@research.bell-labs.com) has implemented
> both IL and 9P in the FreeBSD kernel.  Mail him if you want a
> copy.

That's exciting (for real, too!).  I presume that the OS to be released
still uses these natively.

It also begs the question: what about that dinosaur-to-be called IPv6?  No
risk of bringing back Alef just for that implementation? :-)

To quote another thread: I mourn Alef too, for very much the same reasons.

++L




^ permalink raw reply	[flat|nested] 11+ messages in thread

* [9fans] encrypt(void*, void*, int) and authentication
@ 2000-05-08 12:31 rob
  0 siblings, 0 replies; 11+ messages in thread
From: rob @ 2000-05-08 12:31 UTC (permalink / raw)


It seems that if you're implemented 9P for Linux, you should call it 9pfs,
after the protocol.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* [9fans] encrypt(void*, void*, int) and authentication
@ 2000-05-08 12:28 presotto
  0 siblings, 0 replies; 11+ messages in thread
From: presotto @ 2000-05-08 12:28 UTC (permalink / raw)


By the way, dong lin (dong@research.bell-labs.com) has implemented
both IL and 9P in the FreeBSD kernel.  Mail him if you want a
copy.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* [9fans] encrypt(void*, void*, int) and authentication
@ 2000-05-08 12:27 Markus
  0 siblings, 0 replies; 11+ messages in thread
From: Markus @ 2000-05-08 12:27 UTC (permalink / raw)



http://www.planete.net/~boyd/des.msg
should help

On Mon, May 08, 2000 at 03:12:57PM +0400, Roman V. Shaposhnick wrote:
> Hi,
>
> I'm the guy who is implementing 9P for Linux ( p9fs ). Everything was quite
> ok, before I started auth implementation. As you all know for the proper
> authentication of the client client's kernel should decrypt a ticket
> received from AS, and for this it should know encryption algorithm ;). I guess
> that due to the famous US law  there is no such thing as 'crypt.c', am I right?
> If yes, than, please, tell me whether 'encrypt(void*, void*, int)' uses
> classical DES algorithm ( as described in Bruce Schneier: Applied Cryptography.
> John Wiley & Sons, 1994. and implemented in libdes ) or not.
>
> Thanks,
> Roman.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* [9fans] encrypt(void*, void*, int) and authentication
@ 2000-05-08 12:24 presotto
  0 siblings, 0 replies; 11+ messages in thread
From: presotto @ 2000-05-08 12:24 UTC (permalink / raw)


#include <u.h>
#include <libc.h>
#include <auth.h>
#include <mp.h>
#include <libsec.h>

/*
 * destructively encrypt the buffer, which
 * must be at least 8 characters long.
 */
int
encrypt(void *key, void *vbuf, int n)
{
	ulong ekey[32];
	uchar *buf;
	int i, r;

	if(n < 8)
		return 0;
	key_setup(key, ekey);
	buf = vbuf;
	n--;
	r = n % 7;
	n /= 7;
	for(i = 0; i < n; i++){
		block_cipher(ekey, buf, 0);
		buf += 7;
	}
	if(r)
		block_cipher(ekey, buf - 7 + r, 0);
	return 1;
}

/*
 * destructively decrypt the buffer, which
 * must be at least 8 characters long.
 */
int
decrypt(void *key, void *vbuf, int n)
{
	ulong ekey[128];
	uchar *buf;
	int i, r;

	if(n < 8)
		return 0;
	key_setup(key, ekey);
	buf = vbuf;
	n--;
	r = n % 7;
	n /= 7;
	buf += n * 7;
	if(r)
		block_cipher(ekey, buf - 7 + r, 1);
	for(i = 0; i < n; i++){
		buf -= 7;
		block_cipher(ekey, buf, 1);
	}
	return 1;
}

block_cipher is des




^ permalink raw reply	[flat|nested] 11+ messages in thread

* [9fans] encrypt(void*, void*, int) and authentication
@ 2000-05-08 12:16 Lucio
  0 siblings, 0 replies; 11+ messages in thread
From: Lucio @ 2000-05-08 12:16 UTC (permalink / raw)


On Mon, May 08, 2000 at 03:12:57PM +0400, Roman V. Shaposhnick wrote:
> If yes, than, please, tell me whether 'encrypt(void*, void*, int)' uses
> classical DES algorithm ( as described in Bruce Schneier: Applied Cryptography.
> John Wiley & Sons, 1994. and implemented in libdes ) or not.
>
I used des.c straight out of Phil Karn's implementation, although I can't
quite remember where I found it, and I'm sure it ttok very little
adjustment.  If you need more details, mail me privately.

(I used des.c for the 9auth implementation under NetBSD, I must confess
I can't remember whether I ever tested it against the real thing).

I am curious about implementing 9fs for Linux, I presume you're
looking at 9P, as u9fs works out the box on NetBSD, so I can't
imagine any difficulties with Linux.

I've been dreaming of adding IL to the IP stack on NetBSD, and more
recently adding VNC to 9P (the latter without even looking at VNC's
protocol, so I'm merely dreaming...)

Anyway, anything that propagates the plan 9 faith always appeals
to my curiosity :-)

++L




^ permalink raw reply	[flat|nested] 11+ messages in thread

* [9fans] encrypt(void*, void*, int) and authentication
@ 2000-05-08 11:12 Roman
  0 siblings, 0 replies; 11+ messages in thread
From: Roman @ 2000-05-08 11:12 UTC (permalink / raw)


Hi,

I'm the guy who is implementing 9P for Linux ( p9fs ). Everything was quite
ok, before I started auth implementation. As you all know for the proper
authentication of the client client's kernel should decrypt a ticket
received from AS, and for this it should know encryption algorithm ;). I guess
that due to the famous US law  there is no such thing as 'crypt.c', am I right?
If yes, than, please, tell me whether 'encrypt(void*, void*, int)' uses
classical DES algorithm ( as described in Bruce Schneier: Applied Cryptography.
John Wiley & Sons, 1994. and implemented in libdes ) or not.

Thanks,
Roman.




^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2000-05-08 21:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-08 12:45 [9fans] encrypt(void*, void*, int) and authentication Lucio
  -- strict thread matches above, loose matches on Subject: below --
2000-05-08 21:13 Roman
2000-05-08 15:46 forsyth
2000-05-08 13:06 Lucio
2000-05-08 12:37 Lucio
2000-05-08 12:31 rob
2000-05-08 12:28 presotto
2000-05-08 12:27 Markus
2000-05-08 12:24 presotto
2000-05-08 12:16 Lucio
2000-05-08 11:12 Roman

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).