<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Форум Рутокен &mdash; утилита rutoken-tool и шифрование]]></title>
	<link rel="self" href="https://forum.rutoken.ru/feed/atom/topic/1222/" />
	<updated>2009-09-24T06:16:37Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.rutoken.ru/topic/1222/</id>
		<entry>
			<title type="html"><![CDATA[Re: утилита rutoken-tool и шифрование]]></title>
			<link rel="alternate" href="https://forum.rutoken.ru/post/2162/#p2162" />
			<content type="html"><![CDATA[<p>Спасибо, действительно, 8 байт. Исправлю выше.</p>]]></content>
			<author>
				<name><![CDATA[Кирилл Мещеряков]]></name>
				<uri>https://forum.rutoken.ru/user/6786/</uri>
			</author>
			<updated>2009-09-24T06:16:37Z</updated>
			<id>https://forum.rutoken.ru/post/2162/#p2162</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: утилита rutoken-tool и шифрование]]></title>
			<link rel="alternate" href="https://forum.rutoken.ru/post/2160/#p2160" />
			<content type="html"><![CDATA[<p>Cпасибо за помощь всё получилось. <br />Действительно наверное после форматирования забыл заново сгенерировать ключ, повторная генерация решила проблему. И кстати длина файла должна быть кратна 8 байтам, как я понял это связяно с размером блока в 64 бита для алгоритма <br />ГОСТ.</p>]]></content>
			<author>
				<name><![CDATA[ze6ra]]></name>
				<uri>https://forum.rutoken.ru/user/7064/</uri>
			</author>
			<updated>2009-09-23T16:52:12Z</updated>
			<id>https://forum.rutoken.ru/post/2160/#p2160</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: утилита rutoken-tool и шифрование]]></title>
			<link rel="alternate" href="https://forum.rutoken.ru/post/2156/#p2156" />
			<content type="html"><![CDATA[<p>Здравствуйте!</p><p>У вас не хватает файла, в котором хранится ключ шифрования.<br />Возможно, вы удалили его при форматировании. Попробуйте сгенерировать его.<br /></p><div class="codebox"><pre><code>#rutoken-tool -g -k 1 -p &quot;12345678&quot;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Кирилл Мещеряков]]></name>
				<uri>https://forum.rutoken.ru/user/6786/</uri>
			</author>
			<updated>2009-09-23T08:57:48Z</updated>
			<id>https://forum.rutoken.ru/post/2156/#p2156</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: утилита rutoken-tool и шифрование]]></title>
			<link rel="alternate" href="https://forum.rutoken.ru/post/2153/#p2153" />
			<content type="html"><![CDATA[<p>Будем надеяться на будущее, а в настоящем имеем следующее:<br />создал файл размером 16 байт <br />ls -l ./test.txt<br /></p><div class="codebox"><pre><code>-rw-rw-r-- 1 eee eee 16 Сен 22 11:02 ./test.txt</code></pre></div><p>запускаю утилиту rutoken-tool</p><p>rutoken-tool -e -k1 -i ./test.txt -o ./test.txt.enc -p &quot;12345678&quot; -v</p><p>и снова неудча, правда ошибка уже другая.</p><p>Using card driver Rutoken driver.<br />[rutoken-tool] reader-openct.c:410:openct_reader_lock: called<br />[rutoken-tool] card-rutoken.c:633:rutoken_verify: called<br />[rutoken-tool] card-rutoken.c:241:rutoken_check_sw: sw1 = 90, sw2 = 0<br />[rutoken-tool] card-rutoken.c:241:rutoken_check_sw: sw1 = 90, sw2 = 0<br />[rutoken-tool] card-rutoken.c:668:rutoken_verify: returning with: 0<br />[rutoken-tool] card-rutoken.c:1383:rutoken_get_challenge: called<br />[rutoken-tool] card-rutoken.c:241:rutoken_check_sw: sw1 = 90, sw2 = 0<br />[rutoken-tool] card-rutoken.c:1402:rutoken_get_challenge: returning with: 0<br />[rutoken-tool] card-rutoken.c:761:rutoken_set_security_env: called<br />[rutoken-tool] card-rutoken.c:241:rutoken_check_sw: sw1 = 90, sw2 = 0<br />[rutoken-tool] card-rutoken.c:802:rutoken_set_security_env: returning with: 0<br />[rutoken-tool] card-rutoken.c:1462:rutoken_card_ctl: called<br />[rutoken-tool] card-rutoken.c:974:rutoken_cipher_p: : crgram_len 24; outlen 24<br />[rutoken-tool] card-rutoken.c:240:rutoken_check_sw: File (DO) not found<br />[rutoken-tool] card-rutoken.c:241:rutoken_check_sw: sw1 = 6a, sw2 = 82<br />[rutoken-tool] card-rutoken.c:1017:rutoken_cipher_p: len out cipher 0<br />[rutoken-tool] card-rutoken.c:1020:rutoken_cipher_p: returning with: File not found<br />[rutoken-tool] card-rutoken.c:1514:rutoken_card_ctl: returning with: File not found<br />[rutoken-tool] card.c:678:sc_card_ctl: returning with: File not found<br />Error: Cipher failed: File not found</p><p>Какого файла не хватает.<br />Как я понл ГОСТ 28147—89&nbsp; это единственный алгоритм который поддерживаетс в токене на аппаратном уровне. <br />На всякий случай информация о токене </p><p>rutoken-tool -s</p><p>Type: 0<br />Version: 2.0<br />Memory: 128 Kb<br />Protocol version: 2<br />Software version: 20<br />Order: 0<br />Serial number: 26F47055</p>]]></content>
			<author>
				<name><![CDATA[ze6ra]]></name>
				<uri>https://forum.rutoken.ru/user/7064/</uri>
			</author>
			<updated>2009-09-22T18:54:14Z</updated>
			<id>https://forum.rutoken.ru/post/2153/#p2153</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: утилита rutoken-tool и шифрование]]></title>
			<link rel="alternate" href="https://forum.rutoken.ru/post/2147/#p2147" />
			<content type="html"><![CDATA[<p>Здравствуйте!</p><p>Вы все делаете правильно. Ошибка возникает потому, что длина зашифровываемого сообщения, согласно стандарту ГОСТ 28147—89, должна быть кратна 8 байтам. Проверьте, пожалуйста, длину файла &quot;test.txt&quot;.<br /></p><div class="codebox"><pre><code>ls -l file.txt</code></pre></div><div class="codebox"><pre><code>-rw- r-- r-- l test users 16 sep 22 10:12 file.txt</code></pre></div><p>правильно (16)</p><div class="codebox"><pre><code>-rw- r-- r-- l test users 17 sep 22 10:12 file.txt</code></pre></div><p>неправильно (17)</p><p>В ближайшем будущем шифрование по алгоритму ГОСТ 28147—89 в токенах Рутокен будет поддерживаться не rutoken-tool, а стандартными утилитами opensc.</p><p>Спасибо.</p>]]></content>
			<author>
				<name><![CDATA[Кирилл Мещеряков]]></name>
				<uri>https://forum.rutoken.ru/user/6786/</uri>
			</author>
			<updated>2009-09-22T06:42:29Z</updated>
			<id>https://forum.rutoken.ru/post/2147/#p2147</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[утилита rutoken-tool и шифрование]]></title>
			<link rel="alternate" href="https://forum.rutoken.ru/post/2145/#p2145" />
			<content type="html"><![CDATA[<p>При установке пакета opensc установилась утилита rutoken-tool решил с её помощью попробовать чтото зашифровать, использовал следующим образом:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;rutoken-tool -e -k1 -i ./test.txt -o ./test.txt.enc -p &quot;12345678&quot; -v<br />и получил ошибку:<br />Using card driver Rutoken driver.&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />[rutoken-tool] reader-openct.c:410:openct_reader_lock: called&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />[rutoken-tool] card-rutoken.c:633:rutoken_verify: called&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />[rutoken-tool] card-rutoken.c:241:rutoken_check_sw: sw1 = 90, sw2 = 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />[rutoken-tool] card-rutoken.c:241:rutoken_check_sw: sw1 = 90, sw2 = 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />[rutoken-tool] card-rutoken.c:668:rutoken_verify: returning with: 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />[rutoken-tool] card-rutoken.c:1383:rutoken_get_challenge: called&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />[rutoken-tool] card-rutoken.c:241:rutoken_check_sw: sw1 = 90, sw2 = 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />[rutoken-tool] card-rutoken.c:1402:rutoken_get_challenge: returning with: 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />[rutoken-tool] card-rutoken.c:761:rutoken_set_security_env: called&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />[rutoken-tool] card-rutoken.c:241:rutoken_check_sw: sw1 = 90, sw2 = 0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />[rutoken-tool] card-rutoken.c:802:rutoken_set_security_env: returning with: 0<br />[rutoken-tool] card-rutoken.c:1462:rutoken_card_ctl: called<br />[rutoken-tool] card-rutoken.c:974:rutoken_cipher_p: : crgram_len 1637174; outlen 1637174<br />[rutoken-tool] card-rutoken.c:979:rutoken_cipher_p: returning with: Wrong length<br />[rutoken-tool] card-rutoken.c:1514:rutoken_card_ctl: returning with: Wrong length<br />[rutoken-tool] card.c:678:sc_card_ctl: returning with: Wrong length<br />Error: Cipher failed: Wrong length</p><p>Ключи предварительно были сгенерированы. <br />Собственно вопрос это проблема утилиты, токена или я не правильно её применяю.</p>]]></content>
			<author>
				<name><![CDATA[ze6ra]]></name>
				<uri>https://forum.rutoken.ru/user/7064/</uri>
			</author>
			<updated>2009-09-21T17:16:07Z</updated>
			<id>https://forum.rutoken.ru/post/2145/#p2145</id>
		</entry>
</feed>
