Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8298847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T15:56:05+00:00 2026-06-08T15:56:05+00:00

I have a binary string (shown in hex below) and am using CRC-16-CCITT. I

  • 0

I have a binary string (shown in hex below) and am using CRC-16-CCITT. I want all of my CRCs to come out to a set value, 0x1D0F. I know it is possible to make the CRCs match this value by appending on 2 bytes to the end of the original message, but am not sure how to find out what the appended value needs to be.

Ex.

0x01 0000 0000 0000 0000 0000 0000 0000 0000 13D8

Appended value is the 0x13D8

By adding this 13D8 onto the message the CRC gives me the desired 0x1D0F.

Any help on how to calculate this 0x13D8 value would greatly be appreciated.

If it can be done neatly in code thatd be a bonus!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T15:56:06+00:00Added an answer on June 8, 2026 at 3:56 pm

    The theory is quite simple, but of course it takes some care to implement correctly.

    You can choose any 16 bits anywhere in the message (including two bytes at the end or 16 individual bits scattered wherever you like) to be undefined. Call them xi for i = 0..15. Then use a bit-by-bit CRC algorithm to process the message, but generate and update the coefficients of 16 linear equations in xi, representing the 16 bits of the crc.

    You then have a simple matrix equation Ax + b = c. The operations for Ax + b = c are not the usual multiplication and addition, but rather single-bit and and exclusive-or operations.

    Now you use the usual methods to invert the matrix A, which is actually easier with and and xor (addition and subtraction are now both the same thing, just exclusive-or), compute b ^ c and multiply that by the inverse. Now you have the values to put in the xi bits to get the desired crc.

    An additional simplification is that you don’t need the actual message, just the length and the location of the xi, and then do the above with all the other bits of the message set to zero. This is because if you have two messages P and Q of the same length, then crc(P) ^ crc(Q) = crc(P ^ Q). (This applies for the core crc algorithm, ignoring pre and post-processing of the crc.)

    Update:

    You can download spoof.c, which solves the problem of modifying a message to produce a particular CRC.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem converting a string binary to a decimal I was using
I have a binary that I want to convert to standard MIME-compliant base64 string.
By using filestreaming in c++, I have read a string in the binary file
I have a string that was converted to binary with Integer.toBinaryString() on each of
I have a string which contains binary data ( non-text data ). How do
I have a string which contains binary digits. How to separate string after each
I have a function that copies binary file public static void copyFile(String Src, String
I have been using this so far system 'strings binary-file.dmp | grep search_string' Is
I have a huge binary string, like: 1110 0010 1000 1111 0000 1100 1010
I have two question : I have a data on binary file. I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.