對 SHA-3 的攻擊

隔壁棚剛順利打趴 SHA-1 (Google 與 CWI Amsterdam 合作,找到 SHA-1 第一個 collision),還是有人在針對比較新的演算法在攻擊:「SymSum: Symmetric-Sum Distinguishers Against Round Reduced SHA3」。

完整的 SHA-3 是 24 rounds,這次打的是 9 rounds 版本,雖然有段距離,但這等於是大進展:

Based on this we propose a new distinguisher called SymSum for the SHA3 family which penetrates up to 9 rounds and outperforms the ZeroSum distinguisher by a factor of four.

不過 SHA-3 用的人不算多,該不會在還沒成為主流就被打趴...

Posted in Computer, Murmuring, Security | Tagged , , , , , , , | Leave a comment

AES-GCM-SIV

在「AES-GCM-SIV: Specification and Analysis」這邊看到 AES-GCM-SIV 的作者自己投稿上去的資料,是個已經被放進 BoringSSL 並且在 QUIC 上使用的演算法:

We remark that AES-GCM-SIV is already integrated into Google's BoringSSL library \cite{BoringSSL}, and its deployment for ticket encryption in QUIC \cite{QUIC} is underway.

在 RFC 上的說明解釋了這個演算法的目的是希望當 nonce 沒有被正確實作時仍然可以有比 AES-GCM 強的保護:

This memo specifies two authenticated encryption algorithms that are nonce misuse-resistant - that is that they do not fail catastrophically if a nonce is repeated.

在 128 bits 的情況下,加密的速度大約是 AES-GCM 的 2/3 (在都有硬體加速的情況下),但解密的速度則與 AES-GCM 相當:

For encryption, it is slower than AES-GCM, because achieving nonce-misuse resistance requires, by definition, two (serialized) passes over the data. Nevertheless, optimized implementations run GCM-SIV (for 128-bit keys) at less than one cycle per byte on modern processors (roughly 2/3 of the speed of nonce-respecting AES-GCM). On the other hand, GCM-SIV decryption runs at almost the same speed as AES-GCM.

不過這就是 trade-off 了,如果 nonce 有正確被實作的話,其實不需要這個...

Posted in Computer, Murmuring, Network, Security, WWW | Tagged , , , , , , , , , , , | Leave a comment

Plurk 的 API 將在五月強制走 HTTPS

Plurk 的 API 之前一直都是走 HTTP,現在總算是要改 HTTPS 了,出自這邊

有在用噗浪 API 開發程式的噗友們請注意~Plurk API 將於5月1日之後全面強制改用 HTTPS 更安全的通訊協定。如果您在這之後仍使用 HTTP 來呼叫 API,將會被 301 Moved Permanently 重導到 HTTPS 的版本,而這非常可能導致您原來的程式無法正常運作,請儘速更新您的程式喔~

不過官網還沒強制切到 HTTPS 上...

Posted in Computer, Murmuring, Network, Programming, Security, WWW | Tagged , , , , , | Leave a comment

AWS Management Console 可以修改 EC2 Role 了...

前幾天提到的「EC2 的 IAM Role 可以動態改了...」在網頁上的 AWS Management Console 可以改了:「Easily Replace or Attach an IAM Role to an Existing EC2 Instance by Using the EC2 Console」。

大賀 XDDD

Posted in AWS, Cloud, Computer, Murmuring, Network, Security | Tagged , , , , , , , , , , | Leave a comment

Google 與 CWI Amsterdam 合作,找到 SHA-1 第一個 collision

GoogleCWI Amsterdam 正式攻陷 SHA-1:「Announcing the first SHA1 collision」,然後也沒什麼意外的,現在大家都喜歡針對各種安全問題註冊一個 domain 來介紹:「SHAttered」。

shattered-1.pdfshattered-2.pdf 下載下來確認,可以看出來兩個不一樣的檔案有同樣的 SHA-1 value:

gslin@home [/tmp] [21:33/W4] sha1sum *.pdf
38762cf7f55934b34d179ae6a4c80cadccbb7f0a  shattered-1.pdf
38762cf7f55934b34d179ae6a4c80cadccbb7f0a  shattered-2.pdf

gslin@home [/tmp] [21:33/W4] sha256sum *.pdf
2bb787a73e37352f92383abe7e2902936d1059ad9f1ba6daaa9c1e58ee6970d0  shattered-1.pdf
d4488775d29bdef7993367d541064dbdda50d383f89f0aa13a6ff2e0894ba5ff  shattered-2.pdf

直接拿 pdf 來打,表達的是「一次到位」以及「既然可以攻擊 pdf,那麼其他東西當然也有可能」...

攻擊計算量的部份,這次攻擊使用的資源其實不算少,但對於大公司與大單位已經不是問題了,猜這次 Google 應該是贊助不少雲端設施:

  • 6,500 years of CPU computation to complete the attack first phase
  • 110 years of GPU computation to complete the second phase

這衍生出另外一個頭比較大的問題是 Git 目前使用的 SHA1:

GIT strongly relies on SHA-1 for the identification and integrity checking of all file objects and commits. It is essentially possible to create two GIT repositories with the same head commit hash and different contents, say a benign source code and a backdoored one. An attacker could potentially selectively serve either repository to targeted users. This will require attackers to compute their own collision.

這下得來看 Git 核心團隊要怎麼從 SHA-1 migrate 到其他 hash function 了...

Posted in Computer, Murmuring, Network, Security, WWW | Tagged , , , , , , , , , , , , | 2 Comments

Google Cloud Platform 的機器與服務也支援 GPU 了...

Google 宣佈在 GCP 上的機器與服務支援 GPU 運算了:「GPUs are now available for Google Compute Engine and Cloud Machine Learning」。

算是 beta 階段,用的是 NVIDIA Tesla K80

Google Cloud Platform gets a performance boost today with the much anticipated public beta of NVIDIA Tesla K80 GPUs.

然後台灣的 asia-east1 也在內。第一波必須透過 cli 操作,之後才會在 web console 上加上去:

You can now spin up NVIDIA GPU-based VMs in three GCP regions: us-east1, asia-east1 and europe-west1, using the gcloud command-line tool. Support for creating GPU VMs using the Cloud Console appears next week.

也開始支援 GPU 了...

Posted in Cloud, Computer, Hardware, Murmuring, Network | Tagged , , , , , , , , , , | Leave a comment

Gmail 要開始導入 SMTP Strict Transport Security 了

SMTP MTA Strict Transport Security 算是 SMTP STARTTLS 裡的 HSTS 機制,而 Google 的人在 RSA Conference 上提出要開始用了:「SMTP STS Coming Soon to Gmail, Other Webmail Providers」。

Elie Bursztein, the head of Google’s anti-abuse research team, said at RSA Conference that SMTP STS will be a major impediment to man-in-the-middle attacks that rely on rogue certificates that are likely forged, stolen or otherwise untrusted. Google, Microsoft, Yahoo and Comcast are expected to adopt the standard this year, a draft of which was submitted to the IETF in March 2016.

補上去後對於 SMTP 的隱私保護就會更好了...

Posted in Computer, Mail, Murmuring, Network, Security, Spam | Tagged , , , , , , , , , , | Leave a comment

Amazon Redshift 可以讀 S3 裡被 KMS 加密過的資料了

清資料時發現支援了:「Amazon Redshift now supports encrypting unloaded data using Amazon S3 server-side encryption with AWS KMS keys」:

The Amazon Redshift UNLOAD command now supports Amazon S3 server-side encryption using an AWS KMS key.

這樣資料丟上 Amazon S3 時可以透過 AWS KMS 加密保存,而 Amazon Redshift 可以透過 KMS 直接拉出來,處理起來會方便不少...

不過 Amazon Athena 好像還是沒辦法?

Posted in AWS, Cloud, Computer, Database, Murmuring, Network, Security, Software | Tagged , , , , , , , , , | Leave a comment

每三十秒換一次 ssh port 的 TOTP SSH port fluxing

Facebook 的牆上看到「TOTP SSH port fluxing」這個,有種「沃槽」的感覺...

這方法有種掩耳盜鈴的感覺... (SYN scan 很快的啊)

Posted in Computer, Murmuring, Network, Security, Software | Tagged , , , , , | Leave a comment

Google 的軟體開發

之前有不少 Google 內軟體開發的說明 (像是 2015 年的「Google Is 2 Billion Lines of Code—And It’s All in One Place」),不過這好像是第一次以 paper 的形式整理出來:「Software Engineering at Google」。

當你有一群等級超高的工程師時,軟體工程裡面一堆假設都被推翻,然後一堆工具都是客製化自己開發 (有可能是那個時間點還沒有成熟的工具,也有可能是需要大量客製化),於是就會看到各種有趣的解法... XD

拿來看看還可以,拿來抄八成會出事 XDDD

Posted in Computer, Murmuring, Programming, Software | Tagged , , , , | Leave a comment