Image Map Image Map
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: CRCK44.COM question

  1. #1

    Default CRCK44.COM question

    I'm using CRCK44.COM to calculate the checksum of a file in the CP/M disk.
    I'm getting unexpected values, when I compare to a checksum calculated on the same file, but in a windows environment (using HxD).

    Does anyone recall how CRCK44.COM calculates CRC?
    Is there an alternative program for calculating file CRC/checksum?
    thanks

  2. #2

    Default

    Quote Originally Posted by Twospruces View Post
    I'm using CRCK44.COM to calculate the checksum of a file in the CP/M disk.
    I'm getting unexpected values, when I compare to a checksum calculated on the same file, but in a windows environment (using HxD).

    Does anyone recall how CRCK44.COM calculates CRC?
    Is there an alternative program for calculating file CRC/checksum?
    thanks
    There are many CRC polynomials to choose from for each length of the polynomial used. One can also use the multiplicative or the divide type algorithm for each. Which polynomial used is important to know. Not all CRCs are the same.
    To add to the fun, if it is a text file. Unix uses only LF for newline while Windows uses CRLF.
    Pick an choose your poison.
    Do you know which polynomial is being used? and how it is being used?
    Dwight

  3. #3

    Default

    that is sort of what I am asking - how does CRCK44 calculate? I have no idea!
    alternatively, if there is a utility with a known algorithm I'd use that.
    simple checksum works too

  4. #4

    Default

    I just realized that, in this case, all I need is a relative measure of a file changing. so, I don't really care what CRCK44.COM calculates, so long as it is unique to the file. If the file changes, the result should change.

    so, I think I am good.

    cheers

  5. #5

    Default

    Quote Originally Posted by Twospruces View Post
    that is sort of what I am asking - how does CRCK44 calculate? I have no idea!
    alternatively, if there is a utility with a known algorithm I'd use that.
    simple checksum works too
    There are a lot of errors that a checksum will not catch. It was only used because CRCs were slower if done in software. There are ways to speed it up. A good 32 bit crc is almost impossible to not expose multiple errors in a small file. I would not think a checksum is anything more than a quick check.
    You might look up Hamming distance.
    Dwight

  6. #6

    Default

    Quote Originally Posted by Dwight Elvey View Post
    There are a lot of errors that a checksum will not catch. It was only used because CRCs were slower if done in software. There are ways to speed it up. A good 32 bit crc is almost impossible to not expose multiple errors in a small file. I would not think a checksum is anything more than a quick check.
    You might look up Hamming distance.
    Dwight
    I understand; the problem I am trapping is a substitution of a 128 byte sequence. so the odds of that adding up simply to the same value as another block is quite low but not impossible. Absolute uniqueness is not a hard requirement for me, in this case.

  7. #7

    Default

    According to the source (crck44.asm):
    Code:
    ; CRCK can read any CP/M file then print a CRC (CYCLIC-REDUNDANCY-CHECK)
    ; number based on the CCITT standard polynominal:
    ;
    ;           X^16 + X^15 + X^13 + X^7 + X^4 + X^2 + X + 1
    ;
    ; Useful for checking accuracy of file transfers. More accurate than a
    ; simple checksum.  It will Optionally write an output file to the de-
    ; fault drive, listing the CRC's of all files requested.
    ;

  8. #8

    Default

    Hey that's great! I guess it was out there all along. Thanks for sending that.

    I guess I need to check if this is the same polynomial that HxD tool uses. Or some other windows tool. Cheers!

  9. #9

    Default

    Quote Originally Posted by JohnElliott View Post
    According to the source (crck44.asm):

    seems like an oddball CRC check; can't find any CCITT CRC16 reference that matches this; explains why none of the windows tools produce the same value.

  10. #10
    Join Date
    Mar 2017
    Location
    New Jersey, USA
    Posts
    588

    Default

    I believe that <X^16 + X^15 + X^13 + X^7 + X^4 + X^2 + X + 1> is what is referred to by https://reveng.sourceforge.io/crc-catalogue/all.htm as "CRC-16/TELEDISK"

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •