LOGPRE          - LOGIN PREFIX FILE                              21-AUG-1978 21:42:30   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (2)      40  DECLARATIONS

   (2)      87  DECLARATIONS

   (3)     116  HPWD

   (4)     171  CALC_CRC - Calculate CRC by hand

HPWD            - hash user password                             21-AUG-1978 21:42:30   VAX-11 MACRO X0.3-11               Page   1

01              DECLARATIONS                                                                                                     (1)



                                     0000     1 

                                     0000     2 	.TITLE	HPWD - hash user password

                                     0000     3 	.IDENT	/01/

                                     0000     4 

                                     0000     5 ;

                                     0000     6 ; COPYRIGHT (C) 1977

                                     0000     7 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS 01754

                                     0000     8 ;

                                     0000     9 ; THIS SOFTWARE IS FURNISHED  UNDER A LICENSE FOR USE ONLY ON A SINGLE

                                     0000    10 ; COMPUTER  SYSTEM AND  MAY BE  COPIED ONLY WITH  THE INCLUSION OF THE

                                     0000    11 ; ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE, OR ANY OTHER COPIES THEREOF,

                                     0000    12 ; MAY NOT BE PROVIDED OR  OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON

                                     0000    13 ; EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE

                                     0000    14 ; TERMS.  TITLE TO AND  OWNERSHIP OF THE  SOFTWARE  SHALL AT ALL TIMES

                                     0000    15 ; REMAIN IN DEC.

                                     0000    16 ;

                                     0000    17 ; THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE

                                     0000    18 ; AND SHOULD  NOT BE CONSTRUED  AS A COMMITMENT  BY DIGITAL  EQUIPMENT

                                     0000    19 ; CORPORATION.

                                     0000    20 ;

                                     0000    21 ; DEC ASSUMES  NO  RESPONSIBILITY  FOR  THE USE OR  RELIABILITY OF ITS

                                     0000    22 ; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

                                     0000    23 

                                     0000    24 ;++

                                     0000    25 ; FACILITY: User Verification Subroutine

                                     0000    26 ;

                                     0000    27 ; ABSTRACT:

                                     0000    28 ;

                                     0000    29 ; ENVIRONMENT:

                                     0000    30 ;

                                     0000    31 ; AUTHOR: H. M. Levy	, CREATION DATE: 20-Sep-1977

                                     0000    32 ;

                                     0000    33 ; MODIFIED BY:

                                     0000    34 ;

                                     0000    35 ;	, : VERSION

                                     0000    36 ; 01	- 

                                     0000    37 ;--

HPWD            - hash user password                             21-AUG-1978 21:42:30   VAX-11 MACRO X0.3-11               Page   2

01              DECLARATIONS                                                                                                     (2)



                                     0000    39 	.SBTTL	DECLARATIONS

                                     0000    40 ;

                                     0000    41 ; INCLUDE FILES:

                                     0000    42 ;

                                     0000    43 

                                     0000    44 ;

                                     0000    45 ; MACROS:

                                     0000    46 ;

                                     0000    47 

                                     0000    48 ;

                                     0000    49 ; EQUATED SYMBOLS:

                                     0000    50 ;

                                     0000    51 

                           00000004  0000    52 	PWDDSC = 4			; password descriptor argument

                                     0000    53 

                                     0000    54 ;

                                     0000    55 ; OWN STORAGE:

                                     0000    56 ;

                                 00000000    57 	.PSECT	_LIB$CODE	RD,NOWRT,BYTE,EXE

                                     0000    58 ;

                                     0000    59 ; AUTODIN-II polynomial table

                                     0000    60 ;

                                     0000    61 

                                     0000    62 AUTODIN:

26D930AC 3B6E20C8 1DB71064 00000000  0000    63 	.LONG	^O00000000000,^O03555610144,^O07333420310,^O04666230254

5005713C 4DB26158 6B6B51F4 76DC4190  0010    64 	.LONG	^O16667040620,^O15332650764,^O11554460530,^O12001270474

CB61B38C D6D6A3E8 F00F9344 EDB88320  0020    65 	.LONG	^O35556101440,^O36003711504,^O32665521750,^O31330331614

BDBDF21C A00AE278 86D3D2D4 9B64C2B0  0030    66 	.LONG	^O23331141260,^O20664751324,^O24002561170,^O27557371034

HPWD            - hash user password                             21-AUG-1978 21:42:30   VAX-11 MACRO X0.3-11               Page   3

01              HPWD                                                                                                             (3)



                                     0040    68 	.SBTTL	HPWD

                                     0040    69 

                                     0040    70 ;++

                                     0040    71 ;

                                     0040    72 ; FUNCTIONAL DESCRIPTION:

                                     0040    73 ;

                                     0040    74 ;	Smash up the password into a 32-bit non-reversable number.

                                     0040    75 ;

                                     0040    76 ; CALLINGS SEQUENCE:

                                     0040    77 ;

                                     0040    78 ;	CALLS/CALLG

                                     0040    79 ;

                                     0040    80 ; INPUTS:

                                     0040    81 ;

                                     0040    82 ;	PWDDSC - descriptor for the password string

                                     0040    83 ;

                                     0040    84 ; IMPLICIT INPUTS:

                                     0040    85 ;

                                     0040    86 ;	none

                                     0040    87 ;

                                     0040    88 ; OUTPUTS:

                                     0040    89 ;

                                     0040    90 ;	none

                                     0040    91 ;

                                     0040    92 ; IMPLICIT OUTPUTS:

                                     0040    93 ;

                                     0040    94 ;	none

                                     0040    95 ;

                                     0040    96 ; ROUTINE VALUE:

                                     0040    97 ;

                                     0040    98 ;	32-bit hashed password

                                     0040    99 ;

                                     0040   100 ; SIDE EFFECTS:

                                     0040   101 ;

                                     0040   102 ;	none

                                     0040   103 ;--

                                     0040   104 

                                     0040   105 

                                     0040   106 ;

                                     0040   107 ; **** TEMPORARY ALGORITHM - TO BE REPLACED ****

                                     0040   108 ;

                                     0040   109 

                                     0040   110 LGI$HPWD::

                               001C  0040   111 	.WORD	^M<R2,R3,R4>		; entry mask

            52         04 AC     D0  0042   112 	MOVL	PWDDSC(AP),R2		; get descriptor address

            53         04 A2     D0  0046   113 	MOVL	4(R2),R3		; get string address

            52            62     3C  004A   114 	MOVZWL	(R2),R2			; get string length

            51         B0 AF     DE  004D   115 	MOVAL	AUTODIN,R1		; get table address

            50            01     CE  0051   116 	MNEGL	#1,R0			; initial crc

                                     0054   117 ;**** TEMP UNTIL CRC MICROCODE WORKS

                                     0054   118 ;	CRC	AUTODIN,R0,(R1),(R2)	; convert password to 32-bit number

                          01     10  0054   119 	BSBB	CALC_CRC

                                 04  0056   120 	RET				; return to caller

                                     0057   121 

HPWD            - hash user password                             21-AUG-1978 21:42:30   VAX-11 MACRO X0.3-11               Page   4

01              CALC_CRC - Calculate CRC by hand                                                                                 (4)



                                     0057   123 	.SBTTL	CALC_CRC - Calculate CRC by hand

                                     0057   124 ;++

                                     0057   125 ; FUNCTIONAL DESCRIPTION:

                                     0057   126 ;

                                     0057   127 ;	The CRC function is calculated per the SRM.

                                     0057   128 ;

                                     0057   129 ; CALLING SEQUENCE:

                                     0057   130 ;

                                     0057   131 ;	NONE

                                     0057   132 ;

                                     0057   133 ; INPUT PARAMETERS:

                                     0057   134 ;

                                     0057   135 ;	R0 = initial CRC value

                                     0057   136 ;	R1 = table address

                                     0057   137 ;	R2 = string length as a word

                                     0057   138 ;	R3 = string address

                                     0057   139 ;	JSB

                                     0057   140 ;

                                     0057   141 ; IMPLICIT INPUTS:

                                     0057   142 ;

                                     0057   143 ;	NONE

                                     0057   144 ;

                                     0057   145 ; OUTPUT PARAMETERS:

                                     0057   146 ;

                                     0057   147 ;	R0 = final CRC value

                                     0057   148 ;	R1:R2 = 0

                                     0057   149 ;	R3 = string end address + 1

                                     0057   150 ;

                                     0057   151 ; IMPLICIT OUTPUTS:

                                     0057   152 ;

                                     0057   153 ;	NONE

                                     0057   154 ;

                                     0057   155 ; COMPLETION CODES:

                                     0057   156 ;

                                     0057   157 ;	NONE

                                     0057   158 ;

                                     0057   159 ; SIDE EFFECTS:

                                     0057   160 ;

                                     0057   161 ;	NONE

                                     0057   162 ;

                                     0057   163 ;--

                                     0057   164 CALC_CRC:

            52            52     3C  0057   165 	MOVZWL	R2,R2			;Convert to longword length

                          54     DD  005A   166 	PUSHL	R4			;Save a temp

                          54     D4  005C   167 	CLRL	R4			;Clear junk for indexing

                          52     B6  005E   168 	INCW	R2			;Advance count for SOBGTR

                          1F     11  0060   169 	BRB	20$			;Start with end test

                                     0062   170 

                                     0062   171 ;

                                     0062   172 ; Loop for each byte of input string

                                     0062   173 ;

                                     0062   174 

            50            83     8C  0062   175 10$:	XORB2	(R3)+,R0		;Include next byte

            50         F0 8F     8B  0065   176 	BICB3	#^XF0,R0,R4		;Get right 4 bits

                          54         0069       

            1C            04     EF  006A   177 	EXTZV	#4,#28,R0,R0		;Shift result right 4

            50            50         006D       

HPWD            - hash user password                             21-AUG-1978 21:42:30   VAX-11 MACRO X0.3-11               Page   5

01              CALC_CRC - Calculate CRC by hand                                                                                 (4)



            50            6144   CC  006F   178 	XORL2	(R1)[R4],R0		;Include table entry

            50         F0 8F     8B  0073   179 	BICB3	#^XF0,R0,R4		;Get right 4 bits

                          54         0077       

            1C            04     EF  0078   180 	EXTZV	#4,#28,R0,R0		;Shift result right 4

            50            50         007B       

            50            6144   CC  007D   181 	XORL2	(R1)[R4],R0		;Include table entry

            DE            52     F5  0081   182 20$:	SOBGTR	R2,10$			;Count down loop

                                     0084   183 

                          10     BA  0084   184 	POPR	#^M<R4>			;Restore temp

                          51     D4  0086   185 	CLRL	R1			;Clear R1 per spec

                          03     B9  0088   186 	BICPSW	#^X3			;Clear V, C cond codes

                          50     D5  008A   187 	TSTL	R0			;Set N, Z cond codes

                                 05  008C   188 	RSB				;Return to caller

                                     008D   189 

                                     008D   190 	.END

HPWD            - hash user password                             21-AUG-1978 21:42:30   VAX-11 MACRO X0.3-11               Page   6

SYMBOL TABLE                                                                                                                     (4)



AUTODIN          00000000 R     02   

CALC_CRC         00000057 R     02   

LGI$HPWD         00000040 RG    02   

PWDDSC         = 00000004            





PROGRAM SECTION SYNOPSIS



.  ABS  .        00000000      00     NOPIC   USR   CON   ABS   LCL NOSHR NOEXE NORD  NOWRT BYTE  

. BLANK .        00000000      01     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  

_LIB$CODE        0000008D      02     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD  NOWRT BYTE  





THERE WERE NO ERRORS OR WARNINGS.

28450. BYTES LEFT IN FREE MEMORY POOL.

OBJ$:HPWD,LIS$:HPWD/-SP=SRCD$:[LOGIN.SRC]LOGPRE,HPWD

0 MLB DIR RDS - 0 GETS TO DEFINE 0 MACROS. 2 INTER. FILE WRITES. 

