![]() |
|
|
|
#1
|
|||
|
|||
|
-x is the same as ~x + 1
In this case the code is extracting the most-significant bit (MSB) from a and then creating a 64-bit mask from it. If MSB(a) == 0, the result is 0x0000000000000000 Otherwise, if MSB(a) == 1, the result is 0xFFFFFFFFFFFFFFFF |
|
#2
|
|||
|
|||
|
Some compilers might warn or even generate an error over that. But as said it's just a 2s compliment and the sign but is merely interpreted differently as a cast occurred to signed and back to unsigned. This challenge is interesting need to look for a crypto weakness in the inner function perhaps. Brute force won't work with 2^64...
|
| The Following User Says Thank You to chants For This Useful Post: | ||
niculaita (01-14-2020) | ||
![]() |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Cracking App come with Challenge Code | new air | General Discussion | 2 | 08-19-2003 00:49 |