Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 5 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Improve this question
I have a light http server (embedded software solution). This http server is calling openssl functions to handle https connexions.
I want to make the https server prioritize some ciphers. because according to the following link, the https connection is more secure when the DH cipher are prioritized:
Instead of using the RSA method for exchanging session keys, you
should use the Elliptic Curve Diffie-Hellman (ECDHE) key exchange.
Note that you can still use the RSA public-key cryptosystem as the
encryption algorithm, just not as the key exchange algorithm. ECDHE is
much faster than ordinary DH (Diffie-Hellman), but both create session
keys that only the entities involved in the SSL connection can access.
Because the session keys are not linked to the server’s key pair, the
server’s private key alone cannot be used to decrypt any SSL session.
To enable Perfect Forward Secrecy, you must do the following:
1- Reorder your cipher suites to place the ECDHE (Elliptic Curve
Diffie-Hellman) suites at the top of list, followed by the DHE
(Diffie-Hellman) suites.
2- Configure servers to enable other non-DH-key-exchange cipher
suites from the list of cipher suites offered by the SSL Client.
How I can change the cipher order on my openssl server to make the DH ciphers first?
From the OpenSSL documentation, the relevant function call here is SSL_set_cipher_list
The OpenSSL recommended string to use here is HIGH:!aNULL:!kRSA:!PSK:!SRP:!MD5:!RC4, since the !kRSA disables using RSA as the key exchange and forces the use of ephemeral DH, which provides the Perfect Forward Secrecy that you describe in your question.
As a disclaimer, the cipher string above may not be what is recommended today, it is just what is recommended in the OpenSSL documentation.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I have a VPN application which is written in C++ for Windows 7+ and uses OpenVPN as well as RAS for establishing connections and I need to allow only for some apps to be able to use vpn connection and others to use user's default connection/network (I also don't know what apps it will be, users need to configure it). So far I haven't found any hints on how to implement it, is it possible to do it at all on Windows? And if yes, how?
I'm not sure that you can do that. VPNs basically work like a secure TCP/IP router (or switch). They provide an IP-address on each side that is a "gateway" to the network on the other side. (Appropriate route commands must have been issued on both sides, which the VPN client software can do for its local machine.) I don't think that there is any way to restrict which applications can use a particular IP-address . . . but of course I could be mistaken. (MS-Windows does have many tricks up its sleeve.)
I think that you should take this to superuser.com or some other StackExchange site which is targeted towards system administration of a Windows environment, because your question is actually quite specific to that, and not to VPNs in general.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Let me say that I am doing this first time and I know very little in this domain (learning more).
My requirement is to implement a secure channel of communication between server and client.
I will be proved x509 certificate on both side (server/client). Communication will via sockets.
One option is to use openssl. But priority is to develop it on the Windows API.
I see two options cryptolib & sspi.
Please suggest what is best and proven option on Windows.
OpenSSL works just fine on Windows, and there are precompiled DLLs available if you do not want to compile it yourself.
But, if for whatever reason, you cannot use OpenSSL, then have a look at SChannel:
Secure Channel
Creating a Secure Connection Using Schannel
It uses SSL/TLS and CryptoAPI internally. It also allows you to do your own socket I/O, so you can add it to existing socket code.
Alternatively, have a look at WinSock's built-in security:
Winsock Secure Socket Extensions
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm working on a peer to peer networking application but I cannot solve how I'm going to provide security on UDP sockets.
I don't want to reinvent the wheel, but I don't which method I should choose to implement security.
My idea is to generate RSA keys between every peer and share these keys over an insecure socket at first and keep the connection secure with those keys. But I'm not sure about how to implement RSA and if this is the most secure way to go.
I'm using C++ for this project by the way
Thank you very much
You are looking for DTLS, the Datagram TLS.
It is like the TLS protocol that you know from HTTPS and various other secure point-to-point communication links, but it is implemented over UDP. You will find it already implemented in various libraries including GnuTLS and OpenSSL.
From the security point-of-view, one major difference between TLS and DTLS is that TLS defines an ill-formed message as an unrecoverable error, whereas DTLS specifically allows the connection to continue in this case. This makes the protocol more sensitive to even slight coding errors (think Lucky Thirteen), so you had better not try to implement it yourself.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
Recently there has been a discussion whether secret service agencies have access to certification authorities. Before that several CAs were facing security problems being attacked by hackers.
Given this, I am wondering whether S/MIME can be still considered secure because the same CAs generate the private keys.
S/MIME, SSL, and any other technology based on public key encryption is presently as secure as the list of certificates you trust. It always has been and it always will be until computing power reaches the point of being able to brute force the algorithms behind it.
If they are doing things right, the CA never sees your private key. You should be generating a keypair on your machine, then send the public part to the CA. The CA sends back a signed copy of the public part (the certificate). The private key should never leave your machine.
Compromising a CA allows the attacker to sign an arbitrary public key. Since the certificate includes things such as a human-readable name, this would allow someone to pretend to be you by creating a certificate with your name on it. They still would not have your private key, however, so this does not allow them to decrypt anything sent to you.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
i want to create two programs in Qt with one server and another client, my server programs insert user and customer information like fingerptint and another important data and in client users and customers use their information for working on some privacy stuff, these programs must send information on network.
so i think using Postgresql for database on server and client just connect to database and get needed information as login and etc.
and now this is my problems
my network connection must be secure no one can extract data send to
client? (so i think postgres handle this for me, am i right?)
i want to client has offline mode, so i don't mind if i must setup
another Postgresql database on client PC, and then how i can tell
postgres update himself from server or vice versa?
finally whats the best solution you think?
thanks a lot
Wow, that's a bit open-ended. See https://stackoverflow.com/faq#dontask . Keep your questions specific and focused. Open ended I-could-write-a-book-on-this questions will get closed.
Quick version:
my network connection must be secure no one can extract data send to client? (so i think postgres handle this for me, am i right?)
Correctly used SSL will give you one-way trust, where the client can verify the identity of the server. The server must still rely on passwords to identify the client, but it can do that over SSL.
You can use client certificates for true two-way verification.
If you're doing anything privacy sensitive consider using your own self-signed CA and distributing the CA cert through known-secure means. There are too many suborned sub-CAs signing wildcard certificates for nations to use in transparent SSL decryption for me to trust SSL CAs for things like protecting dissidents and human rights workers when they're using an Internet connection supplied or controlled by someone hostile to them.
Don't take my word on this; read up on it carefully.
i want to client has offline mode, so i don't mind if i must setup another Postgresql database on client PC, and then how i can tell postgres update himself from server or vice versa?
It sounds like you want asynchronous replication with intermittent connections.
This is hard. I recommend doing it at the application level where you can implement application-specific sync schedules and conflict resolution logic. You can use trigger maintained change-list tables to keep a record of what changed since the DBs last saw each other. Don't use timestamps to keep in sync, as they clock drift between server and client will cause you to miss changes. You might want to use something like the pgq ticker on the master DB.
finally whats the best solution you think?
Too open ended, not enough info provided to even start to answer.