🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by dew Tue, 10 Jan 1984 15:16
Use of encrypt (3C)
#6
Author: dew
Date: Tue, 10 Jan 1984 15:16
18 lines
1143 bytes
Has anyone ever tried to decrypt a message using the setkey/encrypt
functions supplied in UNIX?

I am running on a 3B20S, under USG 5.0 UNIX. I need to take a message,
encrypt it, and then decrypt it.

Thinking that I might as well use the best - after all, these are the
functions that are used to encrypt passwords - I tried using these
two functions.  No luck.  I could not get the text decrypted.

I checked out how passwd(1) works, to see if it decrypted, but it does
not - just compares two encrypted strings.

Has anyone got any ideas?  I will use other functions if they are
available.

			Doug Whitten
			ihuxn!dewo1
Re: Use of encrypt (3C)
#7
Author: Jim Mayer
Date: Tue, 10 Jan 1984 19:38
45 lines
1703 bytes
There is a bug in the encrypt/setkey stuff under 4.1c.  The problem is
that the "E table" is initialized only in the crypt routine.  If
encrypt/setkey are used independently of crypt the "E table" is left
undefined.  You can use the routines if you call "crypt" first, but the
encryption will be done with a non standard table.  To fix the problem,
move the initialization "for" loop into "setkey".  You will also have
to move the declaration of the "e" and "E" arrays up above the "setkey"
definition (otherwise they are undefined).  The following stuff is a
"diff" between the old and new versions.

					-- Jim Mayer (rochester!mayer)

23a24,38
>  * The E bit-selection table.
>  */
> static	char	E[48];
> static	char	e[] = {
> 	32, 1, 2, 3, 4, 5,
	...
> 	28,29,30,31,32, 1,
> };
> 
> /*
104a120,125
> 	 *	Remember to initialize the E table first!
> 	 */
> 	for(i=0;i<48;i++)
> 		E[i] = e[i];
> 
> 	/*
144,158d164
<  * The E bit-selection table.
<  */
< static	char	E[48];
< static	char	e[] = {
< 	32, 1, 2, 3, 4, 5,
	...
< 	28,29,30,31,32, 1,
< };
< 
< /*
344,346d349
< 
< 	for(i=0;i<48;i++)
< 		E[i] = e[i];
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads