Questions tagged [libtomcrypt]

For programming guidance on use of LibTomCrypt, including the API and configuration.

LibTomCrypt is, according to its website, a fairly comprehensive, modular and portable cryptographic toolkit that provides developers with a vast array of well known published block ciphers, one-way hash functions, chaining modes, pseudo-random number generators, public key cryptography and a plethora of other routines.

Use this tag for programming guidance with LibTomCrypt, including use of the API and configuration .

Source can be found on github.

21 questions
7
votes
2 answers

OpenSSL RSA signature verification: hash and padding?

I am trying to write code to verify some RSA signatures. The signatures were made using the OpenSSL command-line tool, using the equivalent of this command line: openssl dgst -sha1 -sign private_key_file.pem < binary_data_file > sig I am trying to…
steveha
  • 74,789
  • 21
  • 92
  • 117
2
votes
1 answer

How to AES GCM Encrypt / Decrypt using LibTom

LibTom is a great comprehensive library for crypto and math operations in C/C++. https://www.libtom.net/LibTomCrypt/ The documentation has been written from the perspective of the developer who wrote the library, so some of the examples are less…
DanielG
  • 370
  • 1
  • 3
  • 15
2
votes
0 answers

C++ calling libtomcrypt ecc sign and verify with data created using OpenSSL

I am looking for examples of calling the libtomcrypt ecc sign and verify code using inputs created using the OpenSSL command line. I have created private and public keys, using the prime256v1 curve, created a signature for a text file and verified…
rek0204
  • 21
  • 1
2
votes
0 answers

How to compile/run C code to invoke libtomcrypt AES 2KB lookup table based implementation

In Libtomcrypt crypto library, AES encryption/decryption are implemented in two different way . Use of lookup table of size 8KB (encryption)/5KB (decryption). Use of lookup table of size 2KB (encryption)/2KB (decryption). In this case…
bholanath
  • 1,699
  • 1
  • 22
  • 40
2
votes
1 answer

Contiki mote type creation error when trying to use libtomcrypt library (rsa public key generation)

I am trying to work on RSA public key generation using libtomcrypt library for my school project. But I am unable to load the library in Cooja using Contiki OS. I tried to compile the file I need into an object file and load it in .csc file. This is…
lol
  • 53
  • 1
  • 10
2
votes
1 answer

How do I use libtomcrypt to import an RSA public key?

I am experimenting with using libtomcrypt to do RSA-2048 bit encryption. My current objective is to import a public key from a file. This file was generated using OpenSSL with the command: $ openssl rsa -in private.pem -outform PEM -pubout -out…
HD_Mouse
  • 567
  • 1
  • 7
  • 19
1
vote
0 answers

c++ libtomcrypt library outputting shorter hashes/truncated hashes

I am trying to generate hashes to use in a blockchain project, when looking for a crypto library i stumbled accross tomcrypt and chose to download it since it was easy to install, but now i have a problem, when I create the hashes (btw i'm usign…
1
vote
1 answer

how to store symmetric key in aes

I'm writing simple aes decoder/encoder using libtomcrypt. I need to story symmetric keys used in encoding, to decode data later. The problem is that the value of key which I access from "storage" struct changes comparing to the key that was used in…
astaria
  • 19
  • 1
1
vote
0 answers

How to use LibTomCrypt with Contiki

I am trying to use LibTomCrypt library with Contiki OS but it's not working at all. I get the error: fatal: Not a valid object name HEAD. I have used the following code for computing hash in my client file. unsigned char* hashSHA1(const char*…
user3582228
  • 181
  • 2
  • 14
1
vote
0 answers

struct is used uninitialized in this function when running libtomcrypt library in contiki os

HI i have been trying to use libtomcrypt library on contiki os and cooja I compile the file that are require for rsa to work like rsa_get_size.c into a object file and add into csc file when trying to load it in a simulator network. But i keep…
lol
  • 53
  • 1
  • 10
0
votes
1 answer

Strange behavior with -pg and optimization when generating hashes

I decided to make a program to find a sha3-512 hash with a certain number of zeroes at the start (like hashcash). It was working fine in my initial tests, so i decided to profile it with gprof to see if I could make it faster. After I had compiled…
drake14w
  • 157
  • 9
0
votes
0 answers

Why the plaintext in libtomcrypt cannot be generated by PRNG(e.g., yarrow)

Firstly, I just tell you the scenario I just met. I WANT to test the efficiency of the aes-ofb in libtomcrypt with different plaintext sizes such as 64, 128, 256 Byte, etc. TO make my codes more automatic, I just would like to use the PRNG to fill…
0
votes
1 answer

RSA signature verification failing with libtomcrypt

I was using libtomcrypt for a project, in particular hashing and signing with RSA some data. Because of memory requirements I wanted to switch to mbedtls. However I noticed an issue when trying to verify with mbedtls a signature generated by…
Damien
  • 164
  • 11
0
votes
1 answer

Pointer parameter NULL when entering in function scope but not at function call

I'm working on stm32f469 doing some bare metal code to try to use the libtomcrypt / libtomfastmath libraries. The code I'm trying to debug has been checked by valgrind and is working on many platforms like macos, raspberrypi, ios, android. To keep…
Damien
  • 164
  • 11
0
votes
1 answer

Generate RSA private key from Modulus and Exponent with tomcrypt

I am a newbie in cryptography. Need little help to start off. I have Modulus field & Private Exponent field given by the server and i need to compose the private key from it using Tomcrypt library. I am not able to figure out which Api from…
1
2