Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Machine Readable Code: Passport - Check Digits  (Read 12753 times)

0 Members and 1 Guest are viewing this topic.

Bobby123

    Topic Starter


    Starter

    • Experience: Beginner
    • OS: Other
    Machine Readable Code: Passport - Check Digits
    « on: October 23, 2016, 05:51:48 AM »
    Hi, I'm writing a report on error control and I'm looking at machine readable passports. I'm looking at the check digits in the code of the second row, and wonder if anyone knows what the probability of the 4 checksums being correct, but the final check digit being incorrect is...? Thanks.

    DaveLembke



      Sage
    • Thanked: 662
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: Machine Readable Code: Passport - Check Digits
    « Reply #1 on: October 23, 2016, 09:09:10 AM »
    Not sure how to calculate for the odds that someones passport would fall into the condition that you wondered about. I would think first of all you would need to know how many total passports exist, and then look at the rate in which passports are replaced and assume that some replaced are due to lost and a percentage of that that arent lost are the actual that have the readability issues. You would get better figures if the old passport that is damaged somehow is turned back in before replacement issued and a record of this maintained to have statistical data to use as a basis for probability.

    I have only dealt with check digits in UPC codes, never worked with Machine Readable Passports.

    Are there any existing formulas out there or are you having to create your own for this report?

    With a passport with a readability issue, if it has an issue I would think just get a new one. So not sure why statistical info is critical. Thinking I am not understanding your situation :-\

    Salmon Trout

    • Guest
    Re: Machine Readable Code: Passport - Check Digits
    « Reply #2 on: October 23, 2016, 12:47:03 PM »
    Quote from: DaveLembke
    So not sure why statistical info is critical.
    I think his question is essentially mathematical; this sounds a bit like a school assignment. I have the feeling that the problem would be a trivial one for anyone who understands the 7-3-1 algorithm used to generate the checksums. I am having a look at it. I think the answer is "the probability is zero" but I want to get a feel for the logic.


    2nd line of machine readable passport section:
    #########CbbbYYMMDDCsyymmddCppppppppppppppCX

    1-10  ######### passport number and C (1st check digit)
    11-13 bbb nationality
    14-20 YYMMDD date of birth and C (2nd check digit)
    21    s sex (M, F or <)
    22-28 yymmdd expiry date and C (3rd check digit)
    29-43 pppppppppppppp (personal number) + C (4th check digit)

    X is the final check digit and is applied to positions 1 to 10, 14 to 20, and 22 to 43 on the second line. Thus, the nationality and sex are not included in the check. 


    My feeling is that if the algorithm worked correctly, (the same one is used to make the C and X characters above) then the final digit will not be "wrong". Check digits are used to spot typing and OCR errors, so if the final digit was incorrect the pasword would always flag an error and be unusable.


    « Last Edit: October 23, 2016, 01:37:23 PM by Salmon Trout »

    Bobby123

      Topic Starter


      Starter

      • Experience: Beginner
      • OS: Other
      Re: Machine Readable Code: Passport - Check Digits
      « Reply #3 on: October 24, 2016, 03:05:00 AM »
      ok, so what about the probability of an undetected error occurring? (unreliable detection). What about when numerous digits are changed to give a 'false' positive reading?

      Geek-9pm


        Mastermind
      • Geek After Dark
      • Thanked: 1026
        • Gekk9pm bnlog
      • Certifications: List
      • Computer: Specs
      • Experience: Expert
      • OS: Windows 10
      Re: Machine Readable Code: Passport - Check Digits
      « Reply #4 on: October 24, 2016, 11:38:15 AM »
      Checksum and Hash makers have been around a long time. Given the checksum is a small number, there is always the case where the test fails to detect an error.  A checksum large enough to have 100% accuracy would be too large to be piratical.
      Here is a post that might help .
      http://stackoverflow.com/questions/8349565/how-reliable-is-the-udp-checksum-algorithm
      The article goes on to say that in the real world there are other things that would catch an error most of the time.

      patio

      • Moderator


      • Genius
      • Maud' Dib
      • Thanked: 1769
        • Yes
      • Experience: Beginner
      • OS: Windows 7
      Re: Machine Readable Code: Passport - Check Digits
      « Reply #5 on: October 24, 2016, 11:56:04 AM »
      When is our homework report due ? ?...we don't wanna be late.
      " Anyone who goes to a psychiatrist should have his head examined. "

      Bobby123

        Topic Starter


        Starter

        • Experience: Beginner
        • OS: Other
        Re: Machine Readable Code: Passport - Check Digits
        « Reply #6 on: October 24, 2016, 03:07:22 PM »
        this thursday