Tuesday, October 01, 2024

sn-wallet.dat (Part 1)

For Alex More, self-proclaimed retro-computing aficionado, the Goodwill at Evans & Newhall wasn't just a thrift store, it was a treasure trove of bits and bytes, knicks and knacks. Located at the heart of Silicon Valley, in the bustling Chinatown neighborhood of San Francisco, this was where the forgotten junk of the old school computer nerds ended up. Alex loved nothing more than spending his evenings perusing through the wires and boards of old forgotten peripherals.

That one Friday evening in late August was no different. Alex sent off one last code review and then, knowing that it won't be looked at until Monday morning at the soonest, logged off his computer and packed his bag. He unlocked his vintage Schwinn bike (the one with the "I'm Anti-VAX, PDP-11 was better" sticker which got him many an angry glare), and started on his daily commute back from the Mission District. It took him 20 minutes of weaving through the standstill SFO traffic to reach Goodwill, leaving him with an hour of browsing time before the store closed.

Pickings were slim today. More and more people were realizing the worth of some of the old junk they found in their parents' attics; eBay was full of sales of old electronics at outrageous prices. Alex found a box of old wires, an IOMEGA zip drive and assorted junk, with a "$5 AS IS" sticker. That'll do for today, Alex thought, as he picked up the hefty box and made his way to the cash register.

The ride home was shorter, about 10 minutes. "Home" was a small, dilapidated studio on the first floor of a mid-century Victorian, with a 24 hour laundromat and a smoke shop below. Alex didn't really mind the noise and the bustle; in fact the low hum of the dryers running all night was somehow soothing and relaxing.

Eating a quick microwave dinner, Alex sat down to investigate the catch of the day. Most of it was useless, even for Alex. Toward the bottom of the box, Alex saw a USB thumb drive, proudly claiming that it held a whopping ... 256 MB. Okay, let's see what's inside, Alex thought.

Alex knew enough not to plug in random USB devices into his computer; It was very unlikely, but it could be a "USB Killer" which could fry his motherboard. Fortunately for such occasions, Alex had a USB voltage checker, which quickly told that him the device wasn't going to pull in massive current.

Alex booted up Tails, the in-memory Linux distro. Alex didn't really care if the USB drive had a virus - whatever the virus would do would have no permanent effect after he rebooted. Plugging in the USB drive, he saw that it held about 56 MB of data.


He opened the `photos` folder, and found a few pictures of an older man - Japanese or Korean by the looks of it. Alex wasn't surprised, there were plenty of old school Asian Americans who had worked at Sun, DEC and Netware in the good old days. There was no name or any unique identifying characteristics in any of the photos, so Alex quickly lost interest.



The `data` folder only had one file - `sn-wallet.dat`. `.dat` was a very generic extension, so he used the `file` tool to see the actual format.


Hmm, bitcoin. Alex wasn't big into crypto - he viewed it mostly as a pyramid scheme with no inherent value. So apparently this was a bitcoin wallet file which held a private key for making transactions. The last modified time for the file was supposedly April 2012, but didn't mean much; it could just have been a misconfigured system clock. Curious to probe its contents, Alex looked online for a tool to open the file.


Alex spent the next few minutes reading up on bitcoin. He wasn't sure if this was a real wallet or a test file. Even if this was real, this file might have been a backup - there may not be any spendable coins left it in. Well, there was only one way to find out. Alex looked around for any local merchants who took BTC; During the crypto boom, every mom and pop shop was dabbling in crypto, but that was way before its value sky rocketed. 

After much searching, Alex finally found a local pizza shop which still took BTC, and followed the instructions to place an order. With tip and delivery charges, a large Veggie Supreme was 0.000017 BTC (around $27).  It took some time, but finally the order was confirmed. Well, Alex thought, I guess the wallet had at least that much. 


Alex was curious to see if the recent transaction changed the wallet in any way, so he ran the command again.


Wait, Alex thought - the 'BAL' column had decreased by ... 0.000017. So the BAL column had to be the balance, the number of coins in this wallet. Alex's heart started racing as he digested the ramifications; This wallet contained 594245 bitcoins, each bitcoin was $63,907.75, for a market value of ...

$ 37,976,863,869.97.

Alex couldn't believe what he saw. This wallet contained almost 38 billion dollars worth of bitcoins! And he had paid $5 for it! This made no sense - why would someone carelessly leave such a ridiculously valuable thing at Goodwill.

On a hunch, Alex Googled the public key of the wallet, which returned thousands of hits! Alex opened one of the articles.

Satoshi Nakamoto! Even crypto-skeptic Alex knew about the legendary Nakamoto, the mysterious inventor of Bitcoin. After inventing the blockchain and nurturing the fledgling currency, Nakamoto had suddenly dropped off the face of the Earth in 2012. Even after decades, no one knew the real identity of Nakamoto and why he had not spent any of his vast fortune of bitcoins. There were multiple conspiracy theories about his real identity or even the existence of this enigmatic person.

Alex opened the photos again. Was the elderly Japanese man Nakamoto? What happened to him? How did this box end up at Goodwill? Alex speculated that Nakamoto must have died in 2012, maybe in an accident or sudden illness. Whoever was in charge of his estate wasn't privy to the fact that Nakamoto was sitting on a fortune, and must have dumped his old junk off at Goodwill. There was no way of knowing.

Alex looked at the USB key and smiled. That innocuous little thing had made him one of the richest men in the world!

First things first, Alex thought, I need to make lots of copies of this file. Alex copied the file into a password-protected archive with a ridiculously long password. He then uploaded the file to multiple file stores (Google Drive, OneDrive), and to multiple cloud stores in multiple regions (AWS, Azure, GCP).  He even printed the encrypted file out in base64 on a piece of paper, and then placed multiple copies of it in his safe and other places. The only way the file could now be lost would be an asteroid hitting the earth.

Alex froze as he realized something - all bitcoin transactions are open to the public! And he had just made a transaction using the most famous bitcoin wallet of all time! Alex's hands shivered as he opened the r/bitcoin subreddit.

94 comments in 2 minutes, the sub was going berserk! The conspiracy theories were out in full force, Alex couldn't keep up with all the new information coming in. The fact that an original Nakamoto wallet with almost 600k bitcoins was active again was causing speculations to go into overdrive.

For the first time, Alex was afraid. The password in his head was the key to 38 billion dollars, and people have killed and tortured others for far less. Alex was under no illusion that he would last more than a minute under any kind of torture.

The ring of the doorbell startled Alex out of his reverie. Alex panicked ... how could they have found him so quickly? The doorbell continued to impatiently ring as Alex decided what to do next. He nervously looked through the peephole and breathed a sigh of relief.  It was the pizza guy! He opened  the door and thanked the delivery guy, and then as an afterthought, gave him a $20 bill as tip. Why not, Alex thought with a smile, I can afford it.

Little did Alex know how the next few days would turn into his worst nightmare ...

(To Be Continued).

Wednesday, May 17, 2023

Mathematicians still confused by Fermat's First Theorem

Pierre Fermat was an amateur French mathematician, who left us with many unsolved conjectures and theorems. The most famous was his "Fermat's Last Theorem", which was first formulated in 1637, and finally proven in 1999. But embarrassingly, mathematicians have still not been able to solve a riddle Fermat came up with in 1612, when he was 5 years old, dubbed as "Fermat's First Theorem".

Professor Andrew Wiles, who rose to fame proving the Last Theorem, is just as confused as everyone else. "The first theorem makes the last theorem look like a piece of cake.", Wiles said, adding, "It'll take a smarter mind than I to solve this one."

Part of the reason it has taken so long was due to the fact that Fermat wrote his first theorem with a crayon, and his handwriting was terrible. "I would be ashamed if I were little Pierre's mother.", said Miss Thomas, head mistress of St Joseph's School in Bengaluru, "I would have smacked him with a ruler until he wrote proper cursive".

Dramatic Reconstruction of Fermat formulating his First Theorem

Only surviving fragment of the First Theorem.

An additional hurdle was that five year old Fermat used non-standard mathematical notation in his statement of the First Theorem. Fields medalist Terry Tao said, "Some of the symbols are quite clear, like the ❤ symbol is clearly the Ergodic Hamiltonian operator, and the 💭 symbol is obviously the p-adic infinite dimensional Hausdorff manifold, but what is ↡? Who knows?"

Wiles has proposed to add the First Theorem to the Clay Institutes List of Millennium Problems. "Get rid of P ?= NP, and put this one in, it's far more interesting", Wiles said. Tao disagreed, "No one cares about the millennium prize anymore", he said, "I mean, the prize money is still $1 million - which was a large amount in 2000, but with all this inflation is chump change in 2023."

We asked Bard, Google's Generative AI Chat tool, to solve this problem, and this was the response. Good luck to you, Bard!


 


Sunday, August 07, 2016

Too Late for World War III

The  United Nations Organization for War Taxonomy (UNO-WAT) today announced that the deadline for having World War III was over. Speaking to the press, Secretary Jim Jeffries stated that the next global conflict will be called World War IV.

"There have too many futuristic sci-fi movies, books and video games which talk about a fictional World War III", Jim opined. "We don't want future historians and school students to get confused about how a movie made in 1997 referenced a war that occurred in, say, 2025."

Official Logo for WW4

Jim went on to clarify that the ideal time for World War III would have been late 60s, but the cold war and the space race took all the limelight. "If only the Bay of Pigs had turned out differently ...", Jim reminisced ruefully, referring to the infamous US-Russia stand-off which threatened to turn the cold war hot.

Jim made a plea to world leaders that even the time for WW4 was running out. "We might be forced to abandon World War IV the same way as III if it doesn't start in the next few decades. I've sent personal invitations to Kim Jong Un, Robert Mugabe and other despots to urge them to do something that would trigger the next global conflict. We've had too much peace in the last few years".

Strict Criteria for World War

UNO-WAT published a report detailing the criteria for a conflict to be termed a World War. "We want to prevent some inconsequential war, like some territory dispute between Lichtenstein and Azerbaijan, to be called a World War". Jeffries laid out that to be called a World War, the conflict should meet the following criteria:

  • Should involve at least 160 out of 198 countries.
  • Should result in the death of at least 10% of the World's population.
  • Should contain at least 10 instances of Nuclear weapon use.
Jeffries reminded us that the UNO-WAT was the final judge of World Wars, and only they could make the decision whether a conflict qualified. "It is a great honor to be called a World War, and not something we take lightly."

Joseph Kabila, dictator of Congo, slammed the report, stating that the criteria were blatantly discriminatory towards poor and developing countries. Congo, which doesn't possess any nuclear weapons, would never be able to start a World War, he said. NATO leader General. Krauss opined that the numbers in the report were unrealistic. "10% of today's population is 700 million - that's a lot more than the death toll in World War 2. And 160 countries is hard to reach -  there are a lot of cowardly, peace-loving countries out there."

Sunday, October 12, 2014

Canara Bank to be Konk-Free by 2030

The 2012 Annual Demographics Survey of Canara Bank was released today. The report confirmed the worst - the number of Konkani-speaking employees declined by 12% from last year. At this rate, the report claimed, Canara Bank will be devoid of Konkanis by 2030.

We met with noted Konkani conservationist and leader of the "Canara Bank is Konkani Bank" campaign, Mr MP Shenoy to discuss this dire situation.

Interviewer: Mr Shenoy, thank you for talking to us. You have been with Canara Bank for more than 25 years. Can you tell us what has changed in that time?

Shenoy: The olden times were golden times. Canara Bank used to be full of Konkanis then. When I joined, my manager was a Pai, the head clerk was a Nayak and the cashier was a Bhandarkar. There was no fancy entrance exam or interview - the manager just asked me a few questions in Konkani about distant relatives in Mangalore. We used to make fun of the customers in Konkani - right on their face.

Interviewer: When did it change?

Shenoy: With Indira Gandhi's nationalization. Suddenly we were supposed to hire non-Konkanis and write exams! What nonsense! Pais and Nayaks were replaced with Kumars and Guptas. No longer could we make snide remarks about customers. No longer could we share daLithoy and upkari! It all went downhill from there.

Interviewer: Isn't it good? Hiring people based on competency rather than language?

Shenoy: No. Canara Bank is Konkani Bank. If you want fast efficient service, there are other banks out there. Canara Bank was founded to give Konkani people jobs, not to help the populace.

Interviewer: What steps do you want the Government to take to fix this problem?

Shenoy: We want the government to declare "Konkani Canara Bank Employee" as an endangered species. We also want 50% quota to be reserved for Konkanis.

Interviewer: The other problem you have is that Konkani youth are not applying to Bank jobs anymore. How do you plan to address it?

Shenoy: It is all software industry's fault. They have seduced the gullible youth with their high salaries and glamorous lifestyles. Our youngsters have forgotten our traditions and cultures. The government must ban Konkani speakers from any engineering degree. That way, they will do BCom and have Canara Bank as the only option.

Sunday, September 07, 2014

Cricket Match Results For The Next Five Years Leaked

The whistle blowing organization Wikileaks today released a cache of documents that were allegedly obtained from the International Cricket Council (ICC). Among the documents was one which listed the results of all international Cricket matches for the time period 2014-2019. The document listed what team would win, by how many runs and with individual scores.

Wikileaks spokesman Julian Assange said that he was surprised by the revelation. "We knew some Cricket matches were rigged, but we were shocked by the extent of it. After this leak, we know for sure that all matches are rigged to have a predetermined outcome. It's all carefully planned well in advance."

An ICC official, who requested to be anonymous, confirmed the document's veracity. "Cricket matches are a serious matter. We cannot leave the result to chance. We carefully analyze all factors and decide which team needs to win." He mentioned that planning 5 years in advance allows them to be fair to all countries. "Our calculations suggest that we need Zimbabwe to win one match every 3.5 years. We make sure that happens."

Fan reaction has been mixed. Kyle Richardson from Trinidad was ecstatic that West Indies will win the 2015 World Cup. "This is excellent news, man! I didn't think our team had it in them to go all the way. This is the biggest upset in the history of World Cups." Kyle was unsure before whether to buy tickets to Australia, but now that he knows his team will win, he will book it right away.

Indian fan Chetan S was disappointed that India will lose to Pakistan in the Pepsi Cup final in  June 2017. "It will be tense match, but India will lose some quick wickets in the 45th over." He said he will still watch the match on TV. "But I won't watch the February 2016 Test match between India and New Zealand because it will be a rain-affected draw."

Deepankar playing at the local school ground.
Cricket commentator Harsha Bhogle said he was most looking forward to see Deepankar Mehta make his debut in 2018. "Wow! Look at his first few scores - 101*, 78, 122, 33*. This kid is the next Tendulkar." Mehta is set to make his debut against Australia at the age of 18.

Bangladesh Cricket Board spokesperson Javed Ibrahim said that they were planning to appeal against what he called "blatant discrimination against Bangladesh". "How come Zimbabwe and Afghanistan win more matches than us? This is not fair. We demand more wins." ICC Secretary John Walsh replied that they would look into the matter. "It's probably too late to change the 2014-2019 results, we will try to do something in the 2019-2024 time frame."

Wednesday, August 06, 2014

Kannadada Kotyadhipathi struggles to buy 30x40 site in Bangalore

When Chicklingesha won   1 Crore in the popular game show Kannadada Kotyadhipati, it was a dream come true for him. Born and raised in a small village Yandalli in Chikmagalur district to poor farmers, the grand prize was his ticket to a better life. But one year later, his dreams have all but crumbled.

Chickka with PowerStar
When 'Powerstar' Puneet Kumar asked him what he intended to do with the money, Chicklingesha didn't hesitate; He wanted to fulfill his grandmother's lifelong dream of owning a house in Bangalore. "My ajji always wanted to live in a pyaaTe." Alas, she died three years ago without ever visiting Bangalore. But Chickka, as he is known to his friends, resolved to fulfill her wish. "I will buy a bungalow in Bangalore and live with my parents and sisters there."

But now, one year since he won the prize, Chickka has no optimism left. This year has been a cruel mistress to him, teaching him the hard realities of Bangalore real estate market. His first encounter with disappointment came when he met with a real estate agent. "When I told them I wanted to buy a bungalow for   1 Crore, they laughed at me." Chickka's real estate agent told him to aim for a more realistic goal "A budget of   1 Crore puts him in the Low Income Group. The best he can afford is a 2BHK flat in Bokkasandra".

Undeterred, Chickka continued to look for sites. "One real-estate agent told me about a site on Hosur Road for 93 Lakhs. Turned out that the site was in Hosur." He also got swindled by a man who claimed to know
This 10x15 hut in Adugodi was recenly sold for  ₹ 1.13 crores
the BDA chairman "I gave him a bribe of  ₹ 4 Lakhs, but he disappeared with the money." After a year of struggles Chickka has given up. "A Crore has no value in Bangalore. Its all due to the software engineers and maarvaadis." He now plans to build a house and open a restaurant in Yandalli.

He partly blames Kannadada Kotyadhipati for getting his hopes up. "They should make the show to be Kannadada Site-yadhipati, because 1 Crore buys nothing in Bangalore. The grand prize should be a site in Bangalore."

Saturday, July 19, 2014

Flaw in Pythagoras Theorem: All of Math is Wrong

The International Mathematics Association issued a statement today stating that a flaw has been found in the proof of the Pythagoras theorem. Since the theorem was a fundamental pillar on which all of math was based on, the statement cautioned against using any math until a different proof was found. The statement urged people to remain calm and not give in to fear and panic.

The flaw was discovered by Satish K. of 7th Std 'C' Section, a student at the Rajajinagar Parent's Association School in Bangalore, India. "The first time I saw the proof in the textbook, I knew something was wrong. The book said AB = CD while clearly it was AC = BD".

Leading mathematician Terrence Tao of UCLA admitted that he was surprised no one found the obvious flaw till now. "No one in 2500 years bothered to check the proof. Pythagoras - he was a legend, and everyone sort-of took his word for it". Tao praised the diligence of Satish, and assured that he would be given a Fields medal.

Panic on the streets

The announcement triggered a worldwide panic as people began to realize how much math they used in everyday life. Vegetable vendor Krishnappa had to take the drastic step of selling only one vegetable at a time. "I only give one customer one potato or one tomato. Any more would involve addition, which I don't trust". Gowramma, a housewife, was crying because she didn't know how many children she had. "I used to have two kids, and I just had a daughter. But is two plus one three? Maybe it is seven. Who knows?"

Mathematicians beaten by Angry mob

Events took an ugly turn when activists of the Association of People Who Failed in II PUC Maths, a non-profit organization, broke into the math department of Bangalore University and began to beat up the lecturers there. "It is their fault we are in this mess. Justice must be meted". Police rushed to the scene but were unable to save some of the lecturers. "We don't know how many died, because we are afraid to count. "

Compensation for anyone injured by math

Karnataka Chief Minister Siddaramaiah announced a sum of Rs 1 lakh to anyone who was affected by maths. "We offer our deepest condolences to those affected by this tragedy." The opposition however condemned this act as inadequate. "What good is money to a victim of maths?".

Stock Trading Suspended

All major stock exchanges stopped trading after the announcement was made. A spokesperson for the NYSE stated that they were reviewing whether they used any math in their trading algorithms. The Bombay Stock Exchange however remained open citing the fact that Indian investors relied more on blind luck rather than any logic, and thus were unaffected.

Sonu Niigaam to change his name back

Popular singer Sonu Niigaam changed his name back to Sonu Nigam after the incident. In spite of his numerologist assuring him that no math was involved, Sonu wasn't convinced. "I went to school. I remember us learning numbers in maths. How can you trust numbers?"