|
Post that again and you will have a parabolics.
Socialism is the Axe Body Spray of political ideologies: It never does what it claims to do, but people too young to know better keep buying it anyway. (Glenn Reynolds)
|
|
|
|
|
In case you are bored already, here is a little puzzle.
0x2542af2a8fc283c5 is a message encoded with the code below, decode the message
static ulong encode(string msg)
{
ulong msg_bits = BitConverter.ToUInt64(Encoding.ASCII.GetBytes(msg), 0);
return msg_bits ^ (msg_bits >> 3) ^ (msg_bits >> 13) ^ (msg_bits >> 47);
}
The message consists of two words and some punctuation so a correct result should be easy to recognize.
|
|
|
|
|
Hmm. This is taking longer than I thought.
Here's what I have so far: "??:????!" Needs refinement.
Regards,
Rob Philpott.
|
|
|
|
|
Check your endianness?
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Doctor says its fine thanks. Although I admit I am having problems telling which end is which currently.
Regards,
Rob Philpott.
|
|
|
|
|
Hint: Your elbow is the one in the middle of your arm.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
It has one correct character, in the right place, so I assume the top byte was decoded correctly but the rest of the bits are still somewhat tangled up
|
|
|
|
|
Run out of time! Think I'm close though, code below suggests what I was up to....
private static void Main(string[] args)
{
byte[] seek = { 0x25, 0x42, 0xaf, 0x2a, 0x8f, 0xc2, 0x83, 0xc5 };
byte[] message = new byte[8];
for (int index = 0; index < 8; index++)
{
for (int c = 32; c < 127; c++)
{
message[index] = (byte)c;
var test = BitConverter.GetBytes((encode(message)));
if (test[7-index] == seek[7- index])
{
Console.WriteLine(Encoding.ASCII.GetString(message));
Console.ReadLine();
}
}
}
}
static ulong encode(string msg)
{
ulong msg_bits = BitConverter.ToUInt64(Encoding.ASCII.GetBytes(msg), 0);
return msg_bits ^ (msg_bits >> 3) ^ (msg_bits >> 13) ^ (msg_bits >> 47);
}
static ulong encode(byte[] msg)
{
ulong msg_bits = BitConverter.ToUInt64(msg, 0);
return msg_bits ^ (msg_bits >> 3) ^ (msg_bits >> 13) ^ (msg_bits >> 47);
}
Regards,
Rob Philpott.
|
|
|
|
|
Manual search, more or less? You can do that, but it can also be solved by logic instead of search
|
|
|
|
|
Scrotum.
Michael Martin
Australia
"I controlled my laughter and simple said "No,I am very busy,so I can't write any code for you". The moment they heard this all the smiling face turned into a sad looking face and one of them farted. So I had to leave the place as soon as possible."
- Mr.Prakash One Fine Saturday. 24/04/2004
|
|
|
|
|
"So long, and thanks for all the fish" ?
|
|
|
|
|
Quote: The message consists of two words and some punctuation...
"Not again."
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
"I wonder if it'll be friends with me?"
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
There are various ways to solve this of course, but one way could be:
The lowest non-zero shift count is 3, so the top 3 bits are the original bits. The next 3 bits from the top have the top bits XORed into them, and they can be restored by again XORing with the top bits:
x ^= x >> 3;
Now the top 6 bits are decoded, but the rest of the bits are "more tangled up". Proceeding that way does keep making progress because it always makes the decoded part at least 1 bit longer, but as it does so it makes the bottom bits more and more messed up. That's tricky to keep track of just in my mind, so what I would do is represent the current state of "how tangled up" the message is an an ulong (m ) that has bit k set iff x is still XORed with the original message shifted right by k . So m = 1 | (1UL << 3) | (1UL << 13) | (1UL << 47) at the start, and when restoring that first group of bits it changes in a similar way: m ^= m << 3; .
The next offset can be found by looking in m for the rightmost set bit apart from the least significant bit, so offset = countTrailingZeros(m & ~1UL) . The second offset is 6, then 12, 13, 16, 19, 22, etc.
As a variant, a similar thing can be done but xoring x with shifted versions of the original encoded message instead of the current x , which would be paired with xoring m with shifted versions of the original m instead of the current m . Then the offset sequence is 3, 6, 12, 13, 15, 18, 19, 21...
Or if you immediately see what's going on, you can relate this problem to finding the carryless multiplicative inverse modulo 264, but you didn't need that just to solve the puzzle.
|
|
|
|
|
At least, that is what your message tells backward to me.
|
|
|
|
|
Oh Well,
Looks like back in 2008 someone on Wikipedia decided that the Base32 content encoding and the mathematical Base-32 duotrigesimal radix are the same thing.
According to the talk page the duotrigesimal page was deleted and merged with Base32 content encoding page. A single user on June 2008 argued against it.
The internet is broken.
Best Wishes,
-David Delaune
|
|
|
|
|
The internet has broken everything
|
|
|
|
|
Christian Graus wrote: The internet has broken everything
Do you have a list of things negatively impacted by the internet?
|
|
|
|
|
Do you have a list of things where it's NOT?
We are in an election cycle in Australia. Pretty much all of politics has been destroyed by the internet
|
|
|
|
|
Christian Graus wrote: We are in an election cycle in Australia. Pretty much all of politics has been destroyed by the internet
I assume you are referring to the 'fake news' problem. It's not just affecting politics... it's also having an effect on scientific papers because it's full of garbage and P-value manipulations.
Best Wishes,
-David Delaune
|
|
|
|
|
I honestly think the internet could be great, if humans were not so stupid. Stuff like anti vax, climate change denial, everyone has abandoned believing experts for believing their facebook friends
|
|
|
|
|
Christian Graus wrote: I honestly think the internet could be great, if humans were not so stupid. I'm getting MIGA hats printed! Not to be confused with Migas[^]. It's breakfast and the Tex-Mex variety sounds really good right about now, with chorizo please, that or Chilaquiles[^].
|
|
|
|
|
Christian Graus wrote: Pretty much all of politics has been destroyed
You say so as if it is a bad thing.
GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
So long as the stupid things people believe become policy because they are vote winners, it affects us all
|
|
|
|
|
Is that new? Newspapers were never politically aligned liars until The Internet? Universal vote did not exist until The Internet? Cosnpiracy nuts, doomsday preachers and "alternative medicine" enthusiasts did not exist before The Internet?
The Internet came in usage in Italy quite late, in the mid-2000. We had the same share of idiots and idiotic laws all the same.
GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|