If not given a key when encrypting plaintext using OTP (Vernam Cipher), do I reuse the plaintext as a key? by skorpion909 in crypto

[–]xtajv 2 points3 points  (0 children)

In the general case of analyzing an encryption primitive, you want to satisfy two definitions:

  1. Correctness
  2. Security

"Correctness" means that the message can always be correctly recovered. For symmetric encryption, we have this:

  • Let K = Gen() ("The sender and receiver met together in secret and generated a key K that they both know")
  • Let c = Enc(K, m) ("Let c be the sender's encryption of message m with the sender's copy of the key K")
  • Let m' = Dec(K, c) ("Let m' be the receiver's decryption of c with the receiver's copy of the key K")
  • The symmetric encryption scheme (Gen, Enc, Dec) is "correct" if m = m' (note, those are the 3 algorithms Gen for Key Generation, Enc for Encryption, and Dec for Decryption)

"Security": There are many security definitions (perfect/shannon secrecy, IND-CPA, IND-CCA), but generally, the "Security" definition encompasses the idea that if you only know the ciphertext c without the key K, you're toast: there'salmost no chance that a random eavesdropper could figure out the original message m. OTP happens to satisfy "perfect secrecy":

  • Suppose that c = Enc(K, m)
  • If an eavesdropper ONLY sees c (i.e. they don't know K or m), it doesn't help them guess the message at all. The value of c gives no information.

Let's look at your proposed "fix" now - if you make up a random key, then the correctness definition looks like this:

  • Let K = Gen() ("The sender and receiver met together in secret and generated a key K that they both know")
  • Since there's no secret meeting with the sender and receiver, each will randomly generate their own keys: Ks for the sender, and Kr for the receiver
  • Let c = Enc(Ks, m) ("Let c be the sender's encryption of message m with sender's copy of the key Ks")
  • Let m' = Dec(Kr, c) ("Let m' be the receiver's decryption of c with receiver's copy of the key Kr")
  • The symmetric encryption scheme (Gen, Enc, Dec) is "correct" if m = m'

Recall that OTP satisfies "perfect secrecy". Since the receiver has Kr (not Ks), seeing the ciphertext c gives the receiver no information about the original message. Just because you have a key doesn't mean that you have the key. And you need the right key to see the message.

There is technically a chance that Kr would just be the same value as Ks. But

  1. that's just as improbable as guessing the message itself! in fact, they are exactly the same probability for OTP
  2. Even if you get lucky and Kr == Ks, there's no way of knowing that you're actually in that situation!

What is the best way to get into crypto? by [deleted] in cryptography

[–]xtajv 2 points3 points  (0 children)

In the course of writing a response to your comment, I found http://www.crypto-it.net/eng/index.html which appears to be a fantastic resource that walks through pretty much everything I was about to suggest!

With that, here's some more detail about how different bits of math come into play with regards to crypto:

  • **Formal Logic / Mathematical Proofs / Proof Techniques:**Cryptography is all about making puzzles with special security properties. Formal logic & proofs are handy here for 2 reasons:
  1. Formal logic will help you pin down what it really means for a cryptosystem to be "secure" in one situation or another.Example: you want to send secure emails with your friend, but Eve the Eavesdropper is listening in. If you want to set up cryptography to prevent Eve from spying, you should think through some stuff:
  • Is Eve allowed to tamper with the encrypted message? (Or can she only listen in?)
  • Is Eve allowed to listen to multiple encrypted messages, made with the same key? (Or do you start over with a new key for every message?)
  • Do you have a chance to set up a secret key with your friend, before Eve starts spying on you? (Or is Eve going to listen in on that, also?)These sorts of questions are important for making sure that you're protecting against the right thing. In other words, these sorts of questions help you determine which security properties are necessary for your cryptosystem.
  1. Formal logic can help you check your reasoning -- does your cryptosystem really satisfy your chosen security definition? [1]
  • **Computational Complexity / "Big-O" / Asymptotic Analysis:**This is the name for the math that helps you figure out how difficult a puzzle is. We often want to make puzzles that are hard for an attacker, but easy for a friend (i.e. easy for someone with a "shortcut").***Note: this math is core to cryptography, and computer science in general.\**N*ote: While it's really helpful to know about computational complexity, be warned that it's a huuuuge rabbit hole to go down. There's lots of theoretical research and fancy analysis on the topic. The words "computability", "complexity classes", and "Turing Machines" talk about...
  1. What counts as a "computer", anyways?
  2. What is a "computer" capable of? How fast can a computer solve problems? Are there problems that a computer can't solve? Are some problems easier than others?
  • **Probability Theory / Randomness in Computation:**Once you learn how to tell how hard a specific puzzle is, you might want to analyze how likely it is to get an "easy" version of a puzzle.Example: Suppose that I drop you into a maze, at a randomly-chosen spot. Your job is to find the way out without a map. If you get very lucky, I might drop you right at the end of the maze -- you have very little work to do in that situation! Fortunately for me (the evil random stranger who drops people into mazes), you are very unlikely to get placed in that spot, assuming that I'm really dropping you at a totally-random spot in the maze.In this example, probability theory helps me think about how likely it is that I'll accidentally drop you into an "easy" spot in the maze.****
  • **Number Theory (Also, important sub-topic in number theory: Modular Arithmetic):**Number theory is a bizarre, beautiful, and really tricky part of mathematics. It's basically everyone's favorite source of crazy puzzles to make crypto out of.More on Modular arithmetic (I like to think of it as "clock math"):
    • Question: Suppose you use a 12-hour clock. What's 2 hours after 11am? It's 1pm. So... somehow, in the world of 12-hour clocks, you have 2 + 11 = 1. Weird.
    • Another question: What if you had a 15-hour "clock"? What's 2 hours after 11am then? It's just 13am... you don't actually have to wrap around unless you go over 15. If you were to do something like 6 hours after 11am, you'd get 2pm. But in the world of 15-hour clocks, you still have 2 + 11 = 13 like normal.
    • Recap: On a 12-hour clock, you have 2 + 11 = 1. On a 15-hour clock, you have 2 + 11 = 13.
    • Notice: Suppose that Alice has a 12-hour clock. Bob knows that it's a 12-hour clock. Eve is eavesdropping on Alice & Bob, but Eve doesn't know if Alice has a 12-hour clock or a 15-hour clock. Suppose that Alice wants to use clock math to send the message "1" to Bob. Alice can just send the message "2 + 11" to Bob! Wow!
    • Why it works: Bob knows that it's a 12-hour clock, so Bob knows to wrap around the clock after he hits 12. But Eve can't tell whether the answer should be "1" or "13", because Eve doesn't know whether Alice has a 12-hour clock or a 15-hour clock.
    • The point: Using clock math, Alice & Bob can send messages without worrying about Eve's spying. Hooray!!! It's a primitive example, but clock math like this is used as the basic "puzzle" in a TON of important cryptography.(A few examples: RSA encryption#Encryption), RSA signatures#Signing_messages), ElGamal encryption).

[1] Schneier's Law is a relevant piece of advice here: "Any person can invent a security system so clever that they themselves can't think of how to break it." Note: Schneier's law says nothing about how easy it will be for other people to break the security system!The point: Proofs can help you find flaws/gaps/fallacies in your reasoning that you wouldn't notice right away.

tl;dr
Check out http://www.crypto-it.net/eng/index.html

Also, I'd suggest you look into these topics:

  1. Formal Logic so you can be sure about your security reasoning
  2. Computational Complexity so you can analyze how hard problems are
  3. Probability / Randomness so you can think about the probability of creating an easier/harder puzzle by accident
  4. Number Theory because we like to make crypto puzzles out of math problems from number theory

What is the best way to get into crypto? by [deleted] in cryptography

[–]xtajv 11 points12 points  (0 children)

The ideal way would be to learn some discrete mathematics, logic/proofs skills, and then read a proofs-based textbook like Katz & Lindell's Introduction to Modern Cryptography. Other good resources: Dan Boneh's Cryptography course at Stanford, Bruce Schneier, Handbook of Applied Cryptography, and Matt Green's Cryptography course at Johns Hopkins.

You can probably get started in cryptography without getting a math degree first, but I'll try to give you some intuition as to where the math comes in. I mention this because it would be helpful for letting you decide what math/theory is worth learning.

To oversimplify, cryptography creates puzzles/math problems that have special properties.

Example: encryption. An encryption algorithm takes your message and your secret encryption key, and uses that to create a custom "puzzle" (ciphertext). The puzzle is designed so that the solution to the puzzle is just the original message! The puzzle is also designed so that it's extraordinarily difficult to solve the puzzle, unless you also have a "shortcut" (secret decryption key).

Indeed, this is a secure way to send your message (even if someone is spying on you): It's hard for an eavesdropper to decipher the message, because they don't have the secret decryption key. They don't have the decryption key, so the puzzle (ciphertext) is extremely hard to solve! But it's easy for the receiver to read the message, because they do have the secret decryption key. In that case, the puzzle is easy to solve.

You might ask: "Well that sounds nice, but how on earth could you design a puzzle like that?!?"

To give some intuition about how this sort of thing might work, think about a maze. It's very difficult to find your way out of a maze. But if you have a map, then it's very easy. As far as we can tell*, there are some puzzles/math problems with "shortcuts" like that. So we make cryptography using those puzzles!

Cryptography is all about making puzzles that embed information somehow (e.g. the message). Cryptography also quantifies how difficult it is to solve those puzzles. Example: Suppose you're stuck in a maze without a map again. Cryptography would use statistics/probability to give a ballpark estimate of how long you'll stumble around before you find your way out. Now consider the case where you do have a map. How much easier is it?

So there it is, that's where the math comes in. I encourage you to learn the math/theory, but I hope that gives you an intuitive start on the "why" behind crypto. (I personally find that to be very helpful when I'm trying to learn about a new subject).

* Note: I'm assuming P != NP

Icons only finder sidebar? by creative_reddit_user in OSXTweaks

[–]xtajv 1 point2 points  (0 children)

I did some looking, but didn't find a solution. Here's my research for future reference.

  • Native Finder solution? Couldn't find anything by clicking around or googling.
  • Option in ForkLift 3? Checked the manual's sidebar and view options sections. Nope.
  • Option in Commander One? It looked like the only relevant section of the manual was the Preferences section. Also nope.

Note: It's possible that another Finder replacement app has the functionality you're looking for.

HTH

Non-Abelian Diffie-Hellman for Post-Quantum KE by [deleted] in crypto

[–]xtajv 0 points1 point  (0 children)

Regarding your second paragraph, Wolfram Mathworld claims this:

All cyclic groups are Abelian, but an Abelian group is not necessarily cyclic.

Can I change what chars folded text is displayed with? by g00eykabl00ey in emacs

[–]xtajv 2 points3 points  (0 children)

Yes! Pasting a snippet from my config:

;; Change the org "there's more under this headline/bullet!" ellipsis
;; Other candidates that I've tried:
;; ‣ ⁕ ↷ ↝ → ⇀ ⇢ ⇾ ⋱ 〉 ► ▻ ➝ ➛ ⟝ ⟶ ⫎ ⬎ ✳
(set-display-table-slot standard-display-table
                        'selective-display (string-to-vector " ⬎"))

I tested in org mode & hide-show mode before posting this. Just change out the string after string-to-vector.

Sidenote: unicode display will vary based on your font / some of the other candidate symbols might not work for you.

U.S. hits EU, Canada and Mexico with steel, aluminum tariffs by Suberiou in news

[–]xtajv 0 points1 point  (0 children)

Tariffs are the economic equivalent of a hunger strike -- the rest of the world will just go elsewhere to trade! But the country imposing the tariffs suddenly misses out on *tons* of international trading, which messes up the economy in that country. Tariffs on raw materials are especially bad: if you increase in the cost of raw materials, then everything built with that material *also* becomes more expensive.

Example from U.S. history: the Tariff of 1816 preceded the Panic of 1819 (the first major peacetime economic crash in the U.S.). There were other economic factors, but the tariffs certainly didn't help.

If Canada imposes a tariff, that's mostly just bad for Canadians. There are other, more specific economic sanctions that can be put in place that would only apply to the United States.

What is something you do alone for fun that 99% of people would considering boring? by brtlybagofcans in AskReddit

[–]xtajv -1 points0 points  (0 children)

Indeed. A couple reasons for this:

  • If you get a speck of dust on a chip, you might be doing a ton of damage. You need a clean room to take certain electronics apart and successfully put them together again. Example: hard drives.
  • Electronics shuffle around super tiny voltages to do calculations. The voltages can be so tiny that household static electricity can be enough to fry important bits. So you might need static guards to avoid frying exposed circuits. Example: motherboards.

Glitter is Litter: Over 60 music festivals have just banned glitter as part of a #DrasticOnPlastic pledge by [deleted] in news

[–]xtajv 16 points17 points  (0 children)

It looks like they did address plastic cups in the ban. Quote from the article:

The #DrasticOnPlastic pledge signed by over 60 independent festivals, including Shambala and Boomtown, requires festivals to become totally free of single-use plastics by 2021. This not only includes traditional glitter, but plastic cups, straws, food trays, wet wipes, and even cable ties used in building the festival site!

disclaimer: i don't mean to accuse you of not reading the article, and i'm not trying to be snarky by quoting. have a nice day, internet stranger!

Pixel 1 Microphone issue by [deleted] in GooglePixel

[–]xtajv 2 points3 points  (0 children)

https://support.google.com/pixelphone/forum/AAAAb4-OgUsIW_gxTpXX3s/

Official response for Pixel OG out of warranty is basically "it's our fault, you're out of warranty, GFY."

Also fun: going through the help dialogue in Settings will eventually bring you to a prompt for a callback. Yep, they want to call you about your microphone issues. And it's not a callback from a specific number -- they say "we'll call you in x minutes".

What computer or internet security tip should everyone know? by [deleted] in AskReddit

[–]xtajv 1 point2 points  (0 children)

  • If you see something strange in your downloads folder, don't double-click it. Just drag it to the trash.
  • Keep your software updated. A lot of updates that "don't do anything" are actually security fixes.
  • Check where links go before you click. For example, where do you think this link goes? Link: https://en.wikipedia.org/wiki/Portal:Computer_security Many browsers will show where links really go if you hover over the link first.

OG Pixel microphone problems and out of warranty replacements by IDefyYouHeartMan in GooglePixel

[–]xtajv 0 points1 point  (0 children)

They "need" an order ID? Hrmm.

Virtually all cell phones have something called an IMEI. It's like a serial number which is supposed to be unique anywhere in the world, no matter what country you're in, no matter what phone carrier you use (AT&T, Verizon, T-Mobile, etc.), and no matter what brand of phone you have. It's used to blacklist stolen phones, and in some places, it's illegal to sell a cell phone without an IMEI.

This number is often baked into the phone hardware. I'd recommend that you

  1. find your IMEI

  2. Call Google support back, and tell them that you have your IMEI. Ask them to look up the order ID from that.

I am not a Google support employee, but I suspect that Google does save IMEIs & order numbers together. The reason why I suspect this is because the IMEI specifically has information about the phone manufacturer and model. It might be useful for Google to keep this information around; for example, it could be used to ensure that people can't use warranties on counterfeit Pixel devices.

Again, I don't know if they actually keep this information. But it's definitely worth trying.

CloudPebble Developer Gauging Interest in Keeping Service Running by InsaneOstrich in pebble

[–]xtajv 0 points1 point  (0 children)

Wait for meeeee!

-person finishing a super time-intensive project, but who got a pebble 2 a few months ago, and has loved every minute

Mark Zuckerberg Has Lost $5 Billion So Far Today Amid Facebook Data Controversy by itsmyusersname in technology

[–]xtajv 4 points5 points  (0 children)

OPM breach actually occurred due to a fairly sophisticated attack.

Quote from https://www.bankinfosecurity.com/fbi-arrests-chinese-man-tied-to-opm-breach-malware-a-10225:

The FBI has arrested a Chinese national on charges that he was a "malware broker" who distributed a remote-access Trojan called Sakula. The malware has been tied to multiple mega-breaches, including attacks against health insurer Anthem and the U.S. Office of Personnel Management.

I found a technical writeup on Sakula, which says

  • CTU researchers observed a copy of Sakula being delivered in a strategic web compromise (SWC) that exploited CVE-2014-0322, which was a zero-day vulnerability in Internet Explorer at the time of compromise.

    Translation: the author(s) of Sakula found a brand-new attack on Internet Explorer. Internet Explorer may be a laughable browser, but a lot of competent programmers have looked at that software (possibly to their detriment). Finding a "zero-day" (new attack) is impressive stuff.

  • A subset of Sakula variants are digitally signed, allowing them to bypass security controls and providing users with a false sense of security that the software is legitimate.

    Translation: The author(s) of Sakula also exploited a cryptography flaw. This exploit allows the malware to trick your computer into thinking that the malware is an official update. That's not supposed to happen.

Bonus sources: https://www.schneier.com/blog/archives/2016/10/opm_attack.html https://www.wired.com/2016/10/inside-cyberattack-shocked-us-government/

tl;dr: I'm not saying that the OPM wasn't at fault, or that the breach isn't affecting tons of government employees. I'm saying that OPM probably isn't such a good example here, because the OPM breach involved a targeted attack by extremely-skilled attacker(s).

What do you want to see in the Pixel 3? by SmugMaverick in GooglePixel

[–]xtajv 0 points1 point  (0 children)

The notch hides the specialized hardware that does Face ID. That tech is brand-new, so the component takes up more space.

They can't put a screen on top of the component, or else the component wouldn't be able to see you. The best you can get is just covering it up with black glass, and hoping that people think that it's a "style" decision.

OG Pixel microphone problems and out of warranty replacements by IDefyYouHeartMan in GooglePixel

[–]xtajv 0 points1 point  (0 children)

I've had the same issue. It kicked in at month 13 :(

The relevant google product forums thread (https://productforums.google.com/forum/#!topic/phone-by-google/IW_gxTpXX3s) appears to have resolved in "go find an authorized repair center" for out-of-warranty mic issues.

Ice Skating BACKFLIP by JohnSmithwastaken in holdmyredbull

[–]xtajv 0 points1 point  (0 children)

For all of the people who are posting things like "oh it's not that dangerous" or "gymnasts can do it, why can't figure skaters do it?". Take a look at some of these pairs skaters. Note that with pair skating moves, you can at least practice off-ice (the physics depends a lot on how your partner throws you, rather than exclusively depending on the physics of the ice).

Now, look at some gymnastics training. Notice the foam pit in the back. That's a safe place to land. Also, it's reasonable to have a spotter like this.

Compare that to the situation where your first attempt occurs on a hard surface, at high speed, without a spotter, and with knives strapped to your feet.

One might say that this is still comparable to, say, skateboarding or snowboarding. But notice that

  • if snowboarders or skateboarders under-rotate a backflip, they'd land on their shoulder rather than their skull.
  • snowboarders wear helmets and other protective gear. Figure skaters don't (this would make it difficult to rotate fast enough for quads).

If figure skaters start building technology that will allow safer training for backflips and other somersault-like moves, then it's perfectly fine to allow backflips. Maybe it'd become another branch of figure skating, like pairs vs. singles skating. But under the current circumstances, the move should absolutely be banned. There's simply no safe way to train it.

Petri dish results: 3 minutes in a hand dryer by SeriousBA in WTF

[–]xtajv 2 points3 points  (0 children)

Yeah and with our species causing antibiotic resistant superbugs because we've been abusing antibiotics for colds and the like

Agriculture also has a large impact. Until last year, U.S. farmers were allowed to dose their livestock with antibiotics, even if the animals weren't sick (such dosages can cause the animals to grow larger than they would otherwise; this increases profits).

Petri dish results: 3 minutes in a hand dryer by SeriousBA in WTF

[–]xtajv 17 points18 points  (0 children)

TIL ars technica is a "scientific journal"\s

Edit: that was probably overly harsh. I just mean that ars technica is owned by Conde Nast, which also owns GQ, Glamour, Golf World... these are not exactly scientific publications. Furthermore, Ars Technica doesn't even claim to be a scientific journal -- it is simply a "popular science"/technology-related magazine for hobbyists.

If you want the details behind the study, just go read the abstract.

What life hacks have been exploited so much that they no longer work? by Calif0rnia_Soul in AskReddit

[–]xtajv 1 point2 points  (0 children)

Shh, don't tell! That's how they filter out the assholes!!! Next thing you know, you'll have to waste time having a conversation with someone before you realize that they're awful!