96 questions with no answers
1
vote
0
answers
146
views
Why does EVP_PKEY_derive_set_peer cause a segmentation fault when using a peer public key reconstructed from BIGNUM in OpenSSL 3?
I'm using OpenSSL 3.0 EVP_PKEY in C to perform Diffie-Hellman key exchange. I generate Alice's and Bob's key pairs. I extract Bob's public key as a BIGNUM and try to reconstruct an EVP_PKEY for Bob's ...
1
vote
0
answers
152
views
Openssl Unable to get raw public key from PKEY
I am learning to use the openssl/cryptolib. Am working to build a simple p2p chat room with encryption.
My intent is to use a Diffie-Hellman key exchange scheme. As I understand it, it is powered by ...
3
votes
0
answers
102
views
Unable to get raw public key from PKEY
I am learning to use the openssl/cryptolib. Am working to build a simple p2p chat room with encryption.
My intent is to use a Diffie-Hellman key exchange scheme. As I understand it, it is powered by ...
0
votes
0
answers
81
views
Different Shared Secret derived when trying to implement Diffie Hellman Key Exchange between Swift and C#
I am trying to get Diffie Hellman Key Exchange working between my iOS (swift) app and my ASP.NET 8 Core Web Server but with everything I've tried so far, the shared secrets derived on each platform ...
0
votes
0
answers
379
views
How can I do an ECDH key exchange with OpenSSL 3.0
Most of the API that EC_KEY* functions like EC_KEY_get0_public_key have been deprecated in OpenSSL 3.0, so as far as I know there's no way but to use the EVP interface. I want to export the public key ...
1
vote
0
answers
112
views
SSH Server Verification Failing - Is Exchange Hash in Correct Form?
I'm writing a simple ssh client in C using the OpenSSL library to handle the Diffie-Hellman operations (big numbers, hashing, computing the shared key, server verification, etc.) I'm running a ssh ...
1
vote
0
answers
208
views
OpenSSL EVP_PKEY_fromdata Importing Parameters Incorrectly
EDIT: I realized the EVP_PKEY_print_private function is actually the same as the RFC p, they just have differing endian-ness. I would still appreciate critiques of my code, and pointers to helpful ...
0
votes
0
answers
479
views
Error: "Invalid use of incomplete typeof 'DH' {aka 'struct dh_st'}" when using OpenSSL DH function in C
I'm Trying to implement a server-client application in C that uses OpenSSL's Diffie-Hellman key exchange for secure communication.However, during compliation, I'm encountering the following error: ...
0
votes
0
answers
113
views
How to recreate Bob and Alice Non-Interactive Diffie-Hellman Key-Exchange?
I'm trying to recreate the Bob and Alice Diffie-Hellman Key Exchange, since I'm doing my first steps in cryptography and cyber security.
The goal is to implement a non-interactive version of this ...
0
votes
0
answers
143
views
Decrypting TLS_DHE_WITH_AES_256_CBC_SHA256
I am trying to delve into some cryptography and am trying to decrypt a base64 encoded encrypted string using js. The actual string has been encrypted using TLS_DHE_WITH_AES_256_CBC_SHA256 cipher.
I'm ...
0
votes
0
answers
83
views
Deriving DH shared secret
I'm quite new to cypto and I'm trying to derive DH shared secret between two parties. One part is in OP-TEE (a TA) and other part is a remote server. This is my public and private key values in the TA....
0
votes
0
answers
300
views
Implementing Diffie-Hellman in python. Shared secret keys aren't getting matched
hope everything is well. I am trying to implement the Diffie_Hellman in Python. I read that for better security, it is recommended that the prime 𝑝
should be at least 2048 bits long, and 𝑔 should ...
0
votes
0
answers
170
views
How migrate key reading DH-Pem in Delphi-Indy-SSL to C# on .NET 6.0?
dhparam.par
-----BEGIN DH PARAMETERS-----
...==
-----END DH PARAMETERS-----
Indy OpenSSL:
object IdSSLIOHandlerSocketOpenSSL1: TIdSSLIOHandlerSocketOpenSSL
Destination = 'smtp.server:587'
Host = '...
1
vote
0
answers
261
views
Issue with implementing X25519 from RFC 7748
https://www.rfc-editor.org/rfc/rfc7748 gives a simple implementation of scalar multiplication on curve25519. They have some Python code and some pseudocode, and I tried my best to connect all of it ...
0
votes
0
answers
43
views
Trying to guess p and q from N by using Diffie-Hellman cycles algorithm, too slow BigInteger.Pow approach
Well,
I implemented a program to find p and q given N.
For p = 11 and q = 7, with a generator of g=2 or g=8 it seems to work pretty well,
But when I use a list of prime numbers given on the internet, ...