ASSEMBLY LISTING OF SEGMENT >dumps>old>recomp>encipher_.alm ASSEMBLED ON: 11/04/82 1848.2 mst Thu OPTIONS USED: list ASSEMBLED BY: ALM Version 6.4 April 1981 ASSEMBLER CREATED: 11/03/82 1423.6 mst Wed  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 " This procedure enciphers an arrya of double words, i.e., fixed bin(71),  12 " using the key that is provided. It has entries to both encipher and decipher:  13 "  14 " call encipher_(key,input_array,output_array,array_length) 15 "  16 " call decipher_(key,input_array,output_array,array_length) 17 "  18 " where: key is fixed bin(71) key for coding  19 " input_array(array_length) is fixed bin(71) array  20 " output_array(array_length) is fixed bin(71) array 21 " array_length is fixed bin(17) length (double words) of array  22 "  23 " Coded 1 April 1973 by Roger R. Schell, Major, USAF  24 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 25  000000 26 entry encipher_  000004 27 entry decipher_  28  000002 29 equ key,2  000004 30 equ input_array,4  000006 31 equ output_array,6 000010 32 equ array_length,8 33  34 "  35 " Entry to encipher 36 "  37  000000 38 encipher_:  000000 aa 000100 6270 00 39 push  000001 aa 7 00040 2721 20 000002 aa 0 00006 3701 20 40 epplp ap|output_array,* "LP -> cipher text 000003 0a 000007 7100 00 41 tra setup_keys 42  43 "  44 " Entry to decipher 45 "  46  000004 47 decipher_:  000004 aa 000100 6270 00 48 push  000005 aa 7 00040 2721 20 000006 aa 0 00004 3701 20 49 epplp ap|input_array,* "set LP -> cipher text  50  000007 51 setup_keys: 52 "First create internal keying variables 53 "Use Tausworth pseudo-random number generator on key  54  000013 55 equ shift,11 "Shift for generator 000044 56 equ size,36 "Word size used for generator 57  58 tempd variables(12) "Internal keying variables 59  000007 aa 000000 6260 00 60 eax6 0 "loop index in x6  000010 aa 0 00002 2371 20 61 ldaq ap|key,* "Start with input key  62  000011 63 mask_loop:  64 "Create masks  000011 aa 6 00050 7571 16 65 staq variables,6 "save copy of generator seed  000012 aa 000013 7720 00 66 qrl shift "Now generate pseudo-random number  000013 aa 000013 7710 00 67 arl shift  000014 aa 6 00050 6771 16 68 eraq variables,6  000015 aa 6 00050 7571 16 69 staq variables,6  000016 aa 000031 7360 00 70 qls size-shift 000017 aa 000031 7350 00 71 als size-shift 000020 aa 6 00050 6771 16 72 eraq variables,6  000021 aa 6 00050 7571 16 73 staq variables,6 "Save result  74  000022 aa 000002 6260 16 75 eax6 2,6  000023 aa 000022 1060 03 76 cmpx6 18,du "Generate 9 double words  000024 0a 000011 6010 00 77 tnz mask_loop  78  79 "  80 "Next create 7-bit shift variables  81  000025 aa 000000 6260 00 82 eax6 0 000026 aa 000013 7730 00 83 lrl 11 "First 7 bits to upper A-reg  000027 aa 000000 6200 00 84 eax0 0 "Zero for clearing half word  000030 85 shift_loop: 000030 aa 6 00070 7551 16 86 sta variables+A1,6 "Upper A-reg is shift variable  000031 aa 6 00070 4401 16 87 sxl0 variables+A1,6 "Zero lower half word  000032 aa 000007 7370 00 88 lls 7  000033 0a 000116 3750 00 89 ana =o000177777777 "Save 7 bits in upper A-reg 000034 aa 000001 6260 16 90 eax6 1,6  000035 aa 000007 1060 03 91 cmpx6 7,du "Generate 7 shift variables  000036 0a 000030 6010 00 92 tnz shift_loop 93  94 "  95 " Now that we have needed variables, aply the cipher  96 "  97  98 "Declaration of offsets of keying variables 000000 99 equ C0,0 "Initial cipher text from key  000002 100 equ M1,2 "Mask variables  000004 101 equ M2,4  000006 102 equ M3,6  000010 103 equ M4,8  000012 104 equ M5,10  000014 105 equ M6,12  000016 106 equ M7,14  000020 107 equ A1,16 "Amount of shift -- as address  000021 108 equ A2,17  000022 109 equ A3,18  000023 110 equ A4,19  000024 111 equ A5,20  000025 112 equ A6,21  000026 113 equ A7,22  114  000037 aa 0 00010 7251 20 115 lxl5 ap|array_length,* "Get length (double words)  000040 aa 777777 6250 15 116 eax5 -1,5 "Check for zero or negative 000041 0a 000103 6040 00 117 tmi return 000042 aa 000000 6260 00 118 eax6 0 "X6 is index into arrays  000043 aa 6 00050 3521 00 119 eppbp variables+C0 "Initial cipher text from key  000044 120 cipher_loop:  000044 aa 2 00000 2371 00 121 ldaq bp|0  122  123 "First compute select function  124  000045 aa 6 00075 7771 20 125 llr variables+A6,* 000046 aa 6 00064 0371 00 126 adlaq variables+M6 000047 aa 6 00076 7771 20 127 llr variables+A7,* 000050 aa 6 00066 6771 00 128 eraq variables+M7  000051 aa 000000 6210 06 129 eax1 0,ql "Save select function  130 "  131 "Compute value  132 "  000052 aa 2 00000 2371 00 133 ldaq bp|0  000053 aa 6 00070 7771 20 134 llr variables+A1,* 000054 aa 6 00052 0371 00 135 adlaq variables+M1 000055 aa 000010 3010 03 136 canx1 =o10,du  000056 aa 000002 6010 04 137 tnz 2,ic  000057 aa 6 00071 7771 20 138 llr variables+A2,* 000060 aa 6 00054 6771 00 139 eraq variables+M2  000061 aa 000004 3010 03 140 canx1 =o4,du  000062 aa 000002 6010 04 141 tnz 2,ic  000063 aa 6 00072 7771 20 142 llr variables+A3,* 000064 aa 6 00056 0371 00 143 adlaq variables+M3 000065 aa 000002 3010 03 144 canx1 =o2,du  000066 aa 000002 6010 04 145 tnz 2,ic  000067 aa 6 00073 7771 20 146 llr variables+A4,* 000070 aa 6 00060 6771 00 147 eraq variables+M4  000071 aa 000001 3010 03 148 canx1 =o1,du  000072 aa 000002 6010 04 149 tnz 2,ic  000073 aa 6 00074 7771 20 150 llr variables+A5,* 000074 aa 6 00062 0371 00 151 adlaq variables+M5 "AQ contains computed key  152  000075 aa 4 00000 3521 16 153 eppbp lp|0,6 "set BP -> next cipher text autokey  000076 aa 0 00004 6771 76 154 eraq ap|input_array,*6 000077 aa 0 00006 7571 76 155 staq ap|output_array,*6 "return ciphered value 000100 aa 000002 6260 16 156 eax6 2,6 "Increment array offset  000101 aa 777777 6250 15 157 eax5 -1,5 "Check for end of array 000102 0a 000044 6050 00 158 tpl cipher_loop  000103 159 return: 160 "  161 "Clean up the 'dirty blackboard' before returning  162  005202 163 bool rpt,5202 "RPT instruction  164  000103 0a 000103 2370 00 165 ldaq * " Load AQ with garbage 000104 aa 000000 6260 00 166 eax6 0 000105 aa 026200 520202 167 vfd 8/11,2/0,1/1,7/0,12/rpt,6/2 "RPT instruction  000106 aa 6 00050 7571 16 168 staq variables,6 "Overwrite keying variables  169  000107 aa 7 00042 7101 20 170 return 171  172 end  ENTRY SEQUENCES  000110 5a 000017 0000 00 000111 aa 7 00046 2721 20 000112 0a 000000 7100 00 000113 5a 000011 0000 00 000114 aa 7 00046 2721 20 000115 0a 000004 7100 00 LITERALS 000116 aa 000177 777777 NAME DEFINITIONS FOR ENTRY POINTS AND SEGDEFS 000117 5a 000003 000000 000120 5a 000034 600000 000121 aa 000000 000000 000122 55 000011 000002 000123 5a 000002 400003 000124 55 000006 000011 000125 aa 011 145 156 143 000126 aa 151 160 150 145 000127 aa 162 137 000 000 000130 55 000017 000003 000131 0a 000114 500000 000132 55 000014 000003 000133 aa 011 144 145 143 decipher_  000134 aa 151 160 150 145 000135 aa 162 137 000 000 000136 55 000025 000011 000137 0a 000111 500000 000140 55 000022 000003 000141 aa 011 145 156 143 encipher_  000142 aa 151 160 150 145 000143 aa 162 137 000 000 000144 55 000002 000017 000145 6a 000000 400002 000146 55 000030 000003 000147 aa 014 163 171 155 symbol_table  000150 aa 142 157 154 137 000151 aa 164 141 142 154 000152 aa 145 000 000 000 DEFINITIONS HASH TABLE  000153 aa 000000 000015 000154 aa 000000 000000 000155 aa 000000 000000 000156 aa 000000 000000 000157 aa 000000 000000 000160 5a 000011 000000 000161 aa 000000 000000 000162 5a 000025 000000 000163 aa 000000 000000 000164 aa 000000 000000 000165 5a 000017 000000 000166 aa 000000 000000 000167 aa 000000 000000 000170 aa 000000 000000 NO EXTERNAL NAMES  NO TRAP POINTER WORDS  TYPE PAIR BLOCKS  000171 aa 000001 000000 000172 aa 000000 000000 INTERNAL EXPRESSION WORDS 000173 aa 000000 000000 LINKAGE INFORMATION 000000 aa 000000 000000 000001 0a 000117 000000 000002 aa 000000 000000 000003 aa 000000 000000 000004 aa 000000 000000 000005 aa 000000 000000 000006 22 000010 000010 000007 a2 000000 000000 SYMBOL INFORMATION SYMBOL TABLE HEADER  000000 aa 000000 000001 000001 aa 163171 155142 000002 aa 164162 145145 000003 aa 000000 000004 000004 aa 000000 111316 000005 aa 510113 575622 000006 aa 000000 111320 000007 aa 102131 374350 000010 aa 141154 155040 000011 aa 040040 040040 000012 aa 000024 000040 000013 aa 000034 000040 000014 aa 000044 000100 000015 aa 000002 000002 000016 aa 000064 000000 000017 aa 000000 000123 000020 aa 000000 000102 000021 aa 000000 000112 000022 aa 000115 000102 000023 aa 000064 000000 000024 aa 101114 115040 000025 aa 126145 162163 000026 aa 151157 156040 000027 aa 040066 056064 000030 aa 040040 101160 000031 aa 162151 154040 000032 aa 061071 070061 000033 aa 040040 040040 000034 aa 110157 154155 000035 aa 163164 145144 000036 aa 164056 123171 000037 aa 163115 141151 000040 aa 156164 056155 000041 aa 040040 040040 000042 aa 040040 040040 000043 aa 040040 040040 000044 aa 154151 163164 000045 aa 040040 040040 000046 aa 040040 040040 000047 aa 040040 040040 000050 aa 040040 040040 000051 aa 040040 040040 000052 aa 040040 040040 000053 aa 040040 040040 000054 aa 040040 040040 000055 aa 040040 040040 000056 aa 040040 040040 000057 aa 040040 040040 000060 aa 040040 040040 000061 aa 040040 040040 000062 aa 040040 040040 000063 aa 040040 040040 000064 aa 000000 000001 000065 aa 000000 000001 000066 aa 000072 000037 000067 aa 113171 051005 000070 aa 000000 111320 000071 aa 005263 200000 000072 aa 076144 165155 >dumps>old>recomp>encipher_.alm 000073 aa 160163 076157 000074 aa 154144 076162 000075 aa 145143 157155 000076 aa 160076 145156 000077 aa 143151 160150 000100 aa 145162 137056 000101 aa 141154 155040 MULTICS ASSEMBLY CROSS REFERENCE LISTING Value Symbol Source file Line number  20 A1 encipher_: 86, 87, 107, 134.  21 A2 encipher_: 108, 138.  22 A3 encipher_: 109, 142.  23 A4 encipher_: 110, 146.  24 A5 encipher_: 111, 150.  25 A6 encipher_: 112, 125.  26 A7 encipher_: 113, 127.  10 array_length encipher_: 32, 115.  0 C0 encipher_: 99, 119.  44 cipher_loop encipher_: 120, 158.  4 decipher_ encipher_: 27, 47.  0 encipher_ encipher_: 26, 38.  4 input_array encipher_: 30, 49, 154. 2 key encipher_: 29, 61.  2 M1 encipher_: 100, 135.  4 M2 encipher_: 101, 139.  6 M3 encipher_: 102, 143.  10 M4 encipher_: 103, 147.  12 M5 encipher_: 104, 151.  14 M6 encipher_: 105, 126.  16 M7 encipher_: 106, 128.  11 mask_loop encipher_: 63, 77.  6 output_array encipher_: 31, 40, 155. 103 return encipher_: 117, 159.  5202 rpt encipher_: 163, 167.  7 setup_keys encipher_: 41, 51.  13 shift encipher_: 55, 66, 67, 70, 71. 30 shift_loop encipher_: 85, 92.  44 size encipher_: 56, 70, 71. 50 variables encipher_: 58, 65, 68, 69, 72, 73, 86, 87, 119, 125, 126, 127,  128, 134, 135, 138, 139, 142, 143, 146, 147, 150, 151, 168.  NO FATAL ERRORS  ----------------------------------------------------------- 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