447 questions
1
vote
1
answer
163
views
Migrating from OpenSSL 1.1 to 3.0: How to generate DH key pair with 32-byte prime using EVP_PKEY-DH interface?
I'm migrating my Diffie-Hellman (DH) implementation from OpenSSL 1.1 to OpenSSL 3.0. Previously, I used APIs like DH_set0_pqg, but these are now deprecated. I am switching to the EVP_PKEY-DH interface ...
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
1
answer
134
views
EC Diffie Hellman on Android
I have a problem verifying key exchange with the server using Elliptic Curve Diffie Hellman. The key I sent doesn't work for some reason, the server can not use it or recognize it, and I don't know ...
2
votes
1
answer
62
views
Is encrypting a public key enough security to replace SSL? [closed]
I'm looking into implementing OTR (off-the-record) protocol into my de-centralised messaging app (written in Scala with akka and akka-http). I was originally attempting to use SSL, but it seems ...
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
1
answer
125
views
Getting CryptographicException "Negotiation failed. Unsupported instance of ECDiffieHellman algorithm." while using SFTP to send a file in .NET 8
I am getting the exception below while trying to use SFTP client to send a file. It used to work earlier but I am getting this exception since I migrated to .NET 8.
Negotiation failed. Unsupported ...
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
1
answer
243
views
PACE PIN Generic Mapping implementation in c#
I'm trying to implement PACE PIN authentication with a generic mapping using elliptic curves. Here is the beginning of my method, I have a 6984 error here : • Send PKPCD,map and Receive PKPICC,map ...
-1
votes
1
answer
780
views
ECDH C# key exchange ( get the shared secret beetween the two party)
I have a smart card reader and a smart card. I need to perform a Diffie-Hellman key exchange between the chip and the reader to get the shared secret, and then generate a new DHMappedGenerator in C#.
...