Decoding

If he wanted to brute force it, then he would need a day or two for himself. With the looming Gate 10, however, he couldn't afford to do that. Marta and William needed to get stronger. They needed him.

'I don't need a computer to do Caesar ciphers or Vigenère ciphers. It's simple. But this is different. There's Arabic lettering included and Sumerian—'

"You're distracted," Sun-young stated, snapping him from his thoughts. "Is something wrong?"

He blasted her with a hundred-watt smile. "Oh, it's nothing."

His smile almost convinced her not to follow up. In fact, in the past, she wouldn't have.

"Is it?"

So what changed? She was asking. She was showing her worry.

Kazi didn't want to lie to her, especially considering that there was no reason to. "It's complicated," he admitted. "Do you know what cipher coding is?"

A slow shake. "No."

Okay, that complicated things. "Do you really want to know?"

"Is it math related?"

"Yes."

"I've been to the Sky," she said. "I think I can handle it."

Ah, right, the Suneung—the Korean college exam—was notorious for its difficulty. If there was anyone that was capable of understanding cipher coding, it was Sun-young, someone that passed the exam with flying colours and made it to one of the three most prestigious universities.

"Okay, so imagine you have a secret message you want to send to a friend, but you don't want anyone else to understand it if they happen to see it. So, instead of writing the message as it is, you decide to mix up the letters or use a special code to hide what it says. Let's use the Caesar cipher. This code involves shifting each letter of the alphabet by a certain number of places. So, if 'A' becomes 'D' because you shift it three places, your message might look like random letters to someone who doesn't know the secret shift. So, if your original message was 'HELLO,' in a Caesar cipher with a shift of three, it will become 'KHOOR.' To decode it, your friend would need to know that the letters were shifted by three places to get the original message. There are many other types of codes too, like substituting letters with symbols or using keywords to encode messages. Each one has its own way of hiding the message and requires a key or method to decode it back to the original text."

"I'm following," Sun-young said.

"Cool. So remember my fight with William? When, you know, he was going crazy? During our fight, I fell into another dimension, similar to the one where we encountered the Wendigo. There were codes in the skies. Numbers, letters, that sort of thing. There's no internet in this world so I have to manually put the code in my brain and encrypt it."

"So what was the arrangement?"

"Uhh…it's kinda long."

"Go for it."

"As in, it would take me seven hours to say it all."

"Oh. Okay." Pause, blink, and a scrunch of her eyes. "Wait, when you meant the sky…you mean the sky?" She pointed at the blue skies of this world. Kazi nodded. "You memorized all of it?"

"Photographic memory comes in handy," Kazi said, shrugging. "It's why I specialize in linguistics. And textiles. And medicine. And architecture. And hardware. And cars. And city infrastructure. And, well, a lot of things actually."

"Including cipher coding?"

"I worked for my government once. A short contract where I did a lot of data encryption. One person alone can't do much but with a computer, some leadership, and enough experienced people, you can accomplish a lot. In my brief time there, I figured out a way to decipher RSA encryption. RSA encryption relies on the difficulty of factoring large prime numbers. The trick isn't about finding the primes themselves, but it's about deriving the private key from two very large primes. They use modular arithmetic and exponentiation to encrypt and decrypt messages. The method involves picking two distinct prime numbers, multiplying them to obtain the public key, and deriving the private key from the primes' factors. The challenge lies in the sheer difficulty of factoring the product of two large primes. But, in my case, I realized that the encryption process leaves some residual patterns in the ciphertext long-term."

Sun-young bobbed her head along. "I see."

"So, with the help of the government computer scientists, great guys by the way, we wrote an algorithm that detected patterns in the way the encryption altered certain blocks of data. These minute alterations can lead to partial information about the primes used, enough to narrow down the potential range of factors significantly. There's still a lot of brute forcing involved but it turned RSA decrypting from impossible to possible."

"I get it. Abstract algebra, and knowledge of primes and multiplicative groups."

"Some statistics too."

"Like entropy?" When Kazi nodded, Sun-young hummed. "Discrete mathematics to create ciphers and statistics to break them. Am I getting this right?"

"Yeah, yeah, exactly!" 

Sun-young understood. Of course she did, she was well-educated and well-versed in language arts, math, English, and law. It wasn't until he got into the nitty-gritty that his explanations started to wear her down. 

For the first fifteen minutes, everything was okay. Kazi was able to talk with a smile. Bit by bit, as the conversation got more complicated, his smile faded. Sun-young was failing to understand. Even as he did his best to explain in simple terms, she had no idea what he was talking about and awkwardly nodded her head along. 

"I think I get it," Sun-young said, though her tone suggested otherwise.

Kazi chuckled softly, deciding to end it with a joke. "You know, there's a joke among cryptographers: Why do we always get invited to parties? Because we're really good at keeping secrets!"

Blank face. She did not find that funny in the slightest.

Kazi smiled again, though it was a bit more subdued. "Ahem, anyway, you should get back to meditating. Maybe next time we can talk about something less cryptic!"

Eh?

Eh?

Another attempt at a joke. Sun-young's smile returned, albeit a bit strained. "Sure."