Checksum method determination

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rjfjohnson@hotmail.com

    #1

    Checksum method determination

    Hey,

    I am trying to communicate with serial device and I need to know the
    method used to calculate the 1digit checksum.

    I have a commercial program that can communicate with the device, and a
    serial port sniffer, and so I am able to get any number of sample
    checksum digits. Below is a list of some.

    I keep finding patterns, and it seems to revolve around the magic
    number of 7.

    If anyone could please help find this out, or does anyone know of a
    brute-force method of determining a checksum?

    Thanks,
    Ryan Johnson.



    1255 | 4
    1265 | 7
    1256 | 7
    1355 | 5
    3455 | 0
    2455 | 1
    1455 | 2
    455 | 3
    3355 | 7
    2355 | 6
    1355 | 5
    355 | 4
    255 | 5
    1255 | 4
    2255 | 7
    3255 | 6
    4255 | 1
    425 | 4
    1 | 6
    2 | 5
    3 | 4
    4 | 3
    5 | 2
    6 | 1
    7 | 0
    8 | ?
    9 | >
    10 | 6
    11 | 7
    12 | 4
    13 | 5
    14 | 2
    15 | 3
    16 | 0
    17 | 1
    18 | >
    19 | ?
    21 | 4
    23 | 6
    2 | 5
    22 | 7
    222 | 5
    3333 | 7

    3 | 4
    33 | 7
    333 | 4
    3333 | 7

    123456789123456 789 | 9

    45 | 6
    56 | 4
    3567 | 0
    3566 | 1
    356 | 7
    1234 | 3
    123 | 7

  • Keith Thompson

    #2
    Re: Checksum method determination

    rjfjohnson@hotm ail.com writes:[color=blue]
    > I am trying to communicate with serial device and I need to know the
    > method used to calculate the 1digit checksum.[/color]
    [snip]

    This has nothing to do with the C programming language. Please limit
    followups to sci.crypt, comp.programmin g, and sci.math, or to some
    appropriate subset.

    --
    Keith Thompson (The_Other_Keit h) kst-u@mib.org <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.

    Comment

    • Jeremy Boden

      #3
      Re: Checksum method determination

      In message <1138924840.653 965.143470@g43g 2000cwa.googleg roups.com>,
      rjfjohnson@hotm ail.com writes[color=blue]
      >Hey,
      >
      >I am trying to communicate with serial device and I need to know the
      >method used to calculate the 1digit checksum.
      >
      >I have a commercial program that can communicate with the device, and a
      >serial port sniffer, and so I am able to get any number of sample
      >checksum digits. Below is a list of some.
      >
      >I keep finding patterns, and it seems to revolve around the magic
      >number of 7.
      >
      >If anyone could please help find this out, or does anyone know of a
      >brute-force method of determining a checksum?
      >
      >Thanks,
      >Ryan Johnson.
      >[/color]
      .... <data snipped>

      The 0 - 7 values would seem to indicate that you only get 3 bits back.
      Note the results of inputting 8 or 9.
      Perhaps you have some kind of shift register???

      --
      Jeremy Boden

      Comment

      • Luc The Perverse

        #4
        Re: Checksum method determination

        <rjfjohnson@hot mail.com> wrote in message
        news:1138924840 .653965.143470@ g43g2000cwa.goo glegroups.com.. .[color=blue]
        > If anyone could please help find this out, or does anyone know of a
        > brute-force method of determining a checksum?[/color]


        ??? Your question doesn't even make sense. Are you sure you know what you
        are asking?

        Yes I am familiar with one way of bruteforcing a checksum but checksum
        collisions could throw you off - of course it is the same way you bruteforce
        just about anything.

        --
        LTP

        :)


        Comment

        • rjfjohnson@hotmail.com

          #5
          Re: Checksum method determination

          Jeremy,

          Thanks for your reply. In my efforts, I found some code for a BASIC
          stamp which used something to do with shift registers... What exactly
          are these?

          Ryan

          Comment

          • Ian Collins

            #6
            Re: Checksum method determination

            rjfjohnson@hotm ail.com wrote:[color=blue]
            > Hey,
            >
            > I am trying to communicate with serial device and I need to know the
            > method used to calculate the 1digit checksum.
            >[/color]
            Not a language specific question, choose your groups with more care and
            look up parity.

            --
            Ian Collins.

            Comment

            • Flash Gordon

              #7
              Re: Checksum method determination

              rjfjohnson@hotm ail.com wrote:[color=blue]
              > Hey,
              >
              > I am trying to communicate with serial device and I need to know the
              > method used to calculate the 1digit checksum.[/color]

              <snip>

              What is your C question? I don't read the other groups, so I can't
              comment on topicality there, but on comp.lang.c we deal with the C
              programming language, not general programming problems.

              Once you know the appropriate algorithm and have hit problems
              implementing it in standard C you can bring those problems to
              comp.lang.c, but until you are at the point of having C problems it is
              the wrong place.
              --
              Flash Gordon
              Living in interesting times.
              Although my email address says spam, it is real and I read it.

              Comment

              • rjfjohnson@hotmail.com

                #8
                Re: Checksum method determination

                Thank you,

                The answer was to do with parity

                temp XOR temp+1 where temp is the number

                Comment

                • Zara

                  #9
                  Re: Checksum method determination

                  On 2 Feb 2006 16:00:40 -0800, rjfjohnson@hotm ail.com wrote:
                  [color=blue]
                  >Hey,
                  >
                  >I am trying to communicate with serial device and I need to know the
                  >method used to calculate the 1digit checksum.
                  >
                  >I have a commercial program that can communicate with the device, and a
                  >serial port sniffer, and so I am able to get any number of sample
                  >checksum digits. Below is a list of some.
                  >
                  >I keep finding patterns, and it seems to revolve around the magic
                  >number of 7.[/color]

                  You must take the xor of all digits of the number considered as binary
                  values in the range o-15. The resul soulb xor'ed with 7, and the
                  number added to char '0' to get the checksum char
                  For instance:


                  1255 | 4 => (1 ^ 2 ^5^5^7)+'0'='4'
                  8 | ? => (8^7)+'0'='?'


                  [color=blue]
                  >
                  >If anyone could please help find this out, or does anyone know of a
                  >brute-force method of determining a checksum?[/color]

                  Instinct, and some counts
                  [color=blue]
                  >
                  >Thanks,
                  >Ryan Johnson.
                  >
                  >
                  >[/color]

                  BTW, this thread seems completely off-topic


                  Best regrads,

                  Zara

                  Comment

                  • Nelu

                    #10
                    Re: Checksum method determination

                    rjfjohnson@hotm ail.com wrote:[color=blue]
                    > Thank you,
                    >
                    > The answer was to do with parity
                    >
                    > temp XOR temp+1 where temp is the number
                    >[/color]
                    Please read http://cfaj.freeshell.org/google/
                    Thank you!


                    --
                    Ioan - Ciprian Tandau
                    tandau _at_ freeshell _dot_ org (hope it's not too late)
                    (... and that it still works...)

                    Comment

                    • Troky

                      #11
                      Re: Checksum method determination


                      <rjfjohnson@hot mail.com> wrote in message
                      news:1138924840 .653965.143470@ g43g2000cwa.goo glegroups.com.. .[color=blue]
                      > Hey,
                      >
                      > I am trying to communicate with serial device and I need to know the
                      > method used to calculate the 1digit checksum.[/color]

                      It looks like chksum=7 XOR digit0 XOR digit1 XOR digit2....


                      Comment

                      • Shmuel (Seymour J.) Metz

                        #12
                        Re: Checksum method determination

                        In <1138924840.653 965.143470@g43g 2000cwa.googleg roups.com>, on
                        02/02/2006
                        at 04:00 PM, rjfjohnson@hotm ail.com said:
                        [color=blue]
                        >I am trying to communicate with serial device and I need to know the
                        >method used to calculate the 1digit checksum.[/color]

                        Read the documentation on the serial device in question. Then google
                        for CRC, assuming that's what it uses.

                        --
                        Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel>

                        Unsolicited bulk E-mail subject to legal action. I reserve the
                        right to publicly post or ridicule any abusive E-mail. Reply to
                        domain Patriot dot net user shmuel+news to contact me. Do not
                        reply to spamtrap@librar y.lspace.org

                        Comment

                        • anonymous

                          #13
                          Re: Checksum method determination

                          On 2 Feb 2006 16:00:40 -0800, rjfjohnson@hotm ail.com wrote:
                          [color=blue]
                          >Hey,
                          >
                          >I am trying to communicate with serial device and I need to know the
                          >method used to calculate the 1digit checksum.
                          >
                          >I have a commercial program that can communicate with the device, and a
                          >serial port sniffer, and so I am able to get any number of sample
                          >checksum digits. Below is a list of some.
                          >
                          >I keep finding patterns, and it seems to revolve around the magic
                          >number of 7.
                          >
                          >If anyone could please help find this out, or does anyone know of a
                          >brute-force method of determining a checksum?
                          >
                          >Thanks,
                          >Ryan Johnson.
                          >
                          >
                          >
                          >1255 | 4
                          >1265 | 7
                          >1256 | 7
                          >1355 | 5
                          >3455 | 0
                          >2455 | 1
                          >1455 | 2
                          >455 | 3
                          >3355 | 7
                          >2355 | 6
                          >1355 | 5
                          >355 | 4
                          >255 | 5
                          >1255 | 4
                          >2255 | 7
                          >3255 | 6
                          >4255 | 1
                          >425 | 4
                          >1 | 6
                          >2 | 5
                          >3 | 4
                          >4 | 3
                          >5 | 2
                          >6 | 1
                          >7 | 0
                          >8 | ?
                          >9 | >
                          >10 | 6
                          >11 | 7
                          >12 | 4
                          >13 | 5
                          >14 | 2
                          >15 | 3
                          >16 | 0
                          >17 | 1
                          >18 | >
                          >19 | ?
                          >21 | 4
                          >23 | 6
                          >2 | 5
                          >22 | 7
                          >222 | 5
                          >3333 | 7
                          >
                          >3 | 4
                          >33 | 7
                          >333 | 4
                          >3333 | 7
                          >
                          >12345678912345 6789 | 9
                          >
                          >45 | 6
                          >56 | 4
                          >3567 | 0
                          >3566 | 1
                          >356 | 7
                          >1234 | 3
                          >123 | 7[/color]


                          Newby question isn't a checksum of one digit inadequate for a serial
                          transmission?

                          It would be like dividing 474656229 by 15108777 and validating on a
                          single MSD wouldn't it?

                          Comment

                          • Joe Wright

                            #14
                            Re: Checksum method determination

                            anonymous wrote:[color=blue]
                            > On 2 Feb 2006 16:00:40 -0800, rjfjohnson@hotm ail.com wrote:
                            >
                            >[color=green]
                            >>Hey,
                            >>
                            >>I am trying to communicate with serial device and I need to know the
                            >>method used to calculate the 1digit checksum.
                            >>
                            >>I have a commercial program that can communicate with the device, and a
                            >>serial port sniffer, and so I am able to get any number of sample
                            >>checksum digits. Below is a list of some.
                            >>
                            >>I keep finding patterns, and it seems to revolve around the magic
                            >>number of 7.
                            >>
                            >>If anyone could please help find this out, or does anyone know of a
                            >>brute-force method of determining a checksum?
                            >>
                            >>Thanks,
                            >>Ryan Johnson.
                            >>
                            >>
                            >>
                            >>1255 | 4
                            >>1265 | 7
                            >>1256 | 7
                            >>1355 | 5
                            >>3455 | 0
                            >>2455 | 1
                            >>1455 | 2
                            >>455 | 3
                            >>3355 | 7
                            >>2355 | 6
                            >>1355 | 5
                            >>355 | 4
                            >>255 | 5
                            >>1255 | 4
                            >>2255 | 7
                            >>3255 | 6
                            >>4255 | 1
                            >>425 | 4
                            >>1 | 6
                            >>2 | 5
                            >>3 | 4
                            >>4 | 3
                            >>5 | 2
                            >>6 | 1
                            >>7 | 0
                            >>8 | ?
                            >>9 | >
                            >>10 | 6
                            >>11 | 7
                            >>12 | 4
                            >>13 | 5
                            >>14 | 2
                            >>15 | 3
                            >>16 | 0
                            >>17 | 1
                            >>18 | >
                            >>19 | ?
                            >>21 | 4
                            >>23 | 6
                            >>2 | 5
                            >>22 | 7
                            >>222 | 5
                            >>3333 | 7
                            >>
                            >>3 | 4
                            >>33 | 7
                            >>333 | 4
                            >>3333 | 7
                            >>
                            >>1234567891234 56789 | 9
                            >>
                            >>45 | 6
                            >>56 | 4
                            >>3567 | 0
                            >>3566 | 1
                            >>356 | 7
                            >>1234 | 3
                            >>123 | 7[/color]
                            >
                            >
                            >
                            > Newby question isn't a checksum of one digit inadequate for a serial
                            > transmission?
                            >
                            > It would be like dividing 474656229 by 15108777 and validating on a
                            > single MSD wouldn't it?[/color]


                            --
                            Joe Wright
                            "Everything should be made as simple as possible, but not simpler."
                            --- Albert Einstein ---

                            Comment

                            • Joe Wright

                              #15
                              Re: Checksum method determination

                              anonymous wrote:[color=blue]
                              > On 2 Feb 2006 16:00:40 -0800, rjfjohnson@hotm ail.com wrote:
                              >
                              >[color=green]
                              >>Hey,
                              >>
                              >>I am trying to communicate with serial device and I need to know the
                              >>method used to calculate the 1digit checksum.
                              >>
                              >>I have a commercial program that can communicate with the device, and a
                              >>serial port sniffer, and so I am able to get any number of sample
                              >>checksum digits. Below is a list of some.
                              >>
                              >>I keep finding patterns, and it seems to revolve around the magic
                              >>number of 7.
                              >>
                              >>If anyone could please help find this out, or does anyone know of a
                              >>brute-force method of determining a checksum?
                              >>
                              >>Thanks,
                              >>Ryan Johnson.
                              >>
                              >>
                              >>
                              >>1255 | 4
                              >>1265 | 7
                              >>1256 | 7
                              >>1355 | 5
                              >>3455 | 0
                              >>2455 | 1
                              >>1455 | 2
                              >>455 | 3
                              >>3355 | 7
                              >>2355 | 6
                              >>1355 | 5
                              >>355 | 4
                              >>255 | 5
                              >>1255 | 4
                              >>2255 | 7
                              >>3255 | 6
                              >>4255 | 1
                              >>425 | 4
                              >>1 | 6
                              >>2 | 5
                              >>3 | 4
                              >>4 | 3
                              >>5 | 2
                              >>6 | 1
                              >>7 | 0
                              >>8 | ?
                              >>9 | >
                              >>10 | 6
                              >>11 | 7
                              >>12 | 4
                              >>13 | 5
                              >>14 | 2
                              >>15 | 3
                              >>16 | 0
                              >>17 | 1
                              >>18 | >
                              >>19 | ?
                              >>21 | 4
                              >>23 | 6
                              >>2 | 5
                              >>22 | 7
                              >>222 | 5
                              >>3333 | 7
                              >>
                              >>3 | 4
                              >>33 | 7
                              >>333 | 4
                              >>3333 | 7
                              >>
                              >>1234567891234 56789 | 9
                              >>
                              >>45 | 6
                              >>56 | 4
                              >>3567 | 0
                              >>3566 | 1
                              >>356 | 7
                              >>1234 | 3
                              >>123 | 7[/color]
                              >
                              >
                              >
                              > Newby question isn't a checksum of one digit inadequate for a serial
                              > transmission?
                              >
                              > It would be like dividing 474656229 by 15108777 and validating on a
                              > single MSD wouldn't it?[/color]


                              --
                              Joe Wright
                              "Everything should be made as simple as possible, but not simpler."
                              --- Albert Einstein ---

                              Comment

                              Working...