Questions tagged [libgcrypt]
73 questions
1
vote
1 answer
(Newbie) ld exit return 1, and libgcrypt
After much research, trying to find out how to link libraries to gcc, going to /usr/bin and /usr/lib confirming the stuff are there. When I try to compile my keygen file, this is the error it blurts out.
$ gcc keygen.c -W -Wall…

zodkc
- 43
- 1
- 6
1
vote
1 answer
Compile gcrypt for Vala
I'm try to compile a code write in Vala using a .vapi of libgcrypt.
I installed the library in the system and i run a test in c. The code write in C compiles without errors:
I typed the following command to compile the C code:
gcc -o main main.c -l…

Kyul
- 15
- 4
1
vote
1 answer
Static linking creates Segmentation Fault error
I have a problem linking my C application statically. All libraries exist (.a) and just a month ago I was able to static link my application without an error. But as soon as I activate the static linking option in eclipse, I can compile without an…

m_hau
- 39
- 7
1
vote
1 answer
Endianness of BcryptSignHash output signature
The private and public key blobs generated by BcryptGenerateKeyPair are big-endian encoded (http://msdn.microsoft.com/en-us/library/windows/desktop/aa375520%28v=vs.85%29.aspx).
Using these keys, i sign a data using BcryptSignHash and generate a…

Fazlin
- 2,285
- 17
- 29
1
vote
2 answers
Print unsigned int (base 10 / decimal) value of MPI
I'm trying to confirm/get the unsigned int (base 10 / decimal) value of an hex'd mpi value. I'm using the following code:
#include
#include
static gcry_mpi_t privkey = NULL;
int main(){
char *parmstr =…

invalidusername
- 912
- 9
- 26
1
vote
0 answers
Building/Linking libgcrypt for Mingw
I'd like to implement some features of libgcrypt in my program, but it is currently running on Windows, OSX, and Linux (Arch/Xubuntu), so I can only really do so if I can build it for all three platforms. On OSX and Linux I had no problem.
I got the…

Dakota West
- 441
- 1
- 4
- 13
1
vote
1 answer
Memory management in C when using gcry_malloc_secure
I'm using libgcrypt 1.5.0 under GNU/Linux to develop a small aes256-cbc file encryption software.
I have a doubt regarding secure memory and data swapped out to disk.
Let's say I have this code:
char *crypto_key;
crypto_key =…

polslinux
- 1,739
- 9
- 34
- 73
1
vote
1 answer
AES128/CBC test not working
This is my code (the errors checking were deliberately omitted for code readability):
#include
#include
#include
#include
#define GCRYPT_VERSION "1.5.0"
#define GCRY_CIPHER GCRY_CIPHER_AES128
int…

polslinux
- 1,739
- 9
- 34
- 73
1
vote
2 answers
Compression and Encryption... Which to apply first?
I am working on a remote backup project in C...
I want to send data and compress as well as encrypt the data.
However I am confused whether to compress first or encrypt first!
What will be better?:
Compress the data and then encrypt it
Encrypt the…

Sam
- 1,842
- 3
- 19
- 33
1
vote
2 answers
C Libgcrypt: Unable to check if number is prime using libgcrypt
I am using a libgcrypt function gcry_prime_check to test if the number 3 is a prime number. It turns out 3 is not a prime number according to my the function. What am i doing wrong?
Here is my code
#include
#include
int…

Andy Stow Away
- 649
- 1
- 8
- 17
1
vote
1 answer
Compiler warnings with libgcrypt v1.5.0
When I compile a sample program with GCRYPT_NO_DEPRECATED defined, I get the following 6 warnings:
/usr/local/Cellar/libgcrypt/1.5.0/include/gcrypt.h:1336: warning: ‘gcry_ac_io_mode_t’ is…

Zach Rattner
- 20,745
- 9
- 59
- 82
0
votes
0 answers
gpg-agent GENKEY via cli for simplest RSA , invalid length specifier in sexp returned, using documentation example
https://www.gnupg.org/documentation/manuals/gnupg/Agent-GENKEY.html
When I execute gpg-agent --server for an interactive session, and enter the example from this site, I get the following error :
"gpg-agent[14]: failed to convert keyparam: Invalid…

greenwall7351
- 1
- 1
0
votes
0 answers
libgpg-error.so.0, needed by ../src/.libs/libgcrypt.so, not found (try using -rpath or -rpath-link)
I am trying to cross compile the libgcrypt-1.10.1 package but I am getting error messages. Actually libgcrypt depends on libgpg-error, I have cross compiled it and added path to LD_LIBRARY_PATH. After doing all these still I am getting errors. Can…

Billa Surendra
- 1
- 2
0
votes
1 answer
libgcrypt - how to get length of data stored in buffer returned by gcry_cipher_encrypt()
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,…

varadmathur
- 13
- 3
0
votes
0 answers
Signing gcrypt data returns 16777281
I setup the following gcrypt code to first sign and then following that verify the data.
However, this already returns 16777281 as result of the signing operation.
But I couldn't find any error message that matches this.
Edit: Additional Info:
The…

raycons
- 735
- 12
- 26