Questions tagged [libgcrypt]

73 questions
0
votes
1 answer

“cc: command not found” when running make for libgcrypt on windows 10

G'day all. Just to preface this, I'm not an experienced programmer, so I might not use the correct jargon. I'm in the process of installing GnuPG 2.2.19 on a Windows 10 machine (build no. 18363.628). I have installed MinGW (version 2013072300…
0
votes
0 answers

Decrypting message from nodejs on c++ libgcrypt

I have been able to encrypt and decrypt a message on the client application as well as the server. I am having issues when sending a message from the server and decrypting it on the client. Server const crypto = require('crypto'); server.listen({ …
KS7X
  • 332
  • 2
  • 15
0
votes
1 answer

AES128 encryption libgcrypt outputs junk

I am using this solved post as a reference but cannot seem to get the same result: AES128 in libgcrypt not encrypting When I print the string to console, I get junk characters. I think it may be due to '\0' being in the string but I am not certain…
KS7X
  • 332
  • 2
  • 15
0
votes
0 answers

Installing libgcrypt11-dev through Terminal on macOS

I have a project using headers such as malloc and gcrypt. To get the project to compile on my Ubuntu machine, I just have to run: % sudo apt-get install libgcrypt11-dev However, I would like to be able to work on this project on my mac. I have tried…
DevDragon
  • 1
  • 1
0
votes
0 answers

How static const data inside shared library located is accessed in C program in linux

In libgcrypt shared library, during AES encryption/decryption operation lookup tables are accessed. In case of AES encryption, 1KB lookup table ( defined as static const u32 encT inside shared library) and in case of AES decryption, 1KB + 256…
bholanath
  • 1,699
  • 1
  • 22
  • 40
0
votes
1 answer

gcry_mpi_t type definition in libgcrypt-1.8.2

I'm looking for the definition of the gcry_mpi_t type. I'm looking into the code of GnuPG, which uses libgcrypt, which in turn uses the latter as the type responsible for storing the modulus, the prime numbers of the RSA keys, etc. Typically, in…
Blupon
  • 959
  • 1
  • 12
  • 16
0
votes
0 answers

How to access read-only (static const) data of shared library from C/C++ program with known OFFSET

I have installed libgcrypt shared library. libgcrypt.so file is generated . It has some read-only data. ./configure ( without -g option for debug symbol) make install static const u32 encT[256] = { 0xa56363c6, 0x847c7cf8, 0x997777ee,…
bholanath
  • 1,699
  • 1
  • 22
  • 40
0
votes
1 answer

Why does gcrypt say to recalculate the coefficient of an RSA key when converting from SSL format to gcrypt?

The documentation for libgcrypt says: An RSA private key is described by this S-expression: (private-key (rsa (n n-mpi) (e e-mpi) (d d-mpi) (p p-mpi) (q q-mpi) (u u-mpi))) ...and... p-mpi RSA secret prime p. q-mpi …
AlastairG
  • 4,119
  • 5
  • 26
  • 41
0
votes
0 answers

Simple 3DES encription using gcrypt library

I am writing a simple free software to encode and decode bash script, mainly. The goal is to obtain executable script files where nobody can read the source code inside, root and the owner included. To encode/decode files I choice to use gcrypt…
Silvano
  • 1
  • 1
0
votes
1 answer

Finding library during compilation in mingw64 environment (libgcrypt and libgpg-error)

I'm a real beginner at this, so apologies in advance for obvious questions. I'm trying to compile a custom build of ffmpeg that has some extra dependencies the normal build does not. Among those is libgcrypt and libgpg-error - I know this, because…
Alastair
  • 5,894
  • 7
  • 34
  • 61
0
votes
1 answer

C++, how to copy the return value of gcry_cipher_encrypt in gcrypt library to a variable?

In the code I attached below, it uses gcry_cipher_encrypt. At the end of the code it output the content in encBuffer as hex value string. I need to make it in a variable like char[], char*, or string, whatever and use it. According to handbook of…
YU Liu
  • 45
  • 3
  • 10
0
votes
1 answer

Mimicking PHP openssl_encrypt() and openssl_decrypt() call in Perl

I am trying to write some Perl code to decode Triple DES (3DES) keys generated by a PHP program. I've looked for an example of using Crypt::GCrypt decoding in Perl but can't find one. I need a Perl equivalent to PHP's openssl_decode(), but even an…
Gilbert
  • 3,740
  • 17
  • 19
0
votes
0 answers

gtk odd behavior GtkTree append

tree_add is called by g_idle_add in another thread odd behaviour is that the hash is garbage, how would the message digest end up garbled? the rest of the odd behaviour has been fixed with the below suggestions #include #include…
0
votes
0 answers

implementation of TOTP using C and Gcrypt

I'm trying to implement a simple TOTP client using C and libgcrypt. I've read both the RFC 6238 and the RFC 4226 but I still have some problems with the result. #include #include #include #include int…
polslinux
  • 1,739
  • 9
  • 34
  • 73
0
votes
1 answer

Determine size of decrypted data from gcry_cipher_decrypt?

I am using AES/GCM, but the following is a general question for other modes, like AES/CBC. I have the following call into libgcrypt: #define COUNTOF(x) ( sizeof(x) / sizeof(x[0]) ) #define ROUNDUP(x, b) ( (x) ? (((x) + (b - 1)) / b) * b : b) const…
jww
  • 97,681
  • 90
  • 411
  • 885