conclusions.tex 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. \chapter{An Empirical Study}
  2. Excluding Dixon's factorization method, all attacks analyzed so far exploit
  3. some peculiarities of a candidate RSA public key $\angular{N, e}$ in order to
  4. recover the private exponent.
  5. Summarizingly:
  6. \begin{itemize}
  7. \item Pollard's $p-1$ attack works only if the predecessor of any of
  8. the two primes factorizing the public modulus is composed of very small
  9. primes;
  10. \item Williams' $p+1$ attack works under similar conditions - the predecessor
  11. or the successor of any of the two primes can be easily factorized;
  12. \item Fermat's factorization is valuable whenever the two primes $p$ and $q$
  13. are really close to each other;
  14. \item Pollard's $\rho$ method is best whenever one of the two primes is
  15. strictly lower than the other.
  16. \end{itemize}
  17. Dixon's factorization method instead, being a general-purpose factorization
  18. algorithm, can be employed to \emph{measure} the strength of a RSA
  19. keypair: the more relations (satisfying \ref{eq:dixon:fermat_revisited}) are
  20. found, the less it is assumed resistant.
  21. Given these hypotesis, it has been fairly easy to produce valid RSA candidates
  22. that are exploitable using the above attacks, and use them to assert the
  23. correctness of the implementation.
  24. On the top of that, there has been a chance to test the software under real
  25. conditions: we choose download the SSL keys (if any) of the top one million visited
  26. websites, and survey them with the just developed software. This not only gave
  27. us the opportunity to survey the degree of security on which the internet is
  28. grounded today, but also led to a deeper understanding of the capacities and limits of
  29. the most widespread libraries offering crypto nowadays.
  30. \vfill
  31. \section{To skim off the dataset}
  32. What has been most scandalous above all was to discover was that more than
  33. \strong{half} of the most visited websites do \strong{not} provide SSL
  34. connection over port 443 - reserved for HTTPS according to IANA
  35. \cite{iana:ports}.
  36. To put it in numbers, we are talking about $533$ thousands websites either
  37. unresolved or unreachable in $10$ seconds.
  38. As a side note for this, many websites (like \texttt{baidu.com} or
  39. \texttt{qq.com}) keep a tcp connection open without writing anything to the
  40. channel, requiring us to adopt a combination of non-blocking socket with the
  41. \texttt{select()} system call in order to drop any empty communication.
  42. It would be intesting to investigate more on these facts, asking ourselves how
  43. many of those unsuccessful connetion are actually wanted from the server, and
  44. how many dropped for cernsorship reasons; there's enough room for another
  45. project.
  46. Of the remaining $450,000$ keys, $21$ were using different ciphers than RSA. All
  47. others represent the dataset upon which we worked on.
  48. \section{To count}
  49. Once all valuable certificate informations have been stored inside a database,
  50. almost any query can be performed to get a statistically valuable dregree of
  51. magnitude to which some conditions are satisfied. What follows now is a list of
  52. commented examples that we believe are relevant parameters for understanding of
  53. how badly internet is configured today.
  54. \begin{figure}[H]
  55. \includegraphics[width=0.7\textwidth]{e_count.png}
  56. \end{figure}
  57. The most prolific number we see here, $65537$ in hexadecimal, is the fouth
  58. Fermat number and no other than the largest known prime of the form $2^{2^n} +
  59. 1$. Due to its composition, it has been advised by NIST as default public
  60. exponent, and successfully implemented in most softwares, such as \openssl\!.
  61. Sadly, a negleglible number of websites is using low public exponents,
  62. which makes the RSA key vulnerable to Coppersmith's attack. Unfortunately, this
  63. topic goes beyond the scope of this research and hence has not been analyzed
  64. further.
  65. \begin{figure}[H]
  66. \includegraphics[width=0.7\textwidth]{n_count.png}
  67. \end{figure}
  68. What is interesting to see here is that an enormous portion of our dataset
  69. shared the same public key, pushing down our of one order of magnitude the
  70. number of expected keys. Reasons for this are mostly practical: it is extremely
  71. frequent to have blogs hosted on third-party sercives such as ``Blogspot'' or
  72. ``Wordpress'' which always provide the same X.509 certificate, as they belong to
  73. an unique organization.
  74. Though improbable, it is even possible that exists a millesimal portion of
  75. different websites sharing the same public key due to a
  76. bad CSRNG, and therefore also the same private key. Such a case has been
  77. already investigated in \cite{ron:whit}.
  78. \begin{figure}[H]
  79. \includegraphics[width=0.6\textwidth]{localhost_certs.png}
  80. \end{figure}
  81. Here we go. A suprisingly consistent nuber of websites provides certificates
  82. with dummy, wrong, or even testing informations. Some even inject non-printable
  83. bytes in the \emph{common name} field.
  84. Some are certified from authorities, some chinese governmental entities.
  85. \chapter{Conclusions \label{conclusions}}
  86. \noindent
  87. Everytime we see a certificate, we get this idea the somebody is telling us the
  88. connection is safe. There is some authority out there telling what to do.
  89. We should be thinking more about what these authorities are and what they are
  90. doing.
  91. %%% Local Variables:
  92. %%% mode: latex
  93. %%% TeX-master: "question_authority"
  94. %%% End: