From: jerry@hnrc.tufts.edu (Jerry Dallal)
Newsgroups: rec.video.cable-tv
Subject: VCR Plus+ PlusCodes
Date: 7 Nov 92 03:46:37 GMT
Organization: USDA HNRC at Tufts University


            Last  month,   I   posted the following  two  messages  to 
        sci.crypt.  I  am now posting them here because they may be of 
        interest to this newsgroup.  I'll add one further comment:
            
            It has been reported that that Gemstar's stance is without 
        much merit.   However, Gemstar has the right to ask a court to 
        decide the issue.   It is unlikely they will do  so because if 
        they  lose,  then anyone can get into the  PlusCode business-- 
        they just can't call them PlusCodes.   But if Gemstar  chooses 
        to let the courts decide, someone could end up spending $8-10K 
        defending him/herself. 

        --------------------------------------------------------------

            Thanks   to  those  who  responded  to  my   request   for 
        information  regarding the algorithm for creating VCR+  codes.  
        Many  respondents  asked  me  to  forward  or  summarize   any 
        information I might receive.  
            
            Special thanks go to  those  who pointed me to Shirriff K, 
        Welch C,   Kinsman A,   "Decoding  a  VCR  Controller   Code," 
        Cryptologia,  16 (#3, July 1992), 227-234.   (I'd thank you by 
        name,   but I wasn't  sure you'd want  it posted to the  net!) 
        Thinking this  to  be  what-you're-not-likely-to-find-in-your-
        typical-college-library  I  first  checked  the  MIT   library 
        catalog,   but they don't subscribe to the journal.   However, 
        *Tufts*  does.  (Ever notice how sometimes you're surprised by 
        what  goes on in your own backyard?)   [I have  since  learned 
        that MIT does get the journal,  but for some reason it doesn't 
        appear in their online catalogue.] 

            The  abstract  of the paper reads:   "The VCR Plus+  is  a 
        remote control for programming video cassette recorders.    It 
        uses  an  encrypted  1  to 8 digit  number  that  encodes  the 
        channel,   start  time,  length,  and day of the month of  the 
        television  show  to be recorded.    This  paper  describes  a 
        procedure for decoding the 1 to 6 digit codes." 
            
            The  Acknowledgements  section reads:   "We would like  to 
        thank  the participants in the cryptography discussion on  the 
        Usenet  computer  network  for  their  comments.    We   would 
        especially  like  to thank the Electronic Frontier  Foundation 
        for their legal assistance."
            
            A footnote to the name VCR Plus+  reads:  "VCR Plus+   and 
        PlusCode   are   trademarks   of   the   Gemstar   Development 
        Corporation.   Gemstar claims copyright and patent  protection 
        on  the  PlusCode numbers and software to create  them.    The 
        decoding process in this paper is described for  cryptographic 
        research purposes only."
            
            There is enought information  to turn the algorithm around 
        for encoding as well as decoding.  (I've done it; everything I 
        needed  was in SWK.)   For example,  they include the encoding 
        multiplier for no-carry multiplication along with the decoding 
        multiplier, rather than leave it  to readers to figure out for 
        themselves.  The paper includes some pseudocode procedures for 
        the  decoding  process.    Two by-hand  sample  decodings  are 
        included, too:  In May, 1991, 3316 is shown to correspond to a 
        2 hour show on channel 4 at 9pm on May 10th;  in March,  1992, 
        21362 is shown to correspond to a 30 minute show on channel 24 
        at 7:30 pm on March 11th.  
            
            There  are two minor typos.   In the second example,   the 
        mapped top is written 28 (decimal); it should be 66.  However, 
        it is also written 66 (binary) and used that way in subsequent 
        calculations.  Also, in figure 1, the binary representation of 
        'channel'  is given as c5c4c3c2c1;  it should be c5c4c3c2c1c0.  
        However, it is described as a 6 bit binary number in the text. 

            I've  checked  the TV Guide and the number of  shows  that 
        have 7 or 8 digit codes seems quite small.   They all seem  to 
        have odd starting times, except for our local channel 68.  The 
        odd starting times shouldn't be a problem,  though.   Just use 
        the nearest hour or  half-hour starting time and press the add 
        time button or adjust the duration accordingly.    Thus,   the 
        SWK results should meet most needs. 

            Enjoy! 

            P.S.   In  my first encoder,  I  reversed the SWK  map  by 
        mapping  all 1,  2,  or 3 digit numbers until I found the  one 
        that mapped appropriately.  However,  I pass along a hint that 
        was sent to me:   The map is easily inverted.  (Again, I don't 
        credit the source because the message was sent privately,  but 
        I am happy to acknowledge him/her publicly if he/she desires.) 
            
            P.P.S.  Now that these programs are available, what can be 
        done with them?   I'd give mine away, source and all (What can 
        I tell you?   I'm an academic.  I'm not into it for the money, 
        just for the love of learning.  And, in this case, the ability 
        to use my VCR Plus+ when I can't find the TV Guide!),  but I'm 
        not eager to have Gemstar's attorneys at my door. 

        --------------------------------------------------------------

            Because the requests for code keep coming in, I am posting 
        a general response to the net.  In summary, I have decided not 
        to distribute my code. 

            Along with the requests  for code came a  few summaries of 
        earlier  discussions of the VCR Plus+  algorithm from here and 
        other  news  groups.   There is a running thread in all  these 
        exchanges that uses the word "lawsuit".  

            I make  the following observations.
            
            (1)  The SWK paper  is  titled  "Decoding a VCR Controller 
        Code," not "Encoding . . ." 

            (2)  It  took  the  assistance  of  the  EFF  to  get  SWK 
        published in a scholarly journal. 
            
            (3)  The  SWK  authors themselves have  not circulated  an 
        encoder.  And who, after all, is better able to do it?  
            
            (4)  I have heard that a program had been available at one 
        time,  but was withdrawn from circulation.   
            
            All of this makes me nervous and I have decided *not*   to 
        distribute  any code.   I  don't want anyone's attorneys at my 
        doorstep, even if their case might be frivolous. 

            However, let me restate part of my earlier posting: 
            
            Everything  needed  to write a 1 to  6  digit  encoder  is 
        contained in Shirriff K,  Welch C, Kinsman A,  "Decoding a VCR 
        Controller Code,"  Cryptologia, 16 (#3,  July 1992),  227-234.  
        If you can program in any higher level language,  it shouldn't 
        take  you  more  than a single afternoon.    (The  program  is 
        begging to be written in APL,  but BASIC,  C,   PASCAL or  any 
        other language,  will do fine, thank you.)   My only advice is 
        to  work  on it methodically,   one piece at a time,   knowing 
        everything you need is in SWK 

            Now  that SWK is available,  I  don't know how Gemstar can 
        hold back the floodgates.  SWK might not be an encoder, but it 
        contains  the  blueprint for one.   I  built one  without  any 
        special skills beyond  high school algebra.  Many others could 
        do  likewise.  It should be only a short time  before  someone 
        goes out on a limb to make source/executable available. 
Newsgroups: rec.video.cable-tv