home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1160 < prev    next >
Internet Message Format  |  1990-12-28  |  11KB

  1. From: dcoskun@alias.UUCP (Denis Coskun)
  2. Newsgroups: alt.sources
  3. Subject: [sci.crypt] Re: Testing DES
  4. Message-ID: <11650@stag.math.lsa.umich.edu>
  5. Date: 7 Apr 90 15:27:49 GMT
  6.  
  7. Archive-name: des-validation/05-Apr-90
  8. Original-posting-by: dcoskun@alias.UUCP (Denis Coskun)
  9. Original-subject: Re: Testing DES
  10. Reposted-by: emv@math.lsa.umich.edu (Edward Vielmetti)
  11.  
  12. [This is an experimental alt.sources re-posting from the newsgroup(s)
  13. sci.crypt. Comments on this service to emv@math.lsa.umich.edu 
  14. (Edward Vielmetti).]
  15.  
  16.  
  17. In article <12506@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes:
  18. >   >Is there any semi-official validation suite for DES implementations ?
  19. >
  20. > As I recall, the DES spec itself contains some examples for validation
  21. > purposes.
  22.  
  23. Not in the DES spec itself (NBS FIPS 46 or ANSI X3.92), but in a special
  24. publication from the National Bureau of Standards (now known as NIST):
  25. NBS SP-500 "Validating the Correctness of Hardware Implementations of
  26. the NBS Data Encryption Standard".  Like the title says, this was
  27. intended for validating hardware (the NBS never validated software
  28. implementations).  But it does contain an appendix listing 171 triplets
  29. of <key,plaintext,ciphertext> which would be useful to verify DES in
  30. software.  I typed these in at one time to test my own and other DES
  31. routines.  The NBS standard test performs the IP/E and PC1/PC2 tests as
  32. shown below, and then a second time reversing the data in the plaintext
  33. and ciphertext columns and decrypting instead.  This gives a total of
  34. 291 fixed test cases.  Incidentally, the NBS publication has a mistake
  35. on line 30 of the IP/E test (no kidding!) which I've corrected in my
  36. listing below.
  37.  
  38. Key              Plain            Cipher
  39.  
  40. /* IP and E Test */
  41.  
  42. 0101010101010101 95F8A5E5DD31D900 8000000000000000
  43. 0101010101010101 DD7F121CA5015619 4000000000000000
  44. 0101010101010101 2E8653104F3834EA 2000000000000000
  45. 0101010101010101 4BD388FF6CD81D4F 1000000000000000
  46. 0101010101010101 20B9E767B2FB1456 0800000000000000
  47. 0101010101010101 55579380D77138EF 0400000000000000
  48. 0101010101010101 6CC5DEFAAF04512F 0200000000000000
  49. 0101010101010101 0D9F279BA5D87260 0100000000000000
  50. 0101010101010101 D9031B0271BD5A0A 0080000000000000
  51. 0101010101010101 424250B37C3DD951 0040000000000000
  52. 0101010101010101 B8061B7ECD9A21E5 0020000000000000
  53. 0101010101010101 F15D0F286B65BD28 0010000000000000
  54. 0101010101010101 ADD0CC8D6E5DEBA1 0008000000000000
  55. 0101010101010101 E6D5F82752AD63D1 0004000000000000
  56. 0101010101010101 ECBFE3BD3F591A5E 0002000000000000
  57. 0101010101010101 F356834379D165CD 0001000000000000
  58. 0101010101010101 2B9F982F20037FA9 0000800000000000
  59. 0101010101010101 889DE068A16F0BE6 0000400000000000
  60. 0101010101010101 E19E275D846A1298 0000200000000000
  61. 0101010101010101 329A8ED523D71AEC 0000100000000000
  62. 0101010101010101 E7FCE22557D23C97 0000080000000000
  63. 0101010101010101 12A9F5817FF2D65D 0000040000000000
  64. 0101010101010101 A484C3AD38DC9C19 0000020000000000
  65. 0101010101010101 FBE00A8A1EF8AD72 0000010000000000
  66. 0101010101010101 750D079407521363 0000008000000000
  67. 0101010101010101 64FEED9C724C2FAF 0000004000000000
  68. 0101010101010101 F02B263B328E2B60 0000002000000000
  69. 0101010101010101 9D64555A9A10B852 0000001000000000
  70. 0101010101010101 D106FF0BED5255D7 0000000800000000
  71. 0101010101010101 E1652C6B138C64A5 0000000400000000
  72. 0101010101010101 E428581186EC8F46 0000000200000000
  73. 0101010101010101 AEB5F5EDE22D1A36 0000000100000000
  74. 0101010101010101 E943D7568AEC0C5C 0000000080000000
  75. 0101010101010101 DF98C8276F54B04B 0000000040000000
  76. 0101010101010101 B160E4680F6C696F 0000000020000000
  77. 0101010101010101 FA0752B07D9C4AB8 0000000010000000
  78. 0101010101010101 CA3A2B036DBC8502 0000000008000000
  79. 0101010101010101 5E0905517BB59BCF 0000000004000000
  80. 0101010101010101 814EEB3B91D90726 0000000002000000
  81. 0101010101010101 4D49DB1532919C9F 0000000001000000
  82. 0101010101010101 25EB5FC3F8CF0621 0000000000800000
  83. 0101010101010101 AB6A20C0620D1C6F 0000000000400000
  84. 0101010101010101 79E90DBC98F92CCA 0000000000200000
  85. 0101010101010101 866ECEDD8072BB0E 0000000000100000
  86. 0101010101010101 8B54536F2F3E64A8 0000000000080000
  87. 0101010101010101 EA51D3975595B86B 0000000000040000
  88. 0101010101010101 CAFFC6AC4542DE31 0000000000020000
  89. 0101010101010101 8DD45A2DDF90796C 0000000000010000
  90. 0101010101010101 1029D55E880EC2D0 0000000000008000
  91. 0101010101010101 5D86CB23639DBEA9 0000000000004000
  92. 0101010101010101 1D1CA853AE7C0C5F 0000000000002000
  93. 0101010101010101 CE332329248F3228 0000000000001000
  94. 0101010101010101 8405D1ABE24FB942 0000000000000800
  95. 0101010101010101 E643D78090CA4207 0000000000000400
  96. 0101010101010101 48221B9937748A23 0000000000000200
  97. 0101010101010101 DD7C0BBD61FAFD54 0000000000000100
  98. 0101010101010101 2FBC291A570DB5C4 0000000000000080
  99. 0101010101010101 E07C30D7E4E26E12 0000000000000040
  100. 0101010101010101 0953E2258E8E90A1 0000000000000020
  101. 0101010101010101 5B711BC4CEEBF2EE 0000000000000010
  102. 0101010101010101 CC083F1E6D9E85F6 0000000000000008
  103. 0101010101010101 D2FD8867D50D2DFE 0000000000000004
  104. 0101010101010101 06E7EA22CE92708F 0000000000000002
  105. 0101010101010101 166B40B44ABA4BD6 0000000000000001
  106.  
  107. /* PC1 and PC2 test */
  108.  
  109. 8001010101010101 0000000000000000 95A8D72813DAA94D
  110. 4001010101010101 0000000000000000 0EEC1487DD8C26D5
  111. 2001010101010101 0000000000000000 7AD16FFB79C45926
  112. 1001010101010101 0000000000000000 D3746294CA6A6CF3
  113. 0801010101010101 0000000000000000 809F5F873C1FD761
  114. 0401010101010101 0000000000000000 C02FAFFEC989D1FC
  115. 0201010101010101 0000000000000000 4615AA1D33E72F10
  116. 0180010101010101 0000000000000000 2055123350C00858
  117. 0140010101010101 0000000000000000 DF3B99D6577397C8
  118. 0120010101010101 0000000000000000 31FE17369B5288C9
  119. 0110010101010101 0000000000000000 DFDD3CC64DAE1642
  120. 0108010101010101 0000000000000000 178C83CE2B399D94
  121. 0104010101010101 0000000000000000 50F636324A9B7F80
  122. 0102010101010101 0000000000000000 A8468EE3BC18F06D
  123. 0101800101010101 0000000000000000 A2DC9E92FD3CDE92
  124. 0101400101010101 0000000000000000 CAC09F797D031287
  125. 0101200101010101 0000000000000000 90BA680B22AEB525
  126. 0101100101010101 0000000000000000 CE7A24F350E280B6
  127. 0101080101010101 0000000000000000 882BFF0AA01A0B87
  128. 0101040101010101 0000000000000000 25610288924511C2
  129. 0101020101010101 0000000000000000 C71516C29C75D170
  130. 0101018001010101 0000000000000000 5199C29A52C9F059
  131. 0101014001010101 0000000000000000 C22F0A294A71F29F
  132. 0101012001010101 0000000000000000 EE371483714C02EA
  133. 0101011001010101 0000000000000000 A81FBD448F9E522F
  134. 0101010801010101 0000000000000000 4F644C92E192DFED
  135. 0101010401010101 0000000000000000 1AFA9A66A6DF92AE
  136. 0101010201010101 0000000000000000 B3C1CC715CB879D8
  137. 0101010180010101 0000000000000000 19D032E64AB0BD8B
  138. 0101010140010101 0000000000000000 3CFAA7A7DC8720DC
  139. 0101010120010101 0000000000000000 B7265F7F447AC6F3
  140. 0101010110010101 0000000000000000 9DB73B3C0D163F54
  141. 0101010108010101 0000000000000000 8181B65BABF4A975
  142. 0101010104010101 0000000000000000 93C9B64042EAA240
  143. 0101010102010101 0000000000000000 5570530829705592
  144. 0101010101800101 0000000000000000 8638809E878787A0
  145. 0101010101400101 0000000000000000 41B9A79AF79AC208
  146. 0101010101200101 0000000000000000 7A9BE42F2009A892
  147. 0101010101100101 0000000000000000 29038D56BA6D2745
  148. 0101010101080101 0000000000000000 5495C6ABF1E5DF51
  149. 0101010101040101 0000000000000000 AE13DBD561488933
  150. 0101010101020101 0000000000000000 024D1FFA8904E389
  151. 0101010101018001 0000000000000000 D1399712F99BF02E
  152. 0101010101014001 0000000000000000 14C1D7C1CFFEC79E
  153. 0101010101012001 0000000000000000 1DE5279DAE3BED6F
  154. 0101010101011001 0000000000000000 E941A33F85501303
  155. 0101010101010801 0000000000000000 DA99DBBC9A03F379
  156. 0101010101010401 0000000000000000 B7FC92F91D8E92E9
  157. 0101010101010201 0000000000000000 AE8E5CAA3CA04E85
  158. 0101010101010180 0000000000000000 9CC62DF43B6EED74
  159. 0101010101010140 0000000000000000 D863DBB5C59A91A0
  160. 0101010101010120 0000000000000000 A1AB2190545B91D7
  161. 0101010101010110 0000000000000000 0875041E64C570F7
  162. 0101010101010108 0000000000000000 5A594528BEBEF1CC
  163. 0101010101010104 0000000000000000 FCDB3291DE21F0C0
  164. 0101010101010102 0000000000000000 869EFD7F9F265A09
  165.  
  166. /* P Test */
  167.  
  168. 1046913489980131 0000000000000000 88D55E54F54C97B4
  169. 1007103489988020 0000000000000000 0C0CC00C83EA48FD
  170. 10071034C8980120 0000000000000000 83BC8EF3A6570183
  171. 1046103489988020 0000000000000000 DF725DCAD94EA2E9
  172. 1086911519190101 0000000000000000 E652B53B550BE8B0
  173. 1086911519580101 0000000000000000 AF527120C485CBB0
  174. 5107B01519580101 0000000000000000 0F04CE393DB926D5
  175. 1007B01519190101 0000000000000000 C9F00FFC74079067
  176. 3107915498080101 0000000000000000 7CFD82A593252B4E
  177. 3107919498080101 0000000000000000 CB49A2F9E91363E3
  178. 10079115B9080140 0000000000000000 00B588BE70D23F56
  179. 3107911598090140 0000000000000000 406A9A6AB43399AE
  180. 1007D01589980101 0000000000000000 6CB773611DCA9ADA
  181. 9107911589980101 0000000000000000 67FD21C17DBB5D70
  182. 9107D01589190101 0000000000000000 9592CB4110430787
  183. 1007D01598980120 0000000000000000 A6B7FF68A318DDD3
  184. 1007940498190101 0000000000000000 4D102196C914CA16
  185. 0107910491190401 0000000000000000 2DFA9F4573594965
  186. 0107910491190101 0000000000000000 B46604816C0E0774
  187. 0107940491190401 0000000000000000 6E7E6221A4F34E87
  188. 19079210981A0101 0000000000000000 AA85E74643233199
  189. 1007911998190801 0000000000000000 2E5A19DB4D1962D6
  190. 10079119981A0801 0000000000000000 23A866A809D30894
  191. 1007921098190101 0000000000000000 D812D961F017D320
  192. 100791159819010B 0000000000000000 055605816E58608F
  193. 1004801598190101 0000000000000000 ABD88E8B1B7716F1
  194. 1004801598190102 0000000000000000 537AC95BE69DA1E1
  195. 1004801598190108 0000000000000000 AED0F6AE3C25CDD8
  196. 1002911598100104 0000000000000000 B3E35A5EE53E7B8D
  197. 1002911598190104 0000000000000000 61C79C71921A2EF8
  198. 1002911598100201 0000000000000000 E2F5728F0995013C
  199. 1002911698100101 0000000000000000 1AEAC39A61F0A464
  200.  
  201. /* S-box test */
  202.  
  203. 7CA110454A1A6E57 01A1D6D039776742 690F5B0D9A26939B
  204. 0131D9619DC1376E 5CD54CA83DEF57DA 7A389D10354BD271
  205. 07A1133E4A0B2686 0248D43806F67172 868EBB51CAB4599A
  206. 3849674C2602319E 51454B582DDF440A 7178876E01F19B2A
  207. 04B915BA43FEB5B6 42FD443059577FA2 AF37FB421F8C4095
  208. 0113B970FD34F2CE 059B5E0851CF143A 86A560F10EC6D85B
  209. 0170F175468FB5E6 0756D8E0774761D2 0CD3DA020021DC09
  210. 43297FAD38E373FE 762514B829BF486A EA676B2CB7DB2B7A
  211. 07A7137045DA2A16 3BDD119049372802 DFD64A815CAF1A0F
  212. 04689104C2FD3B2F 26955F6835AF609A 5C513C9C4886C088
  213. 37D06BB516CB7546 164D5E404F275232 0A2AEEAE3FF4AB77
  214. 1F08260D1AC2465E 6B056E18759F5CCA EF1BF03E5DFA575A
  215. 584023641ABA6176 004BD6EF09176062 88BF0DB6D70DEE56
  216. 025816164629B007 480D39006EE762F2 A1F9915541020B56
  217. 49793EBC79B3258F 437540C8698F3CFA 6FBF1CAFCFFD0556
  218. 4FB05E1515AB73A7 072D43A077075292 2F22E49BAB7CA1AC
  219. 49E95D6D4CA229BF 02FE55778117F12A 5A6B612CC26CCE4A
  220. 018310DC409B26D6 1D9D5C5018F728C2 5F4C038ED12B2E41
  221. 1C587F1C13924FEF 305532286D6F295A 63FAC0D034D9F793
  222.  
  223.  
  224. Denis Coskun                BELL: (416) 362-9181
  225. Alias Research Inc.            ARPA: dcoskun%alias@csri.utoronto.ca
  226. Toronto, Ont., Canada            UUCP: utcsri!alias!dcoskun
  227.