タグ

ブックマーク / blog.kazuhooku.com (6)

  • QUICむけにAES-GCM実装を最適化した話 (2/2)

    前半で述べたように、OpenSSLのAEAD暗号器は、長いAEADブロックの処理を前提に作られています。平文の暗号化処理においては理論上の上限にあたる速度を叩き出す一方、事前処理と事後処理、および呼出オーバーヘッドについては、あまり最適化が図られているとは言えません。これは、AEAD暗号の主な使用用途が、これまでTLSという長いAEADブロックを使う(ことが一般的な)プロトコルであったことを反映していると言えるでしょう。 一方、QUICにおいては、UDPパケット毎に独立した、短いAEADブロックを暗号化する必要があり、したがって、次のような速度向上の機会があることが分かります。 AEAD処理をひとつの関数にまとめ、事前処理と事後処理を、パイプライン化されスティッチングされた暗号処理と並行に走らせることができれば、AEADブロックが短くても、理論値に近いスループットを発揮するような、AES-

    QUICむけにAES-GCM実装を最適化した話 (2/2)
    syohex
    syohex 2020/06/18
  • QUICハンドシェイクの再設計、もしくはTLSレイヤの終焉

    先週スウェーデンのKistaで開催された第5回QUIC Interimで、ハンドシェイクプロトコルの再設計案の採用が決まりました。 提案者として、その背景にある考え方を整理したいと思います。 ▪️提案内容 詳しくはDesign Docを見てもらえばいいとして、ざっくりいうと、TLSスタックをふたつに分割し パケットはQUICがレイアウトしたバイト列をTLSスタックが提供するAPIを使って暗号化注1して生成 ハンドシェイクメッセージについては、平文のメッセージをTLSスタックとQUICスタックとの間で交換し、QUICスタック側で上記手法によるパケット化暗号化を行う というものです。 これにより、たとえばサーバがハンドシェイク時に送出するパケットの構造は以下のようにかわります。 図1. 従来方式 図2. 新方式 赤は難読化(つまり正当なパケットと攻撃との区別がつかない)、黄は未認証の暗号化(通

    QUICハンドシェイクの再設計、もしくはTLSレイヤの終焉
  • Optimizing performance of multi-tier web applications using HTTP/2 push

    Optimizing performance of multi-tier web applications using HTTP/2 push Push is a feature of HTTP/2, that allows a server to speculatively send response to a client, anticipating that the client will use the response. In my earlier blogpost, I wrote that HTTP/2 push does not have significant effect on web performance when serving static files from a single HTTP/2 server. While that is true, push d

    Optimizing performance of multi-tier web applications using HTTP/2 push
    syohex
    syohex 2015/12/03
  • jailing - chroot jailを構築・運用するためのスクリプトを書いた

    個人サーバで外部に公開するサービスを動かすときには、chrootを使うにこしたことはないわけです。サービス毎にchrootしてあれば、サーバソフトウェアにセキュリティホールがあっても、他の情報が漏洩したりする可能性をぐっとおさえることができるわけですから。 でも、そのためだけにVPSdockerとかコンテナを入れて使うってのは、構築も運用もめんどくさいし、ディスク容量うし、やりたくない。systemd-nspawnも割と重たい雰囲気だし、LTSなubuntuだとそもそもsystemd入ってないし… 俺たちがほしいのは、ホストの環境の一部のみにアクセスできる、手軽なjailだー! ってわけで、ざっくり書いたのが、jailing。 /usr/bin等、OS由来のディレクトリをchroot環境にread-onlyでエクスポートしつつ、指定されたコマンドを、そのchroot環境で動かすスクリプ

  • Kazuho's Weblog: HTTP/2 is much faster than SPDY thanks to dependency-based prioritization

    HTTP/2 is much faster than SPDY thanks to dependency-based prioritization Background HTTP/2 provides two methods to prioritize streams (e.g. files being served). One method is called weight-based prioritization. In weight-based prioritization, every stream is given a weight, and the value is used by the server to proportionally distribute the bandwidth between the streams. The other method is depe

    Kazuho's Weblog: HTTP/2 is much faster than SPDY thanks to dependency-based prioritization
    syohex
    syohex 2015/04/16
  • 5x performance - switching from LWP to Furl & Net::DNS::Lite

    Recently I rewrote some of our code that used LWP::UserAgent to use Furl instead, and have been observing more than 5x increase in performance (the CPU time spent for each HTTP request in average has dropped 82%). The fact clearly shows that if you are having performance issues with LWP::UserAgent it is a good idea to switch to Furl.  And here are my recommendations when doing so: use the low-leve

    syohex
    syohex 2011/02/04
    Furlの高速性について
  • 1