libgcrypt | GNU crypto library
kandi X-RAY | libgcrypt Summary
kandi X-RAY | libgcrypt Summary
This file is Free Software; as a special exception the authors gives unlimited permission to copy and/or distribute it, with or without modifications, as long as this notice is preserved. For conditions of the whole package, please see the file COPYING. This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, to the extent permitted by law; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of libgcrypt
libgcrypt Key Features
libgcrypt Examples and Code Snippets
Community Discussions
Trending Discussions on libgcrypt
QUESTION
I am writing a simple program to encrypt and decrypt a c-string using libgcrypt.
In one part of my program, gcry_cipher_encrypt()
is called like this:
gcry_cipher_encrypt(handle, cipher_text, cipher_text_buf_len, plain_text, block_len);
cipher_text_buf_len
is the allocated size of cipher_text
, which in my program is equal to the length of plain_text
. This has also been suggested by the reference manual here:
https://www.gnupg.org/documentation/manuals/gcrypt/Working-with-cipher-handles.html.
Question: I cannot figure out how to get the length of the data stored in the cipher_text
buffer.
Any help will be appreciated. Thanks in advance. Varad
...ANSWER
Answered 2022-Feb-14 at 13:13I finally found it. The answer is that the gcry_cipher_encrypt()
function does not need to give the caller the length of the ciphertext. This is because in stream ciphers and block ciphers, the ciphertext is always the same length as the plaintext. Hence, the caller function itself could compute the length of the data stored in the buffer returned by gcry_cipher_encrypt
Quoting https://en.wikipedia.org/wiki/Block_size_(cryptography):
In modern cryptography, symmetric key ciphers are generally divided into stream ciphers and block ciphers. Block ciphers operate on a fixed length string of bits. The length of this bit string is the block size. Both the input (plaintext) and output (ciphertext) are the same length; the output cannot be shorter than the input – this follows logically from the pigeonhole principle and the fact that the cipher must be reversible – and it is undesirable for the output to be longer than the input.
It should be noted however, that if you plan to store or transmit your encrypted data, then you will need to save/send the initialization vector(iv) and plaintext padding information along with it.
QUESTION
I would like to use GPG without Gpg4win installed on Windows because Git for Windows includes the binary for GPG we well, so I would like to use it instead of installing an extra application.
However, when I setup the GPG (e.g adding Path etc), I have encountered the following error:
...ANSWER
Answered 2021-Aug-10 at 05:17I managed to figure it out.
This is because the gpg in git for windows uses MINGW64
for the environment. And because I manually set the GNUPGHOME
environment variable to a Windows path: C:/users/me/.gnupg
, it will not work.
(I never use the included MINGW64
git bash, I only use cmd and add those exe, like git, gpg into PATH
)
So, if you have manually set the GNUPGHOME
env variable, you need to change to a MINGW64
path.
So in my case, C:/users/me/.gnupg
-> /c/users/me/.gnupg
I am not sure about --homedir
though.
QUESTION
Context
I have a jenkins that builds a docker image for a raspberry pi 2. It is using buildx to emulate the ArmV7 environment during build. This worked great until recently I got random errors during installing the apk packages.
Dockerfile
...ANSWER
Answered 2021-Nov-22 at 14:18ok, looks like i found my solution here: https://gitlab.alpinelinux.org/alpine/aports/-/issues/12406
quote from Lyle Franklin:
I hit this error when trying to build a cross-platform ARM64 docker image from a AMD64 host. However, running
docker run --rm --privileged linuxkit/binfmt:v0.8 or update-binfmts --enable
prior to running the build seems to avoid the issue. My understanding Docker will try to use upstream QEMU if it is installed and registered with the kernel, otherwise Docker will fallback to using a built-in forked version of QEMU. The build error above only showed up for me with the forked QEMU.
So I will probably add docker run --rm --privileged linuxkit/binfmt:v0.8 && update-binfmts --enable
to my pipeline file if I encounter the error again, for now running it once solved the issue.
QUESTION
So I am trying to get Emgu.CV running on debian, without any success yet.
I have the same error all the time, even when I fixed all the dependcies
ANSWER
Answered 2021-Nov-19 at 14:35If I get the ldd-output right the Library libusb is missing:
QUESTION
My Dockerfile
...ANSWER
Answered 2021-Sep-14 at 03:52Mem was not quite enough for me to compile. Problem solved.
There is only 1g1c on my VPS, and I'm running an Nginx and sidekiq. The mem is only about 600m in usual cases. Simply mem wasn't quite enough to compile and build.
QUESTION
A linux build of any flutter application with linux enabled, results in the following error:
...ANSWER
Answered 2021-May-03 at 04:36you should update flutter (Channel stable) version to 2.0.3 . This version of flutter run don't have this issue.
Updated answerthe universal solution for this problem is to uninstall flutter that you've installed from snap
and install it from AUR
.
installing flutter from AUR-->yay -S flutter
you might encounter some permission problem. here's how to fix permission:
Create a new group flutterusers
, add the default user to the group, then change permissions on the folder /opt/flutter
.
QUESTION
I am trying to do a simple read and count of a small parquet file (10K records) using dask-yarn
on an AWS EMR cluster with one master and one worker node, both are m5.xlarge
instances.
I am trying to execute the following code just to test my cluster:
...ANSWER
Answered 2021-Apr-29 at 12:43Your dask and distributed versions have gone out of sync, 2021.4.0 versus 2021.4.1. Updating dask should fix this. Note that you need to ensure that the exact same versions are also in the environment you are using for YARN.
QUESTION
I have C++ files in my iOS Xcode project. Those files uses the next libraries that I'm calling via HomeBrew:
- mpg123/1.26.5
- libgcrypt
- ffmpeg
- libgpg-error
- fftw
- libsndfile
The way I'm including them in the project is by setting the HeaderSearch Paths:
That is all I'm doing to call those libraries. The error that I'm getting when I compile the project is the next one:
...ANSWER
Answered 2021-Apr-14 at 07:59Since you've installed this using brew
you are trying to link against libraries built for the Mac. You need to build those libraries for iOS. Note this will typically involve making a fat binary of the different architectures you'll need per library. You can easily test this for fftw
and see if the linker errors disappear. Here are some references to build or download a pre-built version.
https://github.com/godock/fftw-build
In theory once you link up against the iOS version, you should see errors like
QUESTION
There is already a more generic thread on the topic, Remember GPG password when signing git commits, but the answer there doesn't work for me. My environment is:
- Mac (macOS@10.15.7)
- Bash (the default that comes with macOS)
- Git v2.27.0
- GnuPG v2.2.20 (libgcrypt 1.8.5)
I installed GnuPG via Homebrew and wrote the following settings into the ~/.gnupg/gpg-agent.conf
file:
ANSWER
Answered 2020-Nov-12 at 15:16In my personal setup I have added the signingkey to the user section.
QUESTION
I am building couple of libs in ubuntu using CMake, and I noticed whenever I try to use the files in the installed directory, I get missing libs error. using ldd
I noticed in these files, the libs are not found while if I go back to the original file built, it has all the references and copying it to the installation directory fixes the issue.
To make all this more clear consider the following CMakeList.txt that I use to build my library:
ANSWER
Answered 2020-Sep-22 at 06:32This is normal behavior in CMake. When compiling you binaries the rpath to the dependencies is set in the binary, but stripped when installing it.
By default if you don't change any RPATH related settings, CMake will link the executables and shared libraries with full RPATH to all used libraries in the build tree. When installing, it will clear the RPATH of these targets so they are installed with an empty RPATH. Source
When looking up runtime dependencies the rpath is preferred over the default directories (see https://stackoverflow.com/a/33520976/4181011). But since the rpath was removed from your library it doesn't know about you "out-of-default-directories"-dependencies.
You can manipulate the lookup with LD_LIBRARY_PATH
, LD_PRELOAD
or by adding the additional path to the lookup directories using ldconfig
.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install libgcrypt
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page