W
W
wishz2022-04-10 01:10:03
Cryptography
wishz, 2022-04-10 01:10:03

Cryptographic libraries for C/C++?

I'm trying to figure out various cryptographic functions, specifically for my projects I'm interested in algorithms (sha, rsa, ecdh, aes), and I want to find information about existing libraries on this topic.
In this regard, there are several questions for those who know which cryptographic libraries can be used for programming in C/C++.
1) I know that there are two popular solutions OpenSSL(libcrypto), and Crypto++. Maybe there are some guides or tutorials on programming on these libraries, or on other good libraries? Because I couldn’t master the official openssl documentation, and all the searches for guides on it ended with another video on installing an ssl certificate on a domain.
2) I'm interested to know your opinion, how do you think it is safe / competent to use self-written crypto-libs, and would you use such libraries for some kind of production? (Of course, my self-written library will contain 2-3 algorithms at most, just what I use in the project, but still? )

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stanislav Makarov, 2022-04-10
@Nipheris

specifically for my projects, I'm interested in algorithms (sha, rsa, ecdh, aes), and I want to find information about existing libraries on this topic.

https://www.cryptopp.com/wiki/RSA_Cryptography - here is a page on the cryptopp wiki on RSA, have you tried reading it? What is clear/unclear? Are you sure that you need information on the library, and not on the algorithms themselves?
I'm interested to know your opinion, what do you think, how safe / competent is it to use self-written crypto-libs, and would you use such libraries for some kind of production?

I absolutely do not advise you. If you knew enough to safely implement such algorithms on your own, you wouldn't be asking this question. In addition, you would understand that it is much easier to deal with an existing library than to write your own implementation.
Judging by your question, you are trying to get around the need to deal with complex things, including through bicycle construction. Cryptography is a field that does not tolerate this approach. Of course, people implement their own solutions from scratch from time to time (after all, someone started the cryptopp and openssl projects), but they are well aware of both all the existing solutions and the complexities of creating their own. And about the practical output from the cost of high-quality implementation of your solution.
If this is a serious production, then cryptobikes from a novice developer are useless there.
If this is a training project or a pet project, then the risks cannot be assessed without additional information. If you just want to practice implementing SHA, then there is no point in asking, take it and implement it.

M
maaGames, 2022-04-10
@maaGames

Ни в коем случае НЕ используейте самописные крипто-либы. Если нельзя использовать XOR для "шифрования", то ни в коем случае не испоьзуйте самописных библиотек. Криптографические библиотек иразрабатывают сотни человек десятками лет и они всё-равно содержат ошибки и уязвимости. Самописная либа на 99.99999% будет уязвима.
Конкретных либ рекомендовать не буду, но я бы выбирал исключительно бибилиотеки, которые реализуют хорошо описанный алгоритм с открытым кодом (или хотя бы математическим описанием алгоритма шифрования). Если алгоритм шифрования засекречен, то независимые эксперты не могут его проанализирвоать и указать на ошибки и нет причит ему доверять.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question