Статус: Активный участник
Группы: Участники
Зарегистрирован: 14.06.2022(UTC) Сообщений: 59 Сказал(а) «Спасибо»: 12 раз Поблагодарили: 2 раз в 2 постах
|
Встала задача по переносу криптографии с Windows на Linux, единственное нормальное решение на текущий момент - использовать p/invoke. В Windows нужно использовать advapi32.dll и crypt32.dll, в Linux практически аналогично, т.к. есть Capilite. Нашел уже готовую реализацию на GitHub, написал автору, может быть все же опубликует в NuGet или если автор не откликнется, то можно будет форкнуть и добавить недостающие функции (на первый взгляд не хватает функций по шифрованию из часто используемых). Почему разработчикам КриптоПро не написать аналогичную обертку под .NET, чем ковырять CoreFX с непонятным будущим?
|
|
|
|
Статус: Активный участник
Группы: Участники
Зарегистрирован: 14.06.2022(UTC) Сообщений: 59 Сказал(а) «Спасибо»: 12 раз Поблагодарили: 2 раз в 2 постах
|
|
|
|
|
Статус: Сотрудник
Группы: Участники
Зарегистрирован: 20.02.2017(UTC) Сообщений: 216
Сказал(а) «Спасибо»: 4 раз Поблагодарили: 62 раз в 58 постах
|
Автор: AndreyES Добрый день. Да, в рамках форка WCF не поддерживаем. В оригинальном dotnet core остались части только клиентского WCF, но их для поддержки ГОСТа не правили и планов по их поддержке нет. |
|
1 пользователь поблагодарил Артём Макаров за этот пост.
|
|
|
Статус: Новичок
Группы: Участники
Зарегистрирован: 11.10.2022(UTC) Сообщений: 7
|
Hi everyone. I am interested in this scenario: Цитата:use CryptoPro CSP via p/invoke - use unmanaged code, MS CryptoAPI 2.0. I would like to understand which dll should be invoked here. Do you have a COM library that could be imported to .NET application ? My use-case scenario is that we have to integrate with an API that use CryptoPro CSP to sign and verify the data. So the flow of the application is that user gives us his private certificate, we then have to "sign" the data with this certificate and then pass to the external API. Basically we have to perform the same signature that is done on the sample page https://www.cryptopro.ru...ge/cades_bes_sample.htmlI would be really grateful if someone can point me to the right direction here. Regards, Michal
|
|
|
|
Статус: Активный участник
Группы: Участники
Зарегистрирован: 14.06.2022(UTC) Сообщений: 59 Сказал(а) «Спасибо»: 12 раз Поблагодарили: 2 раз в 2 постах
|
Автор: Michal Hi everyone. I am interested in this scenario: Цитата:use CryptoPro CSP via p/invoke - use unmanaged code, MS CryptoAPI 2.0. I would like to understand which dll should be invoked here. Do you have a COM library that could be imported to .NET application ? My use-case scenario is that we have to integrate with an API that use CryptoPro CSP to sign and verify the data. So the flow of the application is that user gives us his private certificate, we then have to "sign" the data with this certificate and then pass to the external API. Basically we have to perform the same signature that is done on the sample page https://www.cryptopro.ru...ge/cades_bes_sample.htmlI would be really grateful if someone can point me to the right direction here. Regards, Michal Hi, if you need to sign data on the server side, what version of .NET is used?
|
|
|
|
Статус: Новичок
Группы: Участники
Зарегистрирован: 11.10.2022(UTC) Сообщений: 7
|
Автор: AndreyES Автор: Michal Hi everyone. I am interested in this scenario: Цитата:use CryptoPro CSP via p/invoke - use unmanaged code, MS CryptoAPI 2.0. I would like to understand which dll should be invoked here. Do you have a COM library that could be imported to .NET application ? My use-case scenario is that we have to integrate with an API that use CryptoPro CSP to sign and verify the data. So the flow of the application is that user gives us his private certificate, we then have to "sign" the data with this certificate and then pass to the external API. Basically we have to perform the same signature that is done on the sample page https://www.cryptopro.ru...ge/cades_bes_sample.htmlI would be really grateful if someone can point me to the right direction here. Regards, Michal Hi, if you need to sign data on the server side, what version of .NET is used? I am using .NET 5.0
|
|
|
|
Статус: Активный участник
Группы: Участники
Зарегистрирован: 14.06.2022(UTC) Сообщений: 59 Сказал(а) «Спасибо»: 12 раз Поблагодарили: 2 раз в 2 постах
|
Автор: Michal Автор: AndreyES Автор: Michal Hi everyone. I am interested in this scenario: Цитата:use CryptoPro CSP via p/invoke - use unmanaged code, MS CryptoAPI 2.0. I would like to understand which dll should be invoked here. Do you have a COM library that could be imported to .NET application ? My use-case scenario is that we have to integrate with an API that use CryptoPro CSP to sign and verify the data. So the flow of the application is that user gives us his private certificate, we then have to "sign" the data with this certificate and then pass to the external API. Basically we have to perform the same signature that is done on the sample page https://www.cryptopro.ru...ge/cades_bes_sample.htmlI would be really grateful if someone can point me to the right direction here. Regards, Michal Hi, if you need to sign data on the server side, what version of .NET is used? I am using .NET 5.0 If your target OS is Windows you should create a managed wrapper around crypt32.dll using p/invoke, on Linux CryptoPro created Capilite library, which is similar to Windows cryptoAPI, so you need to create a wrapper around this library. For crypt32.dll function signature definition you can use https://www.pinvoke.net/ site. YOu can find Capilite signature definition in CryptoPro SDK.
|
|
|
|
Статус: Новичок
Группы: Участники
Зарегистрирован: 11.10.2022(UTC) Сообщений: 7
|
Автор: AndreyES Автор: Michal Автор: AndreyES Автор: Michal Hi everyone. I am interested in this scenario: Цитата:use CryptoPro CSP via p/invoke - use unmanaged code, MS CryptoAPI 2.0. I would like to understand which dll should be invoked here. Do you have a COM library that could be imported to .NET application ? My use-case scenario is that we have to integrate with an API that use CryptoPro CSP to sign and verify the data. So the flow of the application is that user gives us his private certificate, we then have to "sign" the data with this certificate and then pass to the external API. Basically we have to perform the same signature that is done on the sample page https://www.cryptopro.ru...ge/cades_bes_sample.htmlI would be really grateful if someone can point me to the right direction here. Regards, Michal Hi, if you need to sign data on the server side, what version of .NET is used? I am using .NET 5.0 If your target OS is Windows you should create a managed wrapper around crypt32.dll using p/invoke, on Linux CryptoPro created Capilite library, which is similar to Windows cryptoAPI, so you need to create a wrapper around this library. For crypt32.dll function signature definition you can use https://www.pinvoke.net/ site. YOu can find Capilite signature definition in CryptoPro SDK. I am targeting Windows, I know how to use p/invoke, in fact we are already using it in similar solution for Kazakhstan, but they use KalkanCrypt instead of CryptoPro. Where can I get crypt32.dll from ?
|
|
|
|
Статус: Активный участник
Группы: Участники
Зарегистрирован: 14.06.2022(UTC) Сообщений: 59 Сказал(а) «Спасибо»: 12 раз Поблагодарили: 2 раз в 2 постах
|
Автор: Michal Автор: AndreyES Автор: Michal Автор: AndreyES Автор: Michal Hi everyone. I am interested in this scenario: Цитата:use CryptoPro CSP via p/invoke - use unmanaged code, MS CryptoAPI 2.0. I would like to understand which dll should be invoked here. Do you have a COM library that could be imported to .NET application ? My use-case scenario is that we have to integrate with an API that use CryptoPro CSP to sign and verify the data. So the flow of the application is that user gives us his private certificate, we then have to "sign" the data with this certificate and then pass to the external API. Basically we have to perform the same signature that is done on the sample page https://www.cryptopro.ru...ge/cades_bes_sample.htmlI would be really grateful if someone can point me to the right direction here. Regards, Michal Hi, if you need to sign data on the server side, what version of .NET is used? I am using .NET 5.0 If your target OS is Windows you should create a managed wrapper around crypt32.dll using p/invoke, on Linux CryptoPro created Capilite library, which is similar to Windows cryptoAPI, so you need to create a wrapper around this library. For crypt32.dll function signature definition you can use https://www.pinvoke.net/ site. YOu can find Capilite signature definition in CryptoPro SDK. I am targeting Windows, I know how to use p/invoke, in fact we are already using it in similar solution for Kazakhstan, but they use KalkanCrypt instead of CryptoPro. Where can I get crypt32.dll from ? It's a system Windows library
|
|
|
|
Статус: Новичок
Группы: Участники
Зарегистрирован: 11.10.2022(UTC) Сообщений: 7
|
Автор: AndreyES Автор: Michal Автор: AndreyES Автор: Michal Автор: AndreyES Автор: Michal Hi everyone. I am interested in this scenario: Цитата:use CryptoPro CSP via p/invoke - use unmanaged code, MS CryptoAPI 2.0. I would like to understand which dll should be invoked here. Do you have a COM library that could be imported to .NET application ? My use-case scenario is that we have to integrate with an API that use CryptoPro CSP to sign and verify the data. So the flow of the application is that user gives us his private certificate, we then have to "sign" the data with this certificate and then pass to the external API. Basically we have to perform the same signature that is done on the sample page https://www.cryptopro.ru...ge/cades_bes_sample.htmlI would be really grateful if someone can point me to the right direction here. Regards, Michal Hi, if you need to sign data on the server side, what version of .NET is used? I am using .NET 5.0 If your target OS is Windows you should create a managed wrapper around crypt32.dll using p/invoke, on Linux CryptoPro created Capilite library, which is similar to Windows cryptoAPI, so you need to create a wrapper around this library. For crypt32.dll function signature definition you can use https://www.pinvoke.net/ site. YOu can find Capilite signature definition in CryptoPro SDK. I am targeting Windows, I know how to use p/invoke, in fact we are already using it in similar solution for Kazakhstan, but they use KalkanCrypt instead of CryptoPro. Where can I get crypt32.dll from ? It's a system Windows library Oh I see. I thought you already have some sort of wrapper I can use to simply sign the data. Is there any documentation that will help me to replicate what is being done on this sample page https://www.cryptopro.ru...ge/cades_bes_sample.html ?
|
|
|
|
Быстрый переход
Вы не можете создавать новые темы в этом форуме.
Вы не можете отвечать в этом форуме.
Вы не можете удалять Ваши сообщения в этом форуме.
Вы не можете редактировать Ваши сообщения в этом форуме.
Вы не можете создавать опросы в этом форуме.
Вы не можете голосовать в этом форуме.
Important Information:
The Форум КриптоПро uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close