Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Proposal] WiMNC (Multiple MNC Discovery) #53

Closed
zenith391 opened this issue Jun 4, 2019 · 13 comments
Closed

[Proposal] WiMNC (Multiple MNC Discovery) #53

zenith391 opened this issue Jun 4, 2019 · 13 comments

Comments

@zenith391
Copy link

zenith391 commented Jun 4, 2019

Proposal

What is it

WiMNC would be a just very simple addition to how GERTi MNC works. It's made to be very simple, but also useful to RP servers, OC tablets, wireless GERT communication, etc.
Please note that as WiMNC is made for wireless communication, it doesn't respect clause B of GERTi Backend, therefore it should be optional.
WiMNC allows the user to select what MNC server to connect to, and also adds a protection layer compared to the actual connection method, however it can removes the automatic connection feature so the best would be that if GERTi API isn't provided arguments at import (maybe using dofile), it would keep the original connection mechanism, else it would use WiMNC, or allow the OS to manage it, for user interactivity, for example on openos a wimnc command

Basic information

A WiMNC broadcast is sent every 10 seconds containing information about the MNC. This feature IS optional (as it is not applicable for wired networks)

Communication

When broadcastings are sent through default OC modem port 32594.

Specifications

All packets are sent through port 32594!

WiMNC broadcast packet

The packet format is: a String containing the component ID of modem (for connection), a String containing the name of the WiMNC (can be anything, may default to "WiMNC Broadcast"), and a String containing the protection method (see below for values)

Protection methods

This proposal only specifies one protection methods and leaves the rest to the GERT maintainers. The method of encryption is not defined. The client authenticates using a password by sending a password validation packet. If after 1 second the server doesn't respond, the client will abort the authentication. This proposal also specifies an "unprotected" mechanism which requires no authentication.

Password validation packet

The password validation packet is just a string containing the SHA256 of password. As it is used for validation, the hash SHOULD NOT be used as key for encryption, so that since a hash is almost impossible to reverse-engineer, it would be secure.
The WiMNC-capable MNC will respond by a packet containing a boolean. True if password is correct, False if password is uncorrect.

@zenith391 zenith391 changed the title [Proposal] WiMNC [Proposal] WiMNC (Wireless MNC Discovery) Jun 4, 2019
@zenith391 zenith391 changed the title [Proposal] WiMNC (Wireless MNC Discovery) [Proposal] WiMNC (Multiple MNC Discovery) Jun 4, 2019
@TYKUHN2
Copy link
Member

TYKUHN2 commented Jun 4, 2019

Edited for brevity and clarity

@TYKUHN2
Copy link
Member

TYKUHN2 commented Jun 4, 2019

As a side note, common real-world protection schemes use hashed passwords for encryption keys (using functions known as PBKDF.)

@zenith391
Copy link
Author

Ok. But if you plan on doing so when thinking about protection methods, use a different hash than SHA-256

@MajorGeneralRelativity
Copy link
Member

It's definitely an interesting idea. I raised a concern on the Discord about this, but I'm willing to seriously consider this.

@zenith391
Copy link
Author

Also i forgot to said it since all time, but the whole point of having multiple MNC is that wireless range is limited, and doing cables require chunk-loading all of them (unless there is a specific mod for it, which is to avoid)

@MajorGeneralRelativity
Copy link
Member

Multiple clients can broadcast a wireless signal. You don't need more than one MNC for that.

@zenith391
Copy link
Author

You mean clients can like, "extend" the wireless range of MNC by relaying its packets?

@MajorGeneralRelativity
Copy link
Member

Because GERTi is partially a mesh network, not all packets run through the MNC. Clients can join the network by connecting to other clients, which can then act as a relay. In one sense, they do act as wireless extenders, but I just want to try to clarify that the MNC is not directly involved with all internal network traffic.

@zenith391
Copy link
Author

Oh, i didn't knew that. Well, except for security, WiMNC is useless. And that's cool that clients can act as relays.

@zenith391
Copy link
Author

But like i said, you could maybe implement some sort of security layer between clients and MNC. Because for now, if a client act as relays, it can easily read messages originally sended to an other client. And even do spoofing (sending messages as it)

@zenith391
Copy link
Author

Anyways i'm closing this issue, we can continue to speak here if it's about the security layer

@MajorGeneralRelativity
Copy link
Member

I totally understand what you are saying about security. I tried to implement some limited controls in the base protocol, but there is only so much I can do in the amount of space I wanted to use. I feel that it would be best for a security protocol to sit above GERT and perhaps expose wrapped sockets. That way, it doesn't increase the size of the GERT protocol and can remain optional due to not everyone needing the extra security.

@zenith391
Copy link
Author

Yea, i think a library including some sort of security would be the most appropriate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants