<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Форум Рутокен &mdash; RuToken 32K150Z, *nix, Key length/algorithm not supported by card]]></title>
		<link>https://forum.rutoken.ru/topic/1488/</link>
		<atom:link href="https://forum.rutoken.ru/feed/rss/topic/1488/" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «RuToken 32K150Z, *nix, Key length/algorithm not supported by card».]]></description>
		<lastBuildDate>Wed, 19 Mar 2025 13:05:03 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: RuToken 32K150Z, *nix, Key length/algorithm not supported by card]]></title>
			<link>https://forum.rutoken.ru/post/27510/#p27510</link>
			<description><![CDATA[<p>Переделал последовательность...</p><p>для файла openssl.cnf :</p><p>openssl_conf = openssl_def<br />[ openssl_def ]<br />engines = engine_section<br />[ engine_section ]<br />rtengine = gost_section<br />[ gost_section ]<br />dynamic_path = C:/Program Files/OpenSSL-Win64/bin/rtengine.dll<br />enable_rand = yes<br />pkcs11_path = C:/Program Files/OpenSSL-Win64/bin/rtpkcs11ecp.dll<br />rand_token = pkcs11:manufacturer=Aktiv%20Co.;model=Rutoken%20ECP<br />default_algorithms = CIPHERS, DIGEST, PKEY, RAND</p><p>И все заработало!)</p><p>Всем огромное спасибо !!!</p>]]></description>
			<author><![CDATA[null@example.com (eton.uno)]]></author>
			<pubDate>Wed, 19 Mar 2025 13:05:03 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/27510/#p27510</guid>
		</item>
		<item>
			<title><![CDATA[Re: RuToken 32K150Z, *nix, Key length/algorithm not supported by card]]></title>
			<link>https://forum.rutoken.ru/post/27504/#p27504</link>
			<description><![CDATA[<p>библиотеки rtengine.dll и rtpkcs11ecp.dll нужной разрядности?<br />Если не указывать pin в uri подпись работает?<br />Попробуйте закомментировать строки rand_token и enable_rand.</p>]]></description>
			<author><![CDATA[null@example.com (Аверченко Кирилл)]]></author>
			<pubDate>Wed, 19 Mar 2025 10:16:18 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/27504/#p27504</guid>
		</item>
		<item>
			<title><![CDATA[Re: RuToken 32K150Z, *nix, Key length/algorithm not supported by card]]></title>
			<link>https://forum.rutoken.ru/post/27502/#p27502</link>
			<description><![CDATA[<div class="quotebox"><cite>Аверченко Кирилл пишет:</cite><blockquote><p>- это серийный номер вашего токена?</p></blockquote></div><p>Да, преобразован в формат ASCII. То же самое выдает pkcs11-tool.exe</p><div class="quotebox"><cite>Аверченко Кирилл пишет:</cite><blockquote><p>- пин-код в случае pkcs11-uri задается непосредственно в самом URI, пример есть у нас в документации <a href="https://dev.rutoken.ru/pages/viewpage.a">https://dev.rutoken.ru/pages/viewpage.a</a> … =180715764<br />Попробуйте подставить pkcs11uri вида &quot;pkcs11:model=Rutoken%20ECP?pin-value=12345678&quot; если это единственный токен, подключенный к компьютеру.</p></blockquote></div><p>Пробовал:<br />openssl cms -sign -binary -nosmimecap -in C:\User\json.json -out C:\User\sign.sig -outform PEM -keyform engine -inkey &quot;pkcs11:model=Rutoken%20ECP?pin-value=12345678&quot; -engine rtengine -signer C:\User\certificate.pem<br />ошибка та же самая.</p>]]></description>
			<author><![CDATA[null@example.com (eton.uno)]]></author>
			<pubDate>Wed, 19 Mar 2025 08:03:20 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/27502/#p27502</guid>
		</item>
		<item>
			<title><![CDATA[Re: RuToken 32K150Z, *nix, Key length/algorithm not supported by card]]></title>
			<link>https://forum.rutoken.ru/post/27494/#p27494</link>
			<description><![CDATA[<p><strong>eton.uno</strong>, добрый день.<br /></p><div class="quotebox"><cite>eton.uno пишет:</cite><blockquote><p>&quot;pkcs11:serial=45324ddd&quot;</p></blockquote></div><p> - это серийный номер вашего токена?<br /></p><div class="quotebox"><cite>eton.uno пишет:</cite><blockquote><p>-passin pass:12345678</p></blockquote></div><p> - пин-код в случае pkcs11-uri задается непосредственно в самом URI, пример есть у нас в документации <a href="https://dev.rutoken.ru/pages/viewpage.action?pageId=180715764">https://dev.rutoken.ru/pages/viewpage.a … =180715764</a><br />Попробуйте подставить pkcs11uri вида &quot;pkcs11:model=Rutoken%20ECP?pin-value=12345678&quot; если это единственный токен, подключенный к компьютеру.</p>]]></description>
			<author><![CDATA[null@example.com (Аверченко Кирилл)]]></author>
			<pubDate>Tue, 18 Mar 2025 14:48:33 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/27494/#p27494</guid>
		</item>
		<item>
			<title><![CDATA[Re: RuToken 32K150Z, *nix, Key length/algorithm not supported by card]]></title>
			<link>https://forum.rutoken.ru/post/27491/#p27491</link>
			<description><![CDATA[<p>Добрый день!<br />Ваша тех.поддержка так и не отвечает, решил выложить проблему сюда:<br />Имеется токен ЭЦП 3.0 с сертификатом от ФНС:<br /><span class="postimg"><a class="fancybox fancybox.image" rel="group" href="https://forum.rutoken.ru/uploads/images/2025/03/c7308cf3f53ecf69245584752987ed7d.jpg"><img class="fb_img" src="https://forum.rutoken.ru/uploads/previews/2025/03/c7308cf3f53ecf69245584752987ed7d.jpg" alt="" /></a></span><br />При подписании документа командой:<br />openssl cms -sign -binary -nosmimecap -in C:\User\json.json -out C:\User\sign.sig -outform PEM -keyform engine -inkey &quot;pkcs11:serial=45324ddd&quot; -engine rtengine -signer C:\User\certificate.pem -passin pass:12345678<br />получаю ошибку:<br /><span class="postimg"><a class="fancybox fancybox.image" rel="group" href="https://forum.rutoken.ru/uploads/images/2025/03/04b154a9aceee2c93e9f4e0de85c4cdf.png"><img class="fb_img" src="https://forum.rutoken.ru/uploads/previews/2025/03/04b154a9aceee2c93e9f4e0de85c4cdf.png" alt="" /></a></span> <br />настройки openssl.cnf такие:</p><p>[ openssl_def ]<br />engines = engine_section<br />[ engine_section ]<br />rtengine =&nbsp; rtengine_section<br />[ gost_section ]<br />gost = gost_section<br />dynamic_path = C:/Program Files/OpenSSL-Win64/bin/rtengine.dll<br />pkcs11_path = C:/Program Files/OpenSSL-Win64/bin/rtpkcs11ecp.dll<br />rand_token = pkcs11:model=Rutoken%20ECP;manufacturer=Aktiv%20Co. <br />default_algorithms = ALL<br />enable_rand = yes</p><p>Подскажите, как разрешить данную проблему ?</p>]]></description>
			<author><![CDATA[null@example.com (eton.uno)]]></author>
			<pubDate>Tue, 18 Mar 2025 09:28:55 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/27491/#p27491</guid>
		</item>
		<item>
			<title><![CDATA[Re: RuToken 32K150Z, *nix, Key length/algorithm not supported by card]]></title>
			<link>https://forum.rutoken.ru/post/4346/#p4346</link>
			<description><![CDATA[<p>чисто теоретически, iqmp мог получиться &lt; 64</p><p>Однако, навряд ли OpenSSL смог бы сделать такое.</p><p>Мы посмотрим что там произошло, Ваш ключик нам бы очень в этом помог.</p>]]></description>
			<author><![CDATA[null@example.com (Кирилл Мещеряков)]]></author>
			<pubDate>Tue, 10 Jan 2012 13:47:05 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/4346/#p4346</guid>
		</item>
		<item>
			<title><![CDATA[Re: RuToken 32K150Z, *nix, Key length/algorithm not supported by card]]></title>
			<link>https://forum.rutoken.ru/post/4345/#p4345</link>
			<description><![CDATA[<div class="quotebox"><cite>Кирилл Мещеряков пишет:</cite><blockquote><p>Если ключ не критичен, не могли бы вы его показать?<br />Чем он был сгенерирован? OpenSSL?</p><p>Есть подозрение что возникла какая то проблема при парсинге pem формата закрытого ключа где-то на верхних уровнях OpenSC.</p></blockquote></div><p>Ключ пока критичен, но все-же попробую его ревокнуть и отдать вам на растерзание.</p>]]></description>
			<author><![CDATA[null@example.com (nkrasnoyarsky)]]></author>
			<pubDate>Tue, 10 Jan 2012 13:34:17 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/4345/#p4345</guid>
		</item>
		<item>
			<title><![CDATA[Re: RuToken 32K150Z, *nix, Key length/algorithm not supported by card]]></title>
			<link>https://forum.rutoken.ru/post/4343/#p4343</link>
			<description><![CDATA[<p>Действительно, неправильно то, что rsa-&gt;iqmp.len получился 63<br />Этого вроде бы быть не должно.</p><p>Если ключ не критичен, не могли бы вы его показать?<br />Чем он был сгенерирован? OpenSSL?</p><p>Есть подозрение что возникла какая то проблема при парсинге pem формата закрытого ключа где-то на верхних уровнях OpenSC.</p>]]></description>
			<author><![CDATA[null@example.com (Кирилл Мещеряков)]]></author>
			<pubDate>Tue, 10 Jan 2012 13:00:57 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/4343/#p4343</guid>
		</item>
		<item>
			<title><![CDATA[Re: RuToken 32K150Z, *nix, Key length/algorithm not supported by card]]></title>
			<link>https://forum.rutoken.ru/post/4342/#p4342</link>
			<description><![CDATA[<p>Короче, я закомментировал строку &#039;|| rsa-&gt;iqmp.len != bitlen/16&#039; , пересобрал opensc.<br />В результате, у меня все залезло в токен.</p><p><strong>Но это же неправильно?</strong></p>]]></description>
			<author><![CDATA[null@example.com (nkrasnoyarsky)]]></author>
			<pubDate>Tue, 10 Jan 2012 10:31:40 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/4342/#p4342</guid>
		</item>
		<item>
			<title><![CDATA[Re: RuToken 32K150Z, *nix, Key length/algorithm not supported by card]]></title>
			<link>https://forum.rutoken.ru/post/4341/#p4341</link>
			<description><![CDATA[<p>добавил в функцию немного отладки, получил такие цифры:</p><p>bitlen 1024 rsa-&gt;modulus.len 128, rsa-&gt;p.len 64, rsa-&gt;q.len 64, rsa-&gt;dmp1.len 64, rsa-&gt;dmq1.len 64, rsa-&gt;iqmp.len 63, rsa-&gt;d.len 128, rsa-&gt;exponent.len 3</p><p>Смущает, что <strong>rsa-&gt;iqmp.len 63</strong>, разумеется оно не проходит в проверку rsa-&gt;iqmp.len != bitlen/16</p>]]></description>
			<author><![CDATA[null@example.com (nkrasnoyarsky)]]></author>
			<pubDate>Tue, 10 Jan 2012 10:25:19 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/4341/#p4341</guid>
		</item>
		<item>
			<title><![CDATA[Re: RuToken 32K150Z, *nix, Key length/algorithm not supported by card]]></title>
			<link>https://forum.rutoken.ru/post/4340/#p4340</link>
			<description><![CDATA[<p>судя по логу, &quot;sc_rutoken_get_bin_from_prkey returned -1&quot;<br />покопался в исходниках, нашел такое:</p><div class="codebox"><pre><code>static int rutoken_get_bin_from_prkey(const struct sc_pkcs15_prkey_rsa *rsa,
                        u8 *bufkey, size_t *bufkey_size)
{
        const uint32_t bitlen = rsa-&gt;modulus.len * 8;
        size_t i, len;

        if (    rsa-&gt;modulus.len  != bitlen/8
             || rsa-&gt;p.len        != bitlen/16
             || rsa-&gt;q.len        != bitlen/16
             || rsa-&gt;dmp1.len     != bitlen/16
             || rsa-&gt;dmq1.len     != bitlen/16
             || rsa-&gt;iqmp.len     != bitlen/16
             || rsa-&gt;d.len        != bitlen/8
             || rsa-&gt;exponent.len &gt; sizeof(uint32_t)
        )
                return -1;

        if (*bufkey_size &lt; 14 + sizeof(uint32_t) * 2 + bitlen/8 * 2 + bitlen/16 * 5)
                return -1;</code></pre></div><p>Видимо, что-то не так с форматом ключа?</p>]]></description>
			<author><![CDATA[null@example.com (nkrasnoyarsky)]]></author>
			<pubDate>Tue, 10 Jan 2012 09:54:14 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/4340/#p4340</guid>
		</item>
		<item>
			<title><![CDATA[Re: RuToken 32K150Z, *nix, Key length/algorithm not supported by card]]></title>
			<link>https://forum.rutoken.ru/post/4339/#p4339</link>
			<description><![CDATA[<p>Для команды<br />$ /usr/bin/pkcs15-init --store-private-key carina/nkrasnoyarsky.key --auth-id 02 --id 45 --label &#039;nkrasnoyarsky&#039; &gt; token.debug</p><p>вывод<br /><a href="http://pastebin.com/sx7cmhi7">http://pastebin.com/sx7cmhi7</a></p><p>Для остальных надо?</p>]]></description>
			<author><![CDATA[null@example.com (nkrasnoyarsky)]]></author>
			<pubDate>Tue, 10 Jan 2012 09:12:08 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/4339/#p4339</guid>
		</item>
		<item>
			<title><![CDATA[Re: RuToken 32K150Z, *nix, Key length/algorithm not supported by card]]></title>
			<link>https://forum.rutoken.ru/post/4338/#p4338</link>
			<description><![CDATA[<p>Спасибо за информацию.</p><p>Можно ли посмотреть на вывод этих команд при включенной отладке OpenSC?</p><p>(в файле /etc/opensc.conf параметр debug = 6)</p>]]></description>
			<author><![CDATA[null@example.com (Кирилл Мещеряков)]]></author>
			<pubDate>Tue, 10 Jan 2012 08:53:19 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/4338/#p4338</guid>
		</item>
		<item>
			<title><![CDATA[Re: RuToken 32K150Z, *nix, Key length/algorithm not supported by card]]></title>
			<link>https://forum.rutoken.ru/post/4337/#p4337</link>
			<description><![CDATA[<div class="codebox"><pre><code>nikl@ak49:~$ /usr/bin/pkcs15-init -E
Using reader with a card: Aktiv Rutoken S 00 00</code></pre></div><div class="codebox"><pre><code>nikl@ak49:~$ /usr/bin/pkcs15-init -C --so-pin &quot;87654321&quot; --so-puk &quot;&quot;
Using reader with a card: Aktiv Rutoken S 00 00
Unspecified PIN [reference 2] required.
Please enter Unspecified PIN [reference 2]: </code></pre></div><div class="codebox"><pre><code>nikl@ak49:~$ /usr/bin/pkcs15-init --store-pin --label &quot;User PIN&quot; --auth-id 02 --pin &quot;12345678&quot; --puk &quot;&quot;
Using reader with a card: Aktiv Rutoken S 00 00</code></pre></div><div class="codebox"><pre><code>nikl@ak49:~$ /usr/bin/pkcs15-init --store-private-key carina/nkrasnoyarsky.key --auth-id 02 --id 45 --label &#039;nkrasnoyarsky&#039;
Using reader with a card: Aktiv Rutoken S 00 00
Failed to store private key: Unknown error</code></pre></div><div class="codebox"><pre><code>nikl@ak49:~$ /usr/bin/pkcs15-init --store-certificate carina/nkrasnoyarsky.crt --auth-id 02 --id 45 --label &#039;nkrasnoyarsky&#039;
Using reader with a card: Aktiv Rutoken S 00 00
User PIN required.
Please enter User PIN:</code></pre></div><div class="codebox"><pre><code>nikl@ak49:~$ /usr/bin/pkcs15-tool --list-certificatesUsing reader with a card: Aktiv Rutoken S 00 00
X.509 Certificate [nkrasnoyarsky]
    Flags    : 2
    Authority: no
    Path     : 3f0050150345
    ID       : 45</code></pre></div><div class="codebox"><pre><code>nikl@ak49:~$ /usr/bin/pkcs15-tool --list-keys
Using reader with a card: Aktiv Rutoken S 00 00</code></pre></div><p>т.е. в результате сертификат засасывается в токен, приватный ключ - нет</p>]]></description>
			<author><![CDATA[null@example.com (nkrasnoyarsky)]]></author>
			<pubDate>Tue, 10 Jan 2012 08:49:58 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/4337/#p4337</guid>
		</item>
		<item>
			<title><![CDATA[Re: RuToken 32K150Z, *nix, Key length/algorithm not supported by card]]></title>
			<link>https://forum.rutoken.ru/post/4336/#p4336</link>
			<description><![CDATA[<p>Здравствуйте.</p><p>Рутокены S третьей версии должны работать в предыдущих версиях.</p><p>В чем конкретно проявляются проблемы?</p>]]></description>
			<author><![CDATA[null@example.com (Кирилл Мещеряков)]]></author>
			<pubDate>Tue, 10 Jan 2012 08:27:56 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/4336/#p4336</guid>
		</item>
	</channel>
</rss>
