Skip to content
By using Twitter’s services you agree to our Cookies Use. We and our partners operate globally and use cookies, including for analytics, personalisation, and ads.

This is the legacy version of twitter.com. We will be shutting it down on June 1, 2020. Please switch to a supported browser, or disable the extension which masks your browser. You can see a list of supported browsers in our Help Center.

  • Home Home Home, current page.
  • About

Saved searches

  • Remove
  • In this conversation
    Verified accountProtected Tweets @
Suggested users
  • Verified accountProtected Tweets @
  • Verified accountProtected Tweets @
  • Language: English
    • Bahasa Indonesia
    • Bahasa Melayu
    • Català
    • Čeština
    • Dansk
    • Deutsch
    • English UK
    • Español
    • Filipino
    • Français
    • Hrvatski
    • Italiano
    • Magyar
    • Nederlands
    • Norsk
    • Polski
    • Português
    • Română
    • Slovenčina
    • Suomi
    • Svenska
    • Tiếng Việt
    • Türkçe
    • Ελληνικά
    • Български език
    • Русский
    • Српски
    • Українська мова
    • עִבְרִית
    • العربية
    • فارسی
    • मराठी
    • हिन्दी
    • বাংলা
    • ગુજરાતી
    • தமிழ்
    • ಕನ್ನಡ
    • ภาษาไทย
    • 한국어
    • 日本語
    • 简体中文
    • 繁體中文
  • Have an account? Log in
    Have an account?
    · Forgot password?

    New to Twitter?
    Sign up
colmmacc's profile
Colm MacCárthaigh
Colm MacCárthaigh
Colm MacCárthaigh
@colmmacc

Tweets

Colm MacCárthaigh

@colmmacc

AWS, Apache, Crypto, Irish Music, Haiku, Photography

Seattle
notesfromthesound.com
Joined April 2008

Tweets

  • © 2020 Twitter
  • About
  • Help Center
  • Terms
  • Privacy policy
  • Imprint
  • Cookies
  • Ads info
Dismiss
Previous
Next

Go to a person's profile

Saved searches

  • Remove
  • In this conversation
    Verified accountProtected Tweets @
Suggested users
  • Verified accountProtected Tweets @
  • Verified accountProtected Tweets @

Promote this Tweet

Block

  • Tweet with a location

    You can add location information to your Tweets, such as your city or precise location, from the web and via third-party applications. You always have the option to delete your Tweet location history. Learn more

    Your lists

    Create a new list


    Under 100 characters, optional

    Privacy

    Copy link to Tweet

    Embed this Tweet

    Embed this Video

    Add this Tweet to your website by copying the code below. Learn more

    Add this video to your website by copying the code below. Learn more

    Hmm, there was a problem reaching the server.

    By embedding Twitter content in your website or app, you are agreeing to the Twitter Developer Agreement and Developer Policy.

    Preview

    Why you're seeing this ad

    Log in to Twitter

    · Forgot password?
    Don't have an account? Sign up »

    Sign up for Twitter

    Not on Twitter? Sign up, tune into the things you care about, and get updates as they happen.

    Sign up
    Have an account? Log in »

    Two-way (sending and receiving) short codes:

    Country Code For customers of
    United States 40404 (any)
    Canada 21212 (any)
    United Kingdom 86444 Vodafone, Orange, 3, O2
    Brazil 40404 Nextel, TIM
    Haiti 40404 Digicel, Voila
    Ireland 51210 Vodafone, O2
    India 53000 Bharti Airtel, Videocon, Reliance
    Indonesia 89887 AXIS, 3, Telkomsel, Indosat, XL Axiata
    Italy 4880804 Wind
    3424486444 Vodafone
    » See SMS short codes for other countries

    Confirmation

     

    Welcome home!

    This timeline is where you’ll spend most of your time, getting instant updates about what matters to you.

    Tweets not working for you?

    Hover over the profile pic and click the Following button to unfollow any account.

    Say a lot with a little

    When you see a Tweet you love, tap the heart — it lets the person who wrote it know you shared the love.

    Spread the word

    The fastest way to share someone else’s Tweet with your followers is with a Retweet. Tap the icon to send it instantly.

    Join the conversation

    Add your thoughts about any Tweet with a Reply. Find a topic you’re passionate about, and jump right in.

    Learn the latest

    Get instant insight into what people are talking about now.

    Get more of what you love

    Follow more accounts to get instant updates about topics you care about.

    Find what's happening

    See the latest conversations about any topic instantly.

    Never miss a Moment

    Catch up instantly on the best stories happening as they unfold.

    1. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
      • Report Tweet
      • Report NetzDG Violation

      Colm MacCárthaigh Retweeted Colm MacCárthaigh

      O.k., this is happening ... now. I'm going to explain what's actually going on when data is encrypted, hopefully without mystifying, oh and some of the weird and inconsistent stuff cryptographers come up with.https://twitter.com/colmmacc/status/1100976962846154752 …

      Colm MacCárthaigh added,

      Colm MacCárthaigh @colmmacc
      Prompted by some good questions, in the next few days I'm going to do a longer-than-usual tweet thread explainer on symmetric cryptography. That's the kind we all use for encrypting data. Are there things you've always been curious about? It's mostly baffling, so no shaming.
      14 replies 133 retweets 388 likes
      Show this thread
    2. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
      • Report Tweet
      • Report NetzDG Violation

      O.k. so symmetric encryption - that's what we most commonly use when we want to encrypt gobs of data, large and small. Your browser sends and receives your data with symmetric encryption. If your files or disk are encrypted ... that's symmetric encryption.

      2 replies 6 retweets 8 likes
      Show this thread
    3. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
      • Report Tweet
      • Report NetzDG Violation

      iMessage, Signal, WhatsApp - they all use symmetric encryption to actually encrypt your messages. So at it's most basic, when you think of encryption as take chunks of data and "scrambling" them so that nobody who doesn't have a key can understand them, that's this.

      2 replies 0 retweets 1 like
      Show this thread
      Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
      • Report Tweet
      • Report NetzDG Violation

      Simple example, let's say I have the string "Ovaltine" and I want to encrypt it. I could use rot13, a very simple old-school Caesar cipher which just basically makes a circle out of the alphabet (so a meets z) and replaces each letter with the letter that is 13 letters away ...

      11:38 AM - 1 Mar 2019
      • 2 Likes
      • Carson Kelly Clarkson (Since You Been Gone) Otto
      1 reply 0 retweets 2 likes
        1. New conversation
        2. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          So "O" becomes "B", and "v" becomes "i" and "Ovaltine" becomes "Binygvar". Of course this isn't very secure, it's a silly example, it's very easy to break this kind of encryption because an attacker can check which letter is most common (which is usually e) and work it all out.

          1 reply 0 retweets 4 likes
          Show this thread
        3. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          Now, you might imagine that there must be more sophisticated ways to "scramble" the letters. Like have some kind of complicated scheme where a maps to 'p', but then the next time it maps to 'f', or maybe even 'a' maps to two letters sometimes, like a -> 'jd' or something.

          1 reply 0 retweets 2 likes
          Show this thread
        4. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          So like with a complicated scheme like that 'Ovaltine' could become say "FGyswDmweeRq" (notice it's longer). Well, there are encryption algorithms throughout history that work like this, but it's not how modern encryption works at all.

          1 reply 0 retweets 4 likes
          Show this thread
        5. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          Instead of "scrambling" letters, modern encryption works by taking data and combining it with seemingly-random looking data in a clever way. It's similar to rot13 in two important ways: encryption and decryption are actually the same operation, and everything is in-place.

          1 reply 0 retweets 7 likes
          Show this thread
        6. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          Actually did you notice that rot13 is both an encryption and decryption algorithm? rot13(Ovaltine) -> Binygvar , rot13(Binygvar) -> Ovaltine. I like to think that's one of the nice symmetries of symmetric encryption. Anyway, back to that clever way I was talking about ...

          1 reply 0 retweets 7 likes
          Show this thread
        7. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          The cleverness we use is a bitwise XOR operation. There are inconsistent notations for XOR in cryptography and formal logic and code, but I'll use the one you're probably familiar with. It looks like a hat: ^

          2 replies 0 retweets 5 likes
          Show this thread
        8. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          XOR is short for "exclusive OR" and it's an operator (or function if you want to think of it like that) that takes two arguments and returns one result. a ^ b = c. It's bitwise, so it operates on each corresponding bit.

          1 reply 0 retweets 5 likes
          Show this thread
        9. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          If a and b are bytes, you can think of a ^ b = c as really 8 different operations all happening at once. ^ compares the first bit of a, and the first bit of b, and puts the result in the first bit of c. And it does the same 7 more times, for the other bits.

          1 reply 0 retweets 3 likes
          Show this thread
        10. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          The rules are simple: if a bit from a is "1" OR if a bit from b is "1" then we set the same bit to C to 1 ... but only if they *both* weren't 1. That's the exclusive part. Here's an old school truth table:

          2 replies 0 retweets 5 likes
          Show this thread
        11. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          A | B | C 0 | 0 | 0 1 | 0 | 1 0 | 1 | 1 1 | 1 | 1

          10 replies 0 retweets 2 likes
          Show this thread
        12. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          Now the cool thing about xor is that it's like rot13. We can use to encrypt and decrypt things. Going to use some really simple examples here. Let's say that we want to encrypt just the number "3" and that our key is another number "7".

          1 reply 1 retweet 3 likes
          Show this thread
        13. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          So 3 ^ 7 = 4. So the encrypted version is "4". Now to decrypt, I just do the same again: 4 ^ 7 = 3. Try any numbers you like, or any data, this will always work: XOR always reverses itself.

          1 reply 1 retweet 5 likes
          Show this thread
        14. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          Byte by byte, that's how we're actually encrypting and decrypting things, there's no scrambling or moving going on ... but XOR-ing. The hard part is coming up with the data to xor with.

          1 reply 0 retweets 3 likes
          Show this thread
        15. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          One approach is to have a big chunk of secret data lying around and use that to XOR. As long everyone who needs to send or read the original plaintext has the same secret data ... this should work. Couple of problems with this:

          1 reply 0 retweets 0 likes
          Show this thread
        16. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          Problem 1: The secret data needs to be seemingly-random. You can't use the text from book or something. Any patterns in the secret data will show up in the encrypted version, and that's literally part how the allies beat the axis powers in WWII.

          1 reply 0 retweets 7 likes
          Show this thread
        17. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          Problem 2: You can't ever re-use the secret data. Again, patterns will show up. So you have to somehow securely get big wedges of secret random data (One time pads) around to everyone who needs them. Too hard.

          1 reply 0 retweets 1 like
          Show this thread
        18. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          So in modern encryption, we *generate* the secret data we need from a small key, and those keys are much easier to get around and protect. This is what symmetric encryption algorithms really are: schemes for deterministically generating random data from a key.

          1 reply 0 retweets 9 likes
          Show this thread
        19. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          That "deterministic" part really matters: two people with the same key have to generate the *exact* same data, or else they won't be able to understand one another.

          1 reply 0 retweets 2 likes
          Show this thread
        20. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          You've probably heard of lots of these algorithms: AES, 3DES, DES, RC4, ChaCha20. All of these algorithms do this. It turns out that the math problem of taking a key and generating a random stream of data, one that has no patterns and is not predictable in any way, is hard.

          1 reply 0 retweets 8 likes
          Show this thread
        21. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          From that list, only AES and ChaCha20 are considered secure today, they others have been broken in interesting ways ... people figured out how to predict them. AES itself has a bit of patchy reputation, because ...

          2 replies 2 retweets 3 likes
          Show this thread
        22. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          Cryptographers: AES is the premier and most-analyzed encryption algorithm. Absolute gold standard! 🕶️ Also Cryptographers: AES implementations in software (not hardware) are either insecure, or slow, or both. It wasn't designed with caching side-channels in mind. 🤦‍♂️

          2 replies 0 retweets 7 likes
          Show this thread
        23. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          Don't worry too much if you didn't follow that. Just take this away: AES is mathematically awesome but hard to code, it's a good thing we almost always have hardware support to do it instead.

          2 replies 0 retweets 9 likes
          Show this thread
        24. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          ... anyway ... moving on ... how do these encryption algorithms actually work? How do we take a key and securely generate a random stream of data? I'm going to simplify things a little here and talk about blocks.

          1 reply 0 retweets 2 likes
          Show this thread
        25. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          These algorithms take three inputs, and produce encrypted text. The inputs are the key, the plaintext ... and - surprise - something strange called an initialization vector. So for example: AES(key, IV, plaintext) -> encrypted_data

          2 replies 0 retweets 2 likes
          Show this thread
        26. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          The key and IV are combined to create a set of "starting conditions" for the algorithm; it's like an initial permutation, or scrambling, of some scrabble tiles. The same key and the IV will always produce these same starting conditions? Why do we have an IV, you ask? ...

          1 reply 0 retweets 1 like
          Show this thread
        27. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          We have an IV so that we can encrypt multiple messages using the same key. Without an IV, each generated stream would always be the same, and that's no good. One of rules is that we can't re-use ever. So we need the IV to mix things up. But unlike the key, the IV can be public.

          1 reply 0 retweets 2 likes
          Show this thread
        28. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          So when you encrypt a message and send it to someone, you can send add "hey, here's the IV I used". Now it's still critical that we don't re-use the combination of key and IV, because those would generate the same random data.

          1 reply 1 retweet 5 likes
          Show this thread
        29. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          Two common ways to do this: 1) the IV is some kind of counter: we just increment it for every message. 2) the IV is generated randomly, and it's a big enough value that we don't worry too much about collisions. Anyway, I said I'd talk about blocks.

          1 reply 1 retweet 3 likes
          Show this thread
        30. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          So the key and IV are "mixed" or combined in some way to create starting conditions ... these conditions are really an initial "block" of random data. For AES128, the block is 128 bits, for AES256 it's ... 256, for ChaCha20 it's 512-bits.

          2 replies 0 retweets 2 likes
          Show this thread
        31. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          Now the magic and personality of the encryption algorithm really comes in. It's really all about how we generate one block after another, and each block is seemingly-random with predictable relationship to what came before or after, to someone who doesn't have the key.

          1 reply 0 retweets 0 likes
          Show this thread
        32. 24 more replies

      Loading seems to be taking a while.

      Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.

        Promoted Tweet

        false

        • © 2020 Twitter
        • About
        • Help Center
        • Terms
        • Privacy policy
        • Imprint
        • Cookies
        • Ads info