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

      Then look up Feistel networks, which are sort of the next level of that. Look up S-Boxes then if you're more curious, and finally, take a look at how Salsa20 does the rotations that ChaCha20 uses. It's all more approachable than you might think!

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

      O.k. so now we know how random streams of data can be combined with plaintext to do encryption and decryption, and we sort of know how random streams of data are produced. Isn't that it?

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

      For full disk encryption, it almost is really. We basically just encrypt every block or sector of storage, under the same key, and using an IV that's derived from the "position" on disk. So we can always just decrypt any block anywhere on the disk, as long as we have the key.

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

      But there's a problem with this ... someone can mess with the encrypted data. If I change the value of any byte, even if I don't have the key, it will mess with the decrypted output. There's no real security against that kind of meddling.

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

      For sending messages and data over the network, that's not going to got it. We don't want people tampering with our information. So we need to add an integrity check! There's a few schemes for this.

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

      HMAC, GCM and Poly1305 are the common ones in use right now. In each case, these algorithms basically take the data as input, along with another key (an integrity key) and produce a MAC or a tag, which is just another piece of data that acts as a signature.

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

      So to encrypt, and protect, our string, one scheme might be: AES(key, IV, "Ovaltine") -> encrypted_output HMAC(key, encrypted_output) -> MAC and then on the wire, we send: IV | encrypted_output | MAC

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

      To decrypt, we check the MAC first by generating it again and making sure they are the same, and then we decrypt the output. Internally there are differences between how HMAC, GCM and Poly1305 generate these signatures, but you don't need to worry about that.

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

      Today, this combination of operations is wrapped up in function we call "AEAD" which means Authenticated Encryption with Additional Data, and it does all of this is a mostly-foolproof way for you. Basically: AEAD(key, IV, plaintext, additional_data) -> IV_encrypted_data_MAC

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

      The "additional data" is just any other data you might want to "prove" the sender has, but not send; like say some meta-data that establishes a permission. It's often left empty.

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

      Now you can still screw up with AEAD. If you re-use the same IV, that's bad!! There are attempts to make this better, my colleague Shay has been working on a cool scheme called SIV, and it adds a measure of protection against that too.

      12:43 PM - 1 Mar 2019
      • 2 Likes
      • Jimmy Steve Christey Coley
      1 reply 0 retweets 2 likes
        1. New conversation
        2. Colm MacCárthaigh‏ @colmmacc 1 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          If you do use unique IVs, modern encryption is really robust. In general, you could publish some encrypted text in the New York Times, and no-one will be able to crack it. This Is true even if /some/ of the text is known. For example ...

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

          In internet protocols a lot of the text is known, a HTTP server always responds the same way and the first few bytes are known and totally guessable. This doesn't matter at all - doesn't help an attacker figure anything else out even one bit. We've come a long way from WWII.

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

          But there are attacks that do work! If you're sending this data over a network, and someone can see the timing and size of message. This opens us up to traffic analysis.pic.twitter.com/8qeI9A3Ozp

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

          Let's look at length first. O.k. so the length is obviously not hidden. That's fine if you're trying to protect your password or credit card number in the middle of a response. No big deal. But it does mean that someone might be able to fingerprint the content you're sending.

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

          Simple example: if you send a gif over a messaging app, if the size of that gif is unique, someone in the middle can probably guess what gif you just sent. There are more sophisticated versions of this for Google Maps, Netflix, WikiPedia, and so on.

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

          The way we protect against this is to "pad" messages, to make large numbers of messages appear to be the same size no matter what. Military grade network encryption actually pads all traffic all the time, so it's always the same!

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

          Another problem with length is that if you're using compression, and let attackers control any of the content on a page that a user sees, that can let the attackers figure out even small secrets. Look up the "CRIME" attacks. It's awesome, and scary.

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

          I said the other problem is timing. Obviously the timing of each message is public, but is that a big deal? It can be! For example, if you send a message for every use keystroke, it's trivial to figure out what they're typing through timing analysis. WOW.

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

          Another example is VOIP. If your call app only sends data when people are speaking, but not during the silences, that's still enough to guess about 70% of English-language speech. Just from the silences! Scary cool.

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

          These examples underling: even when you use encryption algorithms and schemes we've been perfecting for about 80 years, there's still some gaps you can walk into and break the security. Which is why this stuff is worth knowing!

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

          Anyway, that's the level I'm going to stick at for now, but we've covered a lot of ground. If you've finished this thread, thank you! But also you should now have some kind of better understanding of what's going on, and what to be wary of. Feel free to AMA.

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

          Oh the truth table for XOR is wrong. I guess it's more of a lies table. Should be: a | b | c 0 | 0 | 0 1 | 0 | 1 0 | 1 | 1 1 | 1 | 0

          5 replies 0 retweets 36 likes
          Show this thread
        14. End of conversation

      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