{"id":668,"date":"2021-05-28T12:23:57","date_gmt":"2021-05-28T10:23:57","guid":{"rendered":"https:\/\/www.ceesjansen.nl\/?page_id=668"},"modified":"2022-04-05T20:41:08","modified_gmt":"2022-04-05T18:41:08","slug":"vintage-cryptographic-algorithms-from-the-1980s","status":"publish","type":"page","link":"https:\/\/www.ceesjansen.nl\/en\/vintage-cryptographic-algorithms-from-the-1980s\/","title":{"rendered":"Vintage Cryptographic Algorithms from the 1980&#8217;s"},"content":{"rendered":"<p>This page is reserved for the description of old cryptographic algorithms, used in cryptographic appliances from the last two decades of the 20th century. They were possibly designed earlier, but used in equipment that was marketed and sold by Philips Usfa and its successor Philips Crypto.<\/p>\n<h2>The algorithm of the UA-8295 and UA-8296<\/h2>\n<p>Both devices were designed by NOKIA from Finland and equiped with the DES algorithm. See the descriptions at the online <a href=\"https:\/\/www.cryptomuseum.com\/crypto\/nokia\/parsa\/index.htm\">Cryptomuseum<\/a>. Philips replaced the algorithms by more government friendly versions. In both devices the algorithm was programmed in embedded software stored in EPROM&#8217;s, so easy to readout, modify and replace. The two scans below are from the original description.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-669 size-large\" src=\"https:\/\/www.ceesjansen.nl\/wp-content\/uploads\/2021\/05\/Figure-1-SBT-algo-799x1024.jpg\" alt=\"\" width=\"525\" height=\"673\" srcset=\"https:\/\/www.ceesjansen.nl\/wp-content\/uploads\/2021\/05\/Figure-1-SBT-algo-799x1024.jpg 799w, https:\/\/www.ceesjansen.nl\/wp-content\/uploads\/2021\/05\/Figure-1-SBT-algo-234x300.jpg 234w, https:\/\/www.ceesjansen.nl\/wp-content\/uploads\/2021\/05\/Figure-1-SBT-algo-768x984.jpg 768w, https:\/\/www.ceesjansen.nl\/wp-content\/uploads\/2021\/05\/Figure-1-SBT-algo-1199x1536.jpg 1199w, https:\/\/www.ceesjansen.nl\/wp-content\/uploads\/2021\/05\/Figure-1-SBT-algo-1598x2048.jpg 1598w, https:\/\/www.ceesjansen.nl\/wp-content\/uploads\/2021\/05\/Figure-1-SBT-algo-scaled.jpg 1998w\" sizes=\"auto, (max-width: 525px) 100vw, 525px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-671 size-large\" src=\"https:\/\/www.ceesjansen.nl\/wp-content\/uploads\/2021\/05\/Initpage-SBT-algo-799x1024.jpg\" alt=\"\" width=\"525\" height=\"673\" srcset=\"https:\/\/www.ceesjansen.nl\/wp-content\/uploads\/2021\/05\/Initpage-SBT-algo-799x1024.jpg 799w, https:\/\/www.ceesjansen.nl\/wp-content\/uploads\/2021\/05\/Initpage-SBT-algo-234x300.jpg 234w, https:\/\/www.ceesjansen.nl\/wp-content\/uploads\/2021\/05\/Initpage-SBT-algo-768x984.jpg 768w, https:\/\/www.ceesjansen.nl\/wp-content\/uploads\/2021\/05\/Initpage-SBT-algo-1199x1536.jpg 1199w, https:\/\/www.ceesjansen.nl\/wp-content\/uploads\/2021\/05\/Initpage-SBT-algo-1598x2048.jpg 1598w, https:\/\/www.ceesjansen.nl\/wp-content\/uploads\/2021\/05\/Initpage-SBT-algo-scaled.jpg 1998w\" sizes=\"auto, (max-width: 525px) 100vw, 525px\" \/><\/p>\n\n\n<p class=\"has-luminous-vivid-amber-background-color has-background\"><strong>Some time ago, the cryptomuseum acquired a UA-8295. The EPROM&#8217;s were read and revealed the structure and details of the cryptographic algorithm, called SBT algorithm, that replaced the DES algorithm in the original Nokia devices. If you are interested in the details of the algorithm, please visit the nice site of the cryptomuseum <a href=\"https:\/\/www.cryptomuseum.com\/crypto\/philips\/ua8295\/sbt.htm\">here<\/a>.<\/strong><\/p>\n\n\n\n<p>Meanwhile, I tediously went through old archives  and located a couple of programs that were used to calculate some statistics of the  SBT algorithm. In those days -the mid 1980&#8217;s- Fortran 77 was the programming language and all the guys at Philips were using one computer on a timesharing basis. The computer was a DEC VAX750, also known as miniVax, with a large Winchester hard disk of 80 megabytes. Below is the listing of the program that calculates bit probabilities given some input vector of the algorithm. Implicitly, the program shows the details of the SBT algorithm.<\/p>\n\n\n\n<pre class=\"wp-block-code has-light-green-cyan-background-color has-background\"><code>C     Programme to determine the output probabilities of 8 RANKS of\nC     the  SBT algorithm.\nC     Keybits are i.i.d. random variables.\n\n      INTEGER*2 NI(16), NB(0:3,16), MDB,LDB, I,J,K,L,M,N, NML,IDN(0:15)\n      INTEGER*2 BYTP(16), SBOX(0:15,16)\n      REAL*8 PR(16,0:15), PRI(0:15), PRP(16,0:15)\n\n      DATA IDN \/0,1,2,3,1,2,3,0,2,3,0,1,3,0,1,2\/ ! mod 4 sum, row &amp; column\n\n      ! Neighbors for 'up', 'left', 'down' and 'right'.\n      DATA NB \/9,3,5,2, 10,4,6,1, 11,1,7,4, 12,2,8,3, 13,7,1,6,\n     &amp;  14,8,2,5, 15,5,3,8, 16,6,4,7, 1,11,13,10, 2,12,14,9, 3,9,15,12,\n     &amp;  4,10,16,11, 5,15,9,14, 6,16,10,13, 7,13,11,16, 8,14,12,15\/\n\n      ! Byte Permutation Table (in nibble form)\n      DATA BYTP \/11,12,5,6,15,16,1,2,7,8,3,4,9,10,13,14\/\n\n      ! S - Boxes \n      DATA SBOX \/1,5,4,6,12,10,9,15,3,14,8,0,13,7,2,11, 8,13,7,14,5,0,\n     &amp;11,10,2,3,12,1,15,4,9,6, 5,2,1,4,13,14,0,9,15,11,6,12,3,10,7,8,\n     &amp; 9,7,6,13,11,15,4,12,0,8,2,14,10,1,3,5, 11,10,14,0,9,13,3,2,6,12,\n     &amp;15,7,8,5,4,1, 3,14,13,9,1,4,8,6,10,0,11,5,2,15,12,7, 4,9,8,5,0,6,\n     &amp;10,14,11,2,7,15,1,3,13,12, 7,15,0,12,10,8,1,11,9,13,5,3,14,2,6,4,\n     &amp; 2,4,5,12,9,11,7,8,15,14,13,10,3,1,0,6, 7,14,6,8,1,3,0,4,5,15,2,\n     &amp;14,10,12,11,9, 11,7,9,5,10,1,15,6,2,12,4,13,14,8,3,0, 13,2,12,9,\n     &amp;14,7,3,1,4,8,0,15,6,10,5,11, 1,8,14,10,7,4,9,13,6,3,11,5,15,0,2,\n     &amp;12, 8,11,3,14,13,10,4,15,9,0,12,6,5,7,1,2, 15,10,8,13,3,0,14,2,\n     &amp;12,6,9,1,4,11,7,5, 4,15,10,1,11,2,8,0,13,5,6,12,7,3,9,14\/\n\n      MDB(I) = ISHFT(IAND(I,'C'X),-2)\n      LDB(I) = IAND(I,3)\n      NML(I,J) = 4*I+J\n\n\n      WRITE (6,10)\n10    FORMAT (\/,5X, 'Give input block (16 hex nibbles) : ',$)\n      READ (5,'(16Z1)') ((NI(I),NI(I+1)),I=15,1,-2)\n\nC     Initializing probability vectors.\n\n      DO I = 1,16\n         PR(I,NI(I)) = 1.\n      END DO\n\nC     Box Permutation\n\n      DO NRANK = 1,8\n         WRITE (6,'(\/\/,5X,''RANK: '',I1)') NRANK\n\n      DO I = 1,16                              ! Nibble numbers\n         DO J = 0,15                           ! Nibble values\n            IF (PR(I,J) .NE. 0.) THEN\n\n               ! 'UP' :\n               IF (MDB(J) .NE. 0) THEN         ! No neighbor involved\n                  K = J - 4                    ! Row -1\n                  PRI(K) = PRI(K) + PR(I,J) \/4.\n               ELSE\n                  DO M = 0,15                  ! All neighbor values\n                     K = MOD (IDN(M)+LDB(J),4)\n                     K = NML(3,K)\n                     PRI(K) = PRI(K) + PR(NB(0,I),M) * PR(I,J) \/4.\n                  END DO\n               END IF\n\n               ! 'LEFT' :\n               IF (LDB(J) .NE. 0) THEN         ! No neighbor involved\n                  K = J - 1                    ! Column -1\n                  PRI(K) = PRI(K) + PR(I,J) \/4.\n               ELSE\n                  DO M = 0,15                  ! All neighbor values\n                     K = MOD (IDN(M)+MDB(J),4)\n                     K = NML(K,3)\n                     PRI(K) = PRI(K) + PR(NB(1,I),M) * PR(I,J) \/4.\n                  END DO\n               END IF\n\n               ! 'DOWN' :\n               IF (MDB(J) .NE. 3) THEN         ! No neighbor involved\n                  K = J + 4                    ! Row +1\n                  PRI(K) = PRI(K) + PR(I,J) \/4.\n               ELSE\n                  DO M = 0,15                  ! All neighbor values\n                     K = MOD (IDN(M)+LDB(J),4)\n                     PRI(K) = PRI(K) + PR(NB(2,I),M) * PR(I,J) \/4.\n                  END DO\n               END IF\n\n               ! 'RIGHT' :\n               IF (LDB(J) .NE. 3) THEN         ! No neighbor involved\n                  K = J + 1                    ! Column -1\n                  PRI(K) = PRI(K) + PR(I,J) \/4.\n               ELSE\n                  DO M = 0,15                  ! All neighbor values\n                     K = MOD (IDN(M)+MDB(J),4)\n                     K = NML(K,0)\n                     PRI(K) = PRI(K) + PR(NB(3,I),M) * PR(I,J) \/4.\n                  END DO\n               END IF\n\n            END IF\n         END DO      \n\n         WRITE (6,'(\/,5X,I2)') I\n         WRITE (6,20) ((J,PRI(J)),J=0,15)\n20       FORMAT (5X,Z1,5X,D15.8)\n\n         DO J = 0,15\n            PR(I,J) = PRI(J)        ! Nibble changed effectively\n            PRI(J) = 0.\n         END DO\n      END DO\n\nC     Fixed byte permutation\n\n      DO I = 1,16\n         DO J = 0,15\n            PRP(BYTP(I),J) = PR(I,J)\n         END DO\n      END DO                        ! This is a very inefficient way\n\nC     Nibble Switch\n\n      DO I = 1,15,2\n         DO J = 0,15\n            PR(I,J) = PRP(I,J)\/2. + PRP(I+1,J)\/2.\n            PR(I+1,J) = PR(I,J)\n         END DO\n         WRITE (6,'(\/,5X,I2)') I\n         WRITE (6,20) ((J,PR(I,J)),J=0,15)\n      END DO\n\nC     S - Boxes\n\n      DO I = 1,16\n         DO J = 0,15\n            PRI(SBOX(J,I)) = PR(I,J)\n         END DO\n         WRITE (6,'(\/,5X,I2)') I\n         WRITE (6,20) ((J,PRI(J)),J=0,15)\n         DO J = 0,15\n            PR(I,J) = PRI(J)\n            PRI(J) = 0.\n         END DO\n      END DO\n\n      END DO\n\n      END\n<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This page is reserved for the description of old cryptographic algorithms, used in cryptographic appliances from the last two decades of the 20th century. They were possibly designed earlier, but used in equipment that was marketed and sold by Philips Usfa and its successor Philips Crypto. The algorithm of the UA-8295 and UA-8296 Both devices &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.ceesjansen.nl\/en\/vintage-cryptographic-algorithms-from-the-1980s\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Vintage Cryptographic Algorithms from the 1980&#8217;s&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"class_list":["post-668","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.ceesjansen.nl\/en\/wp-json\/wp\/v2\/pages\/668","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ceesjansen.nl\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.ceesjansen.nl\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.ceesjansen.nl\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ceesjansen.nl\/en\/wp-json\/wp\/v2\/comments?post=668"}],"version-history":[{"count":6,"href":"https:\/\/www.ceesjansen.nl\/en\/wp-json\/wp\/v2\/pages\/668\/revisions"}],"predecessor-version":[{"id":866,"href":"https:\/\/www.ceesjansen.nl\/en\/wp-json\/wp\/v2\/pages\/668\/revisions\/866"}],"wp:attachment":[{"href":"https:\/\/www.ceesjansen.nl\/en\/wp-json\/wp\/v2\/media?parent=668"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}