[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Encrypt data between socket client and server


On Wednesday, March 4th, 2026 at 17:36, Lee <t.lee.davidson@xxxxxxxxx> wrote:

> I have to assume you cannot use a HTTPS server and client. If you could, that would likely simplify things a bit as the SSL
> framework is already there. Sorry, I don't have an example, but based on that assumption, here are my thoughts.
> 
> If you don't mind the non-sensitive portion of the payload being transmitted in clear text, you could set up a minimal
> communication protocol between as socket server and client after the manner of HTTP.
> 
> HTTP is quite simple and human readable. The messages sent are in plain text. Each line of the header is separated by a CrLf and
> the header section is delimited from the body by two CrLf's. Simple.
> 

Wow, you're going into a quite unsuspected direction.

I have been investigating the matter a bit more and it seems like SSH does what I need.

"The protocol works in the client-server model, which means that the connection is established by the SSH client connecting to the SSH server. The SSH client drives the connection setup process and uses public key cryptography to verify the identity of the SSH server. After the setup phase the SSH protocol uses strong symmetric encryption and hashing algorithms to ensure the privacy and integrity of the data that is exchanged between the client and server."

It does exactly what I need, public key based authentication and next encryption of send data.
And it's SSH (not SSL) I have set up, so I need to figure out a way to get an SSH server authentication  implemented into my socket server and make the socket client work with it as a first step.
And it seems I don't need to look into components as there is no such thing as an SSH component in Gambas.

If anyone has used SSH in some form or manner for authentication or encrypted transport withing Gambas, any piece of example code is welcome.
It's not of a vert high urgency at the moment as I have plenty on my plate with GambOS, but something I'm already investigating as it will become needed at a certain point in the future.


gbWilly

GambOS
Gambas3 for Debian/Ubuntu

...there is always a Catch if things go wrong!

Sent with Proton Mail secure email.


Follow-Ups:
Re: Encrypt data between socket client and serverLee <t.lee.davidson@xxxxxxxxx>
References:
Encrypt data between socket client and servergbWilly <gbWilly@xxxxxxxxxxxxxx>
Re: Encrypt data between socket client and serverLee <t.lee.davidson@xxxxxxxxx>