<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Форум Рутокен &mdash; Расшифровка открытым ключом и какая логика дожна быть]]></title>
		<link>https://forum.rutoken.ru/topic/3938/</link>
		<atom:link href="https://forum.rutoken.ru/feed/rss/topic/3938" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «Расшифровка открытым ключом и какая логика дожна быть».]]></description>
		<lastBuildDate>Wed, 07 Jun 2023 10:31:45 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Расшифровка открытым ключом и какая логика дожна быть]]></title>
			<link>https://forum.rutoken.ru/post/20786/#p20786</link>
			<description><![CDATA[<p><strong>smartiska</strong>, добрый день.<br />Наши разработчики подготовили пример с проверкой CMS подписи <a href="https://github.com/AktivCo/rutoken-demoshift-ios/tree/cms-verify">https://github.com/AktivCo/rutoken-demo … cms-verify</a><br />На вход необходимо подать подписанные файлы, которые можно сделать в Демосмене, и сертификат пользователя.</p>]]></description>
			<author><![CDATA[null@example.com (Аверченко Кирилл)]]></author>
			<pubDate>Wed, 07 Jun 2023 10:31:45 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/20786/#p20786</guid>
		</item>
		<item>
			<title><![CDATA[Re: Расшифровка открытым ключом и какая логика дожна быть]]></title>
			<link>https://forum.rutoken.ru/post/20771/#p20771</link>
			<description><![CDATA[<div class="quotebox"><cite>Аверченко Кирилл пишет:</cite><blockquote><p>Да, для проверки подписи необходим только открытый ключ. Рутокен не обязателен.</p></blockquote></div><p>Вопрос все еще открыт:(</p>]]></description>
			<author><![CDATA[null@example.com (smartiska)]]></author>
			<pubDate>Wed, 07 Jun 2023 05:10:37 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/20771/#p20771</guid>
		</item>
		<item>
			<title><![CDATA[Re: Расшифровка открытым ключом и какая логика дожна быть]]></title>
			<link>https://forum.rutoken.ru/post/20757/#p20757</link>
			<description><![CDATA[<p><strong>Аверченко Кирилл</strong>, Добрый день, можете пожалуйста привести пример кода верификации подписи, с использованием только открытого ключа без рутокена. Никак не могу понять, как сделать это</p>]]></description>
			<author><![CDATA[null@example.com (smartiska)]]></author>
			<pubDate>Tue, 06 Jun 2023 09:15:18 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/20757/#p20757</guid>
		</item>
		<item>
			<title><![CDATA[Re: Расшифровка открытым ключом и какая логика дожна быть]]></title>
			<link>https://forum.rutoken.ru/post/20708/#p20708</link>
			<description><![CDATA[<p><strong>smartiska</strong>, добрый день.<br />1. Да, для проверки подписи необходим только открытый ключ. Рутокен не обязателен.<br />2. Это поле - электронная подпись сертификата ключем удостоверяющего центра. Если вы перед проверкой электронной подписи документа проверяете на валидность сертификат, то это поле используется.<br />Проверить эту подпись можно с помощью открытого ключа центра сертификации, который выдал ваш сертификат.</p>]]></description>
			<author><![CDATA[null@example.com (Аверченко Кирилл)]]></author>
			<pubDate>Wed, 31 May 2023 08:58:08 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/20708/#p20708</guid>
		</item>
		<item>
			<title><![CDATA[Re: Расшифровка открытым ключом и какая логика дожна быть]]></title>
			<link>https://forum.rutoken.ru/post/20702/#p20702</link>
			<description><![CDATA[<p><strong>Аверченко Кирилл</strong>, Здравствуйте, еще появились вопросы.<br />1. Можно ли узнать верна подпись или нет, без физического рутокена? (скорее всего с использованием публичного ключа)<br />2. Когда вызываю метод parseCertificate, в теле ответа есть поле Signature Value, мы как то или где то используем его?</p>]]></description>
			<author><![CDATA[null@example.com (smartiska)]]></author>
			<pubDate>Tue, 30 May 2023 13:33:20 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/20702/#p20702</guid>
		</item>
		<item>
			<title><![CDATA[Re: Расшифровка открытым ключом и какая логика дожна быть]]></title>
			<link>https://forum.rutoken.ru/post/20684/#p20684</link>
			<description><![CDATA[<p>Да, на выходе функции sign у вас как раз будет CMS конверт в кодировке base64.<br />Именно это вы передаете в функцию verify в поле signData.</p>]]></description>
			<author><![CDATA[null@example.com (Аверченко Кирилл)]]></author>
			<pubDate>Mon, 29 May 2023 09:08:22 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/20684/#p20684</guid>
		</item>
		<item>
			<title><![CDATA[Re: Расшифровка открытым ключом и какая логика дожна быть]]></title>
			<link>https://forum.rutoken.ru/post/20683/#p20683</link>
			<description><![CDATA[<p><strong>Аверченко Кирилл</strong>, И где я передаю cms в моем вызове метода verify, укажите плиз:)</p>]]></description>
			<author><![CDATA[null@example.com (smartiska)]]></author>
			<pubDate>Mon, 29 May 2023 08:17:53 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/20683/#p20683</guid>
		</item>
		<item>
			<title><![CDATA[Re: Расшифровка открытым ключом и какая логика дожна быть]]></title>
			<link>https://forum.rutoken.ru/post/20682/#p20682</link>
			<description><![CDATA[<p><strong>Аверченко Кирилл</strong>, Таак, понял, спасибо большое. У меня еще один общий вопрос остался. Я новичок в теме подписей, и не до конца могу понять. Получается строка которую нам возвращает sign - это и есть cms? Или при вызове каких методов, мы получаем в ответ cms?</p>]]></description>
			<author><![CDATA[null@example.com (smartiska)]]></author>
			<pubDate>Mon, 29 May 2023 08:14:04 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/20682/#p20682</guid>
		</item>
		<item>
			<title><![CDATA[Re: Расшифровка открытым ключом и какая логика дожна быть]]></title>
			<link>https://forum.rutoken.ru/post/20677/#p20677</link>
			<description><![CDATA[<p><strong>smartiska</strong>, добрый день.<br />При вызове sign с параметром addUserCertificate: true, сертификат (в котором содержится открытый ключ) кладется в CMS-конверт с подписью.</p><p>Соответственно, при вызове verify сертификат берется из CMS-конверта.</p>]]></description>
			<author><![CDATA[null@example.com (Аверченко Кирилл)]]></author>
			<pubDate>Mon, 29 May 2023 07:01:22 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/20677/#p20677</guid>
		</item>
		<item>
			<title><![CDATA[Re: Расшифровка открытым ключом и какая логика дожна быть]]></title>
			<link>https://forum.rutoken.ru/post/20676/#p20676</link>
			<description><![CDATA[<p><strong>Аверченко Кирилл</strong>, Метод sign выглядит следующим образом: </p><p>const tokenSign = () =&gt; {<br />&nbsp; &nbsp; return token().then(({ rutoken, devices }) =&gt; {<br />&nbsp; &nbsp; &nbsp; &nbsp; const device = devices[1];<br />&nbsp; &nbsp; &nbsp; &nbsp; console.log(rutoken);<br />&nbsp; &nbsp; &nbsp; &nbsp; return rutoken<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .login(device, &quot;123456&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .then(() =&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rutoken.sign(device, certId, data, rutoken.DATA_FORMAT_BASE64, <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; detached: false,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addUserCertificate: true,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addEssCert: false,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addSignTime: false,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; })<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; );<br />&nbsp; &nbsp; });<br />};</p><br /><p>Метод verify: </p><p>const tokenVerify = (signData) =&gt; {<br />&nbsp; &nbsp; return token().then(({ rutoken, devices }) =&gt; {<br />&nbsp; &nbsp; &nbsp; &nbsp; console.log(devices)<br />&nbsp; &nbsp; &nbsp; &nbsp; const device = devices[0];<br />&nbsp; &nbsp; &nbsp; &nbsp; console.log(rutoken);<br />&nbsp; &nbsp; &nbsp; &nbsp; return rutoken.login(device, &quot;123456&quot;).then(() =&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rutoken.verify(device, signData, {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; base64: true,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; verifyCertificate: false,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; })<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .then((res) =&gt; console.log(res))<br />&nbsp; &nbsp; &nbsp; &nbsp; );<br />&nbsp; &nbsp; });<br />};</p><p>Подпись идет одним рутокеном, проверка другим. Проверка возвращает true. Но не могу понять, куда передать открытый ключ подписываещго рутокена, в методе verify. Если есть примеры скиньте плиз, для наглядности)</p>]]></description>
			<author><![CDATA[null@example.com (smartiska)]]></author>
			<pubDate>Mon, 29 May 2023 06:36:47 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/20676/#p20676</guid>
		</item>
		<item>
			<title><![CDATA[Re: Расшифровка открытым ключом и какая логика дожна быть]]></title>
			<link>https://forum.rutoken.ru/post/20669/#p20669</link>
			<description><![CDATA[<p><strong>smartiska</strong>, добрый день.<br />Да, вы передаете вместе с подписанным сообщением свой открытый ключ.<br />На другой стороне проверяют подпись методом Verify с использованием вашего открытого ключа.</p>]]></description>
			<author><![CDATA[null@example.com (Аверченко Кирилл)]]></author>
			<pubDate>Fri, 26 May 2023 08:56:06 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/20669/#p20669</guid>
		</item>
		<item>
			<title><![CDATA[Расшифровка открытым ключом и какая логика дожна быть]]></title>
			<link>https://forum.rutoken.ru/post/20664/#p20664</link>
			<description><![CDATA[<p>Имею рутокен ЭЦП 2.0, пишу веб приложение. Реализовал метод sign. Он возвращает base64 строку. Так же получил открытый ключ методом getPublicKeyValue. Так вот вопрос: как должна происходить логика дешифровки на другом компе? Типа передать ему открытый ключ который я получил и он каким то методом делает дешифровку или ему на его рутокен тоже надо установить такой же сертификат как мой?</p>]]></description>
			<author><![CDATA[null@example.com (smartiska)]]></author>
			<pubDate>Fri, 26 May 2023 05:34:05 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/20664/#p20664</guid>
		</item>
	</channel>
</rss>
