{"id":299341,"date":"2020-02-27T09:00:16","date_gmt":"2020-02-27T09:00:16","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=299341"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=299341","title":{"rendered":"\u042d\u0442\u044e\u0434 \u0432 \u0431\u0438\u0442\u043e\u0432\u044b\u0445 \u0442\u043e\u043d\u0430\u0445"},"content":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/490120\/\">\u041a\u043e\u0433\u0434\u0430 \u0442\u043e \u0434\u0430\u0432\u043d\u043e, \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u0432\u044b\u0440\u044f\u043d\u0438\u044f \u00ab\u0432\u00bb \u0438 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u00ab\u043a\u0430\u043a\u00bb \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430 OpenSSL \u0438 \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043e\u0434\u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0438\u0434\u0435\u044f \u0438 \u043a\u0430\u043a \u0432\u0441\u0435 \u0442\u0430\u043a\u0438\u0435 \u043e\u0447\u0435\u043d\u044c \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0434\u0435\u0438 \u043a\u0430\u043d\u0443\u043b\u0430 \u0432 \u043b\u0435\u0442\u0443.<\/p>\n<p>  \u041d\u043e \u0441\u0443\u0445\u043e\u0439 \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u2014 \u0431\u044b\u043b\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u0432 OpenSSL, \u0432 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u043d\u0430 BN_ULONG \u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0440\u043d\u044f \u043f\u043e\u0431\u0438\u0442\u043d\u043e. \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435 \u0443\u0448\u043b\u043e \u043d\u0430 \u0431\u0430\u0433\u0442\u0440\u0435\u043a\u0438\u043d\u0433 \u0438 \u0431\u044b\u043b\u043e \u043f\u043e\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e (\u043f\u043e\u043b\u044c\u0437\u0443\u044f\u0441\u044c \u0441\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0437\u0432\u0438\u043d\u044f\u044e\u0441\u044c \u0437\u0430 \u0441\u0432\u043e\u044e \u0438\u0437\u043b\u0438\u0448\u043d\u044e\u044e \u044d\u043c\u043e\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0433\u0434\u0430, \u043d\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c \u0432 OpenSSL \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0448\u044c), \u0430 \u0432\u043e\u0442 \u0442\u0443 \u0441\u0430\u043c\u0443\u044e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0440\u043d\u044f \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u043e \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e 2^n, \u0433\u0434\u0435 n \u044d\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0438\u0442\\\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044e.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0415\u0441\u043b\u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u0447\u0438\u0441\u0435\u043b \u043f\u043e\u0431\u0438\u0442\u043d\u043e, \u0432 \u0441\u0442\u043e\u043b\u0431\u0438\u043a, \u0442\u043e \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e i-\u0445 \u0431\u0438\u0442\u043e\u0432 \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439, \u0437\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043d\u043e\u0441, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0431\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u2014 \u0442\u0430\u043a \u0438 \u0437\u043d\u0430\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0431\u0438\u0442\u043e\u0432 \u0432 \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044f\u0445 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u044d\u0442\u0438 \u0431\u0438\u0442\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c. \u041a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0438\u0447\u0435\u0433\u043e \u043f\u0443\u0442\u043d\u043e\u0433\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u043d\u043e \u043f\u0440\u0438 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u0435 \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439, \u0442.\u0435. \u043f\u0440\u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0438 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0440\u043d\u044f, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0431\u0438\u0442 \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044f (\u043e\u043d \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u0434\u0438\u043d) \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c,<\/p>\n<p>  \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043a\u043e\u0440\u0435\u043d\u044c \u044d\u0442\u043e \u0438\u043b\u0438 \u043d\u0435\u0442 \u0441\u0442\u0430\u043d\u0435\u0442 \u044f\u0441\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u044b n\/2 \u0431\u0438\u0442\u043e\u0432, \u0438\u043b\u0438 \u0435\u0441\u043b\u0438 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0434\u0432\u043e\u0439\u043a\u0438, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0432\u0430 \u0447\u0438\u0441\u043b\u0430 \u0438 \u0431\u0443\u0434\u0443\u0442 \u043a\u043e\u0440\u043d\u044f\u043c\u0438.<\/p>\n<p>  \u041d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0434\u043e\u043f\u0443\u0449\u0435\u043d\u0438\u044f \u2014 \u0441\u0447\u0438\u0442\u0430\u0435\u043c, \u0447\u0442\u043e \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c \u043a\u043e\u0440\u0435\u043d\u044c \u0438\u0437 \u043d\u0435\u0447\u0435\u0442\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430. \u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0431\u0438\u0442\u044b \u043d\u0443\u043b\u0438 \u0438 \u0438\u0445 \u0447\u0435\u0442\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0445 \u043e\u0442\u0431\u0440\u043e\u0441\u0438\u0442\u044c.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u2014 \u043a\u043e\u0434.<\/p>\n<p>  \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438 \u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u044f \u0432\u0437\u044f\u0442 \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 OpenSSL \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u041f\u043e\u0441\u043b\u0435 \u0447\u0438\u0441\u043b\u043e \u0443\u043c\u043d\u043e\u0436\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0435\u0431\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e BN_mul \u0438 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 square_root \u0434\u0432\u0430\u0436\u0434\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u0435\u043d\u044c. \u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0434\u0432\u0430\u0436\u0434\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0431\u0438\u0442\u044b \u0441\u043e\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044f \u0438\u043b\u0438 11 \u0438\u043b\u0438 01 \u043d\u0435\u0440\u0430\u0437\u043b\u0438\u0447\u0438\u043c\u044b \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430. \u0414\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0447\u0438\u0441\u0435\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0438\u043b\u0438 BIGNUM \u043f\u0430\u043a\u0435\u0442\u0430 OpenSSL \u0438\u043b\u0438  \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u0434\u043b\u0438\u043d\u044b.<\/p>\n<p>  \u0418\u0442\u0430\u043a \u043a\u043e\u0434<\/p>\n<pre><code class=\"cpp\">#include &lt;bitset&gt; #include &lt;stdio.h&gt; #include &lt;openssl\/rsa.h&gt; #include &lt;openssl\/bn.h&gt;  using namespace std; #define DIM 512  int ret = 0; RSA *r = NULL; BIGNUM *bne = NULL; BIO *bp_public = NULL, *bp_private = NULL;  int bits = DIM; unsigned long e = RSA_F4;  bool generate_key() { \tr = RSA_new(); \tret = RSA_generate_key_ex(r, bits, bne, NULL); \treturn (ret ); }  bitset&lt;DIM&gt; square_root(bitset&lt;DIM&gt; key, int prim_1) { \tbitset&lt;DIM&gt; prim; \tint carry = prim_1; \tint i, j, ie; \tprim[0] = 1; \tprim[1] = prim_1;  \tie = DIM \/ 2; \tfor (i = 2; i &lt; ie; i++) { \t\tfor (j = 1; j &lt; i; j++) \t\t\tcarry = carry + (int) (prim[j] * prim[i - j]);  \t\tbool i1 = i &amp; 1; \t\tint q2 = (carry \/ 2) &amp; 1; \t\tint key1 = (int) key[i + 1]; \t\tif (!i1 &amp;&amp; q2 != key1) \t\t\tprim[i] = 1; \t\tif (!i1 &amp;&amp; q2 == key1) \t\t\tprim[i] = 0; \t\tif (i1 &amp;&amp; q2 == key1) \t\t\tprim[i] = prim[(i + 1) \/ 2]; \t\tif (i1 &amp;&amp; q2 != key1) \t\t\tprim[i] = 1 - (int) prim[(i + 1) \/ 2];  \t\tcarry += 2 * (int) prim[i]; \t\tcarry \/= 2; \t} \treturn prim; }  int main() { \tbitset&lt;DIM&gt; bit0_sqrt(0); \tbitset&lt;DIM&gt; bit1_sqrt(0); \tbitset&lt;DIM&gt; bit_p2(1); \tbne = BN_new(); \tret = BN_set_word(bne, e); \tchar *pc, *qc, *rc;  \tif (generate_key() == 1) { \t\tBIGNUM *rez = NULL; \t\tBIGNUM *p2 = NULL; \t\tBIGNUM *tmp = NULL; \t\tconst BIGNUM *n = NULL; \t\tconst BIGNUM *e = NULL; \t\tconst BIGNUM *d = NULL; \t\tconst BIGNUM *p = NULL; \t\tconst BIGNUM *q = NULL;  \t\tRSA_get0_key(r, &amp;n, &amp;e, &amp;d); \t\tRSA_get0_factors(r, &amp;p, &amp;q);  \t\tpc = BN_bn2hex(p); \t\tprintf(&quot;  p = 0x%s\\n&quot;, pc);  \t\tp2 = BN_new(); \t\ttmp = BN_new(); \t\tBN_CTX *ctx; \t\tctx = BN_CTX_new(); \t\tBN_CTX_start(ctx); \t\tBN_mul(p2, p, p, ctx); \t\tpc = BN_bn2hex(p2); \t\tprintf(&quot;p^2 = 0x%s\\n&quot;, pc);  \t\tbit_p2 = 0; \t\tfor (int i = 0; i &lt; BN_num_bits(p2); i++) \t\t\tif (BN_is_bit_set(p2, i)) \t\t\t\tbit_p2[i] = 1;  \t\trez = BN_new(); \t\tbit0_sqrt = square_root(bit_p2, 0); \t\tfor (int i = 0; i &lt; DIM; i++) \t\t\tif (bit0_sqrt[i]) \t\t\t\tBN_set_bit(rez, i); \t\t\telse \t\t\t\tBN_clear_bit(rez, i); \t\trc = BN_bn2hex(rez); \t\tprintf(&quot; 0r = 0x%s\\n&quot;, rc);  \t\tBN_sqr(tmp, rez, ctx); \t\trc = BN_bn2hex(tmp); \t\tprintf(&quot; p2 = 0x%s\\n&quot;, rc);  \t\tbit1_sqrt = square_root(bit_p2, 1); \t\tfor (int i = 0; i &lt; DIM; i++) \t\t\tif (bit1_sqrt[i]) \t\t\t\tBN_set_bit(rez, i); \t\t\telse \t\t\t\tBN_clear_bit(rez, i); \t\trc = BN_bn2hex(rez); \t\tprintf(&quot; 1r = 0x%s\\n&quot;, rc);  \t\tBN_sqr(tmp, rez, ctx); \t\trc = BN_bn2hex(tmp); \t\tprintf(&quot; p2 = 0x%s\\n&quot;, rc); \t}  \tBIO_free_all(bp_public); \tBIO_free_all(bp_private); \tRSA_free(r); \tBN_free(bne); }<\/code><\/pre>\n<p>  \u041a\u043e\u0434 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u0438\u0437\u0432\u0438\u043d\u044f\u044e\u0441\u044c, \u0447\u0442\u043e \u043e\u0434\u043d\u0438\u043c \u043a\u0443\u0441\u043a\u043e\u043c \u2014 \u043d\u043e \u0442\u0430\u043c \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c main \u044d\u0442\u043e \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b OpenSSL, \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u0440\u043d\u044f \u043e\u0446\u0435\u043d\u043a\u0430 \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0431\u0438\u0442\u043e\u0432 \u0432\u0441\u0435\u0433\u043e \u0432 10 \u0441\u0442\u0440\u043e\u043a, \u042f\u0441\u043d\u043e, \u0447\u0442\u043e DIM \u2014 \u044d\u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p>  <code> p = 0xE5CBB3DF3D2E3F56A3DEEAE03204A37995970BFD98FE7242EB37BFFC4935BFD3<\/p>\n<p>  p^2 = 0xCE4611E425E1B6E3C6594862F0C53A61E3D2460CD86A1709B992806B3B920C89<br \/>  F2F33861A38225ABFB4A95E65852BEB5930F7968120D65F039A83417531A87E9<\/p>\n<p>  0r = 0x1A344C20C2D1C0A95C21151FCDFB5C866A68F40267018DBD14C84003B6CA402D<br \/>   p2 = 0x02AEAA25AB8538367E9B72A28CBBF36EB8A42E11A66D3283E3230072A9268CE3<br \/>  F2F33861A38225ABFB4A95E65852BEB5930F7968120D65F039A83417531A87E9<\/p>\n<p>  1r = 0xE5CBB3DF3D2E3F56A3DEEAE03204A37995970BFD98FE7242EB37BFFC4935BFD3<br \/>   p2 = 0xCE4611E425E1B6E3C6594862F0C53A61E3D2460CD86A1709B992806B3B920C89<br \/>  F2F33861A38225ABFB4A95E65852BEB5930F7968120D65F039A83417531A87E9<br \/>  <\/code><\/p>\n<p>  \u0432\u044b\u0432\u043e\u0434 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u043e\u0431\u0430 \u0447\u0438\u0441\u043b\u0430 \u0438 0r \u0438 1r \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0435 \u043a\u043e\u0440\u043d\u0438 \u0447\u0438\u0441\u043b\u0430 p2 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e 2 \u0432 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 DIM. \u0422.\u0435. 0r * 0r == p2 mod 2^DIM \u0438 1r * 1r == p2 mod 2^DIM. \u0418 \u043a \u0442\u043e\u043c\u0443 \u0436\u0435 1r * 1r == p2.<\/p>\n<p>  \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0413\u0435\u0440\u043e\u043d\u0430 \u0431\u044b\u0441\u0442\u0440 \u0438 \u043d\u0435\u0442 \u043d\u0443\u0436\u0434\u044b \u043d\u0430\u0432\u0435\u0440\u043d\u043e \u0432 \u0432\u043e\u0437\u043d\u0435 \u0441 \u0431\u0438\u0442\u0430\u043c\u0438, \u043d\u043e \u043a\u0430\u043a \u044d\u0442\u044e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0445\u043e\u0440\u043e\u0448\u0430.<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/490120\/\"> https:\/\/habr.com\/ru\/post\/490120\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/490120\/\">\u041a\u043e\u0433\u0434\u0430 \u0442\u043e \u0434\u0430\u0432\u043d\u043e, \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u0432\u044b\u0440\u044f\u043d\u0438\u044f \u00ab\u0432\u00bb \u0438 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u00ab\u043a\u0430\u043a\u00bb \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430 OpenSSL \u0438 \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043e\u0434\u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0438\u0434\u0435\u044f \u0438 \u043a\u0430\u043a \u0432\u0441\u0435 \u0442\u0430\u043a\u0438\u0435 \u043e\u0447\u0435\u043d\u044c \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0434\u0435\u0438 \u043a\u0430\u043d\u0443\u043b\u0430 \u0432 \u043b\u0435\u0442\u0443.<\/p>\n<p>  \u041d\u043e \u0441\u0443\u0445\u043e\u0439 \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u2014 \u0431\u044b\u043b\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u0432 OpenSSL, \u0432 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u043d\u0430 BN_ULONG \u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0440\u043d\u044f \u043f\u043e\u0431\u0438\u0442\u043d\u043e. \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435 \u0443\u0448\u043b\u043e \u043d\u0430 \u0431\u0430\u0433\u0442\u0440\u0435\u043a\u0438\u043d\u0433 \u0438 \u0431\u044b\u043b\u043e \u043f\u043e\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e (\u043f\u043e\u043b\u044c\u0437\u0443\u044f\u0441\u044c \u0441\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0437\u0432\u0438\u043d\u044f\u044e\u0441\u044c \u0437\u0430 \u0441\u0432\u043e\u044e \u0438\u0437\u043b\u0438\u0448\u043d\u044e\u044e \u044d\u043c\u043e\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0433\u0434\u0430, \u043d\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c \u0432 OpenSSL \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0448\u044c), \u0430 \u0432\u043e\u0442 \u0442\u0443 \u0441\u0430\u043c\u0443\u044e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0440\u043d\u044f \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u043e \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e 2^n, \u0433\u0434\u0435 n \u044d\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0438\u0442\\\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044e.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-299341","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/299341","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=299341"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/299341\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=299341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=299341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=299341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}