COMPILATION LISTING OF SEGMENT scramble_ Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/12/82 1232.2 mst Fri Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 /* format: style4 */ 12 scramble_: proc (arg) returns (char (8)); 13 14 /* SCRAMBLE_ - Scramble a char (8) string. 15* 16* This procedure, given a password as input, returns an 8-character output string which: 17* 1. bears some relationship to the input 18* 2. loses some information - some passwords may scramble to the same value 19* 3. has no obvious relation to the input ("aaaaaaaa" and "aaaaaaab" 20* . scramble to noticeably different values.) 21* 22* Passwords stored in system files are scrambled, so that if anyone gets a dump 23* of the password file by accident, it won't do him much good. 24* 25* The transform is supposed to be non-invertible. 26* 27* A previous version of this program had two defects: 28* 1) It was invertible, as Steve Lipner demonstrated. 29* 2) It depended on double-precision MOD and MULTIPLY. These turned out 30* . to have been incorrectly implemented by PL/I and so the scramble, 31* . while good, would have given different values if the bugs were fixed. 32* 33* Method: 34* 1. strip the two high-order bits of each ASCII character, packing to the right. 35* 2. treat the resulting 56-bit quantity as both key and cipher text for 36* . the system enciphering program. 37* 3. destroy selected bits of the resulting cipher. 38* 39* Revised 5/21/73, THVV, for new algorithm. 40* THVV 10/30/71 41**/ 42 43 dcl arg char (8); 44 45 dcl temp char (8), 46 temp1 (1) fixed bin (71), 47 temp2 (1) fixed bin (71), 48 (p1, p2, p3) ptr, /* ptrs to based overlays */ 49 (i, k) fixed bin; 50 51 dcl bbt bit (72) aligned based (p1), 52 b72 bit (72) aligned based (p3), 53 bc8 char (8) aligned based (p3); 54 55 dcl 1 tsx based (p2) aligned, 56 2 pad bit (16) unal, 57 2 z (8) bit (7) unal; 58 59 dcl encipher_ entry (fixed bin (71), dim (*) fixed bin (71), dim (*) fixed bin (71), fixed bin); 60 61 dcl (addr, fixed, mod, substr) builtin; 62 63 /* ------------------------------------------------------- */ 64 65 temp = arg; /* copy argument */ 66 p1 = addr (temp); 67 p2 = addr (temp1 (1)); 68 p3 = addr (temp2 (1)); 69 temp1 (1) = 0; 70 k = 1; 71 do i = 3 to 72 by 9; 72 z (k) = substr (bbt, i, 7); /* squeeze out always-zero bits */ 73 k = k + 1; 74 end; 75 temp = ""; /* Erase temporary copy */ 76 call encipher_ (temp1 (1), temp1, temp2, 1); /* Encipher the password. */ 77 temp1 (1) = 0; /* Tidy up */ 78 b72 = b72 & "111111110111111110111111110111111110111111110111111110111111110111111110"b; 79 return (bc8); 80 81 end; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/12/82 1043.5 scramble_.pl1 >spec>on>11/12/82>scramble_.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. addr builtin function dcl 61 ref 66 67 68 arg parameter char(8) unaligned dcl 43 ref 12 65 b72 based bit(72) dcl 51 set ref 78* 78 bbt based bit(72) dcl 51 ref 72 bc8 based char(8) dcl 51 ref 79 encipher_ 000010 constant entry external dcl 59 ref 76 i 000114 automatic fixed bin(17,0) dcl 45 set ref 71* 72* k 000115 automatic fixed bin(17,0) dcl 45 set ref 70* 72 73* 73 p1 000106 automatic pointer dcl 45 set ref 66* 72 p2 000110 automatic pointer dcl 45 set ref 67* 72 p3 000112 automatic pointer dcl 45 set ref 68* 78 78 79 substr builtin function dcl 61 ref 72 temp 000100 automatic char(8) unaligned dcl 45 set ref 65* 66 75* temp1 000102 automatic fixed bin(71,0) array dcl 45 set ref 67 69* 76* 76* 77* temp2 000104 automatic fixed bin(71,0) array dcl 45 set ref 68 76* tsx based structure level 1 dcl 55 z 0(16) based bit(7) array level 2 packed unaligned dcl 55 set ref 72* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. fixed builtin function dcl 61 mod builtin function dcl 61 NAME DECLARED BY EXPLICIT CONTEXT. scramble_ 000022 constant entry external dcl 12 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 166 200 133 176 Length 340 133 12 123 32 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME scramble_ 98 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME scramble_ 000100 temp scramble_ 000102 temp1 scramble_ 000104 temp2 scramble_ 000106 p1 scramble_ 000110 p2 scramble_ 000112 p3 scramble_ 000114 i scramble_ 000115 k scramble_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc return ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. encipher_ NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 12 000016 65 000027 66 000034 67 000036 68 000040 69 000042 70 000044 71 000046 72 000053 73 000063 74 000064 75 000067 76 000071 77 000117 78 000121 79 000125 ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved