- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
来自 libgcrypt 手册:
Libgcrypt uses a concept known as secure memory, which is a region of memory set aside for storing sensitive data. Because such memory is a scarce resource, it needs to be setup in advanced to a fixed size. Further, most operating systems have special requirements on how that secure memory can be used. For example, it might be required to install an application as “setuid(root)” to allow allocating such memory. [...] If you have to protect your keys or other information in memory against being swapped out to disk and to enable an automatic overwrite of used and freed memory, you need to[...]
我对这种安全内存的工作原理有点困惑。
我正在开发一个软件,它可以进行 aes256-cbc 文件加密,并且还可以计算 IV+CIPHERTEXT 的 MAC(带有 sha512 的 hmac),所以我<必须使用安全内存来存储敏感信息。
我对“安全内存”概念的不理解是:
unsigned char *key;键= malloc(32);
。库如何知道该变量想要“分配”安全内存?free(key)
将被删除,所以我不需要在释放指针之前memset内存,对吗? 最佳答案
继续阅读您复制并粘贴的同一页面:http://www.gnupg.org/documentation/manuals/gcrypt/Initializing-the-library.html
有关于如何初始化库的示例。
一般来说,安全内存是用 mlock 锁定的,因此无法调出。
该库当然不知道程序其他地方的 malloc 调用,请查看其文档以了解如何使用它。
关于c - libgcrypt 安全内存,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14664147/
来自 libgcrypt 手册: Libgcrypt uses a concept known as secure memory, which is a region of memory set as
如果我在.lib(library)文件中找到了未解析的外部符号,该怎么办。如果我在.c或.cpp中发现了无法解析的外部符号,则可以对其进行修复。但是,当我在.lib(library)文件中找到未解析的
我正在使用 Libgcrypt 进行一些测试,当我使用 valgrind 检查内存使用情况时,退出时有 3,200 个字节正在使用。 我尝试过使用 valgrind --leak-check=full
我一直在努力理解如何正确使用 libgcrypt,并尽力编写了一些代码。尽管如此,我正在尝试使用上述库加密(AES 256)和解密文件。用户将输入文件名作为命令行参数。加密的文件将保存为第二个文件 (
我正在尝试在两个不同的组件中执行加密和解密(Rijndael 256,ecb 模式): 1. PHP - 服务器端(使用 mcrypt) 2. C++ - 客户端(使用 gcrypt) 当客户端无法正
我正尝试在带有 imx6 的板上为 ElinOS 交叉编译 GPG。我在编译 libgcrypt 时遇到问题。首先,这是我的工作: export PATH=/opt/elinos/cdk/arm/v7
我正在开发对文件进行 aes256-cbc 加密的简单软件。我正在使用 GNU/Linux 和 libgcrypt-1.5.0。 IV 是使用 OpenSSL rand 函数随机生成的,IV 存储在输
我有一个使用 libgcrypt 的 CTR 模式实现用 AES-256 加密的文件。 我希望能够分部分解密文件(例如,在不解密整个文件的情况下解密 20 个块中的 5-10 个块)。 我知道通过使用
我正在尝试创建一个由具有主私钥的对等点控制的对等网络,其中一部分是批准对等点进行连接 以下代码假设采用公钥,对其进行签名并将其发送给对等方,以便它可以检查其是否有效以及是否在其批准的对等方列表中 gc
我正在使用这个已解决的帖子作为引用,但似乎无法获得相同的结果:AES128 in libgcrypt not encrypting 当我将字符串打印到控制台时,我得到了垃圾字符。我认为这可能是由于 '
当我编译一个定义了 GCRYPT_NO_DEPRECATED 的示例程序时,我收到以下 6 条警告: /usr/local/Cellar/libgcrypt/1.5.0/include/gcrypt.
我一直在尝试为我的一个小型密码学项目使用 libgcrypt,但我似乎无法正确实现加密/解密。以下类及其用法。 #include #include #include #include #inc
我正在使用 Libgcrypt 和 Elgamal 来加密一个字节块,但我遇到了两个问题: 当我不使用填充并且我的字节块以零字节开始时,我在解密过程中丢失了第一个字节; 如果我使用填充,加密效果很好,
我正在使用 gcrypt,但我的编译器似乎无法找到它。这是我的 makefile。 function.c是一个函数源文件,包含我定义的函数;我还写了一个带有函数声明的头文件miao.h,gcrypt.
在使用 CCM 操作模式和 AES 算法时,我在 Libgcrypt 中加密/解密简单的 16 字节消息时遇到问题。在Libgcrypt的文档中我找不到为CCM设置哪些参数(我应该设置IV还是计数器?
在我的程序中,我最初向其中添加了 json-c,并且缺少一些与 libgcrypt 相关的依赖项。现在,我收到了 libgcrypt 的这些错误,这些错误对我来说没有任何意义。有没有人见过这些或者能够
我配置并编译了 libgpg-error 和 libgcrypt 但无法安装(make install),因为我没有 root 权限。 当我尝试配置 libgnutls 时,出现此错误。 tactus
我正在尝试使用来自 libgcrypt 的 AES256 加密和解密文件。(参见 doc) 为了生成 256 位 key ,我使用 SHA256 散列用户定义的字符串 (argv[1])。这工作得很好
我想先说明一下,我是 C 的新手,尤其是使用像 libgcrypt 这样大的库,所以如果它非常简单,请理解。 所以,我一直在尝试加密一些文本,只是为了有点像启动板,这样我就可以在加密字节之前获得更好的
由于目标平台的 C 语言限制,我需要在 libgcrypt 中通过 Crypto++ 解密加密数据。所以我决定使用 libgcrypt,因为它支持 AES128 和 GCM 模式。 在 Crypto+
我是一名优秀的程序员,十分优秀!