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 20 Mar 2019
      • Report Tweet
      • Report NetzDG Violation

      Colm MacCárthaigh Retweeted Filippo Valsorda  🇮🇹

      Late night emergency thread about this super interesting bug in Salsa20 because it is a case where MAC-then-Encrypt is better than Encrypt-then-MAC. But that's supposed to be heresy!https://twitter.com/FiloSottile/status/1108578067713265664 …

      Colm MacCárthaigh added,

      Filippo Valsorda  🇮🇹Verified account @FiloSottile
      Replying to @colmmacc
      I agree it's unfortunate, but the confidentiality concern definitely dominates. Also, it's easy to rollback a Go dependency (if you realize that's your issue.) As for telling people, that feels too use-case specific to effectively communicate it to a wide audience.
      1 reply 10 retweets 42 likes
      Show this thread
    2. Colm MacCárthaigh‏ @colmmacc 20 Mar 2019
      • Report Tweet
      • Report NetzDG Violation

      Colm MacCárthaigh Retweeted Colm MacCárthaigh

      First - if you haven't read my primer thread on symmetric cryptography, here it is:https://twitter.com/colmmacc/status/1101580455113973761 …

      Colm MacCárthaigh added,

      Colm MacCárthaigh @colmmacc
      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.
      Show this thread
      1 reply 0 retweets 3 likes
      Show this thread
    3. Colm MacCárthaigh‏ @colmmacc 20 Mar 2019
      • Report Tweet
      • Report NetzDG Violation

      Second: allow me to correct myself. In that thread I confused things by over-loading the term block. I talked about the block of data that AES/ChaCha20/Salsa20 assemble as initial state. The numbers were right but misleading, because they don't correspond to the block-size ...

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

      ... that's a confusing piece of minutia; but basically even though AES assembles a block of 256-bits to start with and needs a bigger key, the block size for AES256 is 128-bits. That size is about the data size of the blocks that the cipher permutes as it goes.

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

      Like I said, confusing! Anyway, let's talk about the bug! As part of its initial state, Salsa20 uses a counter. Not exactly like AES when in counter mode (That's AES-CTR and AES-GCM), more of a hybrid. And the bug is in this counter ...

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

      Colm MacCárthaigh Retweeted Filippo Valsorda  🇮🇹

      The counter should be able go to 2^64, which is big enough to encrypt extremely large volumes of data. The bug is that it cycles at 2^32, far far lower.https://twitter.com/FiloSottile/status/1108569374343000064 …

      Colm MacCárthaigh added,

      Filippo Valsorda  🇮🇹Verified account @FiloSottile
      Today we published a security fix for http://golang.org/x/crypto/salsa20 …. If you generated more than 256 GiB of output from a single key+nonce pair, it would loop due to a counter overflow. Found by @mbmcloughlin's fuzzers. https://groups.google.com/d/msg/golang-announce/tjyNcJxb2vQ/n0NRBziSCAAJ …
      Show this thread
      1 reply 1 retweet 1 like
      Show this thread
    7. Colm MacCárthaigh‏ @colmmacc 20 Mar 2019
      • Report Tweet
      • Report NetzDG Violation

      The effect is that after generating 256GiB of cipher stream, the cipher will generate incorrect output and then cycle back and generate the same data it began with. Now to be clear, Salsa20 was not designed to be used for more than 4Kib at a time, @hashbreaker very clearly warns!

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

      But the implementations don't stop you from doing it. They aren't misuse-resistant. This is very very bad. If you encrypt two strings using the same cipher string, it's generally trivial to decrypt them.

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

      Colm MacCárthaigh Retweeted Colm MacCárthaigh

      Here's why! If we go back to my XOR example:https://twitter.com/colmmacc/status/1101572361365516288 …

      Colm MacCárthaigh added,

      Colm MacCárthaigh @colmmacc
      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.
      Show this thread
      1 reply 0 retweets 1 like
      Show this thread
    10. Colm MacCárthaigh‏ @colmmacc 20 Mar 2019
      • Report Tweet
      • Report NetzDG Violation

      So in my example 3 was the plaintext, and 7 was the key. 3 ^ 7 = 4, so that's the encrypted text. Let's say we encrypted 5 too. 5 ^ 7 = 2. Well it turns out that XORing the encrypted text is just like XORign the plaintext. 3 ^ 5 = 6, and 4 ^ 2 = 6.

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

      So re-using the same stream reveals the "difference" between the plain-texts. There's enough information in there to make guesses at what the plaintext is. O.k. so the bug is bad, and has to be fixed. Real world things could hit this: e.g. people might be encrypting a snapshot.

      9:25 PM - 20 Mar 2019
      • 3 Likes
      • vladdy 黒田 東彦 stan 🚫🛬5️⃣-gon
      2 replies 0 retweets 3 likes
        1. New conversation
        2. Colm MacCárthaigh‏ @colmmacc 20 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          But here's what interesting: the fix also breaks anything that's already encrypted! if you stored a > 256GiB encrypted image using Salsa20 ... it will now partially decrypt to garbage.

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

          The normal defense against this in cryptography is the MAC. A MAC is basically a keyed checksum of the data; if the data ever changes, even by one bit, the MAC should fail to validate. But in this case, an encrypt-then-MAC style MAC will be absolutely valid!

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

          To detect this kind of corruption: you'd need to have a MAC of the plaintext. MAC-then-encrypt is usually considered a bad practice, because it leaves the cryptography open to side-channel experimentation by attackers, but in this case you absolutely need it!

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

          So really you need MAC-then-encrypt-then-also-MAC! I call this scheme Combined Online Linear Message MAC And Corruption Check (it's ok to shorten that to COLMMACC).

          2 replies 4 retweets 37 likes
          Show this thread
        6. Colm MacCárthaigh‏ @colmmacc 20 Mar 2019
          • Report Tweet
          • Report NetzDG Violation

          But seriously; if you used this cipher for a large volume data store (we don't!) fixing this would be a *major* pain. You'd have to decrypt and re-encrypt everything. If it crossed control boundaries, you'd have to tell users to keep a copy of the broken cipher implementation.

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

          It's like the worst kind of applied crypto pain. Changing network crypto is easy in comparison! TLDR: version *everything* always, and include a plaintext checksums if you have to worry about long-term durability minutia like this. /out

          2 replies 1 retweet 8 likes
          Show this thread
        8. End of conversation
        1. Praveen Jatkar‏ @JatkarP 20 Mar 2019
          • Report Tweet
          • Report NetzDG Violation
          Replying to @colmmacc

          Re-using the same stream after 256GiB of data is also bad ?

          0 replies 0 retweets 0 likes
          Thanks. Twitter will use this to make your timeline better. Undo
          Undo

      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