Sebastian
Sebastian
CC#
Created by Sebastian on 1/19/2023 in #help
❔ Reversing XOR of shifted numbers
So could this be used to find A and B?
13 replies
CC#
Created by Sebastian on 1/19/2023 in #help
❔ Reversing XOR of shifted numbers
I understand. I was hoping that knowing the relation between A and B ( B is A shifted) would open the possibility of finding them
13 replies
CC#
Created by Sebastian on 1/19/2023 in #help
❔ Reversing XOR of shifted numbers
I can also post the entire program if you think it helps.
13 replies
CC#
Created by Sebastian on 1/19/2023 in #help
❔ Reversing XOR of shifted numbers
So, to give more context, here is the function that does the shifting, it is in C
void SHL(uchr *c){
char tmp = c[0];

for(int i = 0; i < LEN-1; i++){
c[i] = ((c[i] << 4) & 0xf0 ) | ((c[i+1] & 0xf0) >> 4);
}
c[LEN-1] = ((c[LEN-1] << 4) & 0xf0 ) | ((tmp & 0xf0) >> 4);
}
void SHL(uchr *c){
char tmp = c[0];

for(int i = 0; i < LEN-1; i++){
c[i] = ((c[i] << 4) & 0xf0 ) | ((c[i+1] & 0xf0) >> 4);
}
c[LEN-1] = ((c[LEN-1] << 4) & 0xf0 ) | ((tmp & 0xf0) >> 4);
}
The original values are in hexa and I tried to make it as simple as possible but as it turns out I might not understand it completely. Sorry for that. So a hex number is passed through this function, and the result is XOR-ed with the original number. Will the XOR result be enough to find out the original hex number?
13 replies