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 for password authentication #53

Open
nivex opened this issue May 29, 2021 · 1 comment
Open

Proposal for password authentication #53

nivex opened this issue May 29, 2021 · 1 comment

Comments

@nivex
Copy link
Contributor

nivex commented May 29, 2021

I propose the IP Networking Control Packets specification be extended with two additional types to provide optional password authentication. This will allow operators of servers to choose whether they wish to have additional security without changes to existing services.


ACKA

Bytes
0-3   Magic - ASCII "ACKA"
4-7   4 byte salt

Server may, upon receipt of a valid CONN command, respond with this type packet indicating that the callsign presented was valid but this connection requires authentication.

The salt must be different for each authentication attempt and should be acquired from a source with sufficient entropy.

AUTH

Bytes
0-3   Magic - ASCII "AUTH"
4-36  32 byte digest

Client must, upon reciept of an ACKA packet in response to a CONN command, respond with this type packet.

The digest shall be the SHA256 hash of the salt and the user's password.

Server must respond with an ACKN packet if the authentication is successful or NACK if it is not.
Server should also terminate the connection if the authentication is unsuccessful.


Example successful exchange with a salt of 0x31323334 and a base40 encoded callsign N8VNR:

CONN<callsign> => 434f4e4e000002cd5b06
ACKA<salt>     <= 41434b4131323334
AUTH<digest>   => 415554488d295b172e388c8c99fa16ac5a5fbcdc710279d9ea23a67e73dbae6fbaf515b9
ACKN<callsign> <= 41434b4e000002cd5b06

Points for discussion:

  • There are newer algorithms than SHA256 available for password hashing. I chose this because it's what MMDVMHost uses.
  • Should ACKA include the callsign before the salt as its cousin ACKN does?
@nivex
Copy link
Contributor Author

nivex commented Jun 10, 2021

The spec was just updated to remove the callsign in ACKN packets, so that's no longer a concern.

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

No branches or pull requests

1 participant