-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from deneonet/dev
v2.0.0
- Loading branch information
Showing
27 changed files
with
898 additions
and
796 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
_examples | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
kinetra.de/net License | ||
github.com/deneonet/knet License | ||
Version: 1.0.0 | ||
|
||
Copyright (c) 2024 deneonet | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
# kinetra.de/net | ||
# github.com/deneonet/knet | ||
|
||
A library to handle secure TCP connections over a custom protocol. | ||
**Warning:** This library is not complete and contains unfinished code. | ||
**Warning:** This library is not complete and may contain unfinished code. | ||
|
||
## Security | ||
|
||
**kinetra.de/net** uses AES-256 for data encryption, ECDH P521 for key exchange, and ECDSA P521 for signing. | ||
**github.com/deneonet/knet** uses AES-256 for data encryption, ECDH P521 for key exchange, and ECDSA P521 for signing. | ||
|
||
## Data Encoding | ||
|
||
To efficiently encode data, **kinetra.de/net** utilizes [benc](https://github.com/deneonet/benc) as its serializer. | ||
To efficiently encode data, **github.com/deneonet/knet** utilizes [benc](https://github.com/deneonet/benc) as its serializer. | ||
|
||
## Key Rotations | ||
|
||
If the private key of the server's certificate is compromised or just expired, simply generate a new one and update the client's root key as well. **cosair.gg** encodes a version field into the certificate and root key to verify that the client is always in sync with the server. If the versions do not match, a clear error will be returned. | ||
If the private key of the server's certificate is compromised or just expired, simply generate a new one and update the client's root key as well. **kNet** encodes a version field into the certificate and root key to verify that the client is always in sync with the server. If the versions do not match, a clear error will be returned. | ||
|
||
## Generating Certificates | ||
|
||
As simple as `go run kinetra.de/net/gen -v {VERSION_NUMBER}`, everything is done locally on your machine. To ensure that the root key is in sync with the certificate, it will be generated as well. | ||
As simple as `go run github.com/deneonet/knet/gen -v {VERSION_NUMBER}`, everything is done locally on your machine. To ensure that the root key is in sync with the certificate, it will be generated as well. | ||
|
||
## The Handshake Process | ||
|
||
1. **[Client]**: I want your certificate to prove your identity as **[Server]**. | ||
2. **[Server]**: Sure, here’s my certificate. | ||
3. **[Client]**: I'll check the signature using my root key, verifying that the public key was not compromised, is not expired, and matches the expected version. | ||
4. **[Client]**: I verified it; it's valid. Here’s my public key. I'll create a shared secret using your public key. | ||
5. **[Server]**: I have the shared secret now too. Let me verify that we have the same and that your public key was not compromised as well. I’ll send you an encrypted message using the shared secret. | ||
1. **[Client]**: I want your certificate to prove your identity as **[Server]**. | ||
2. **[Server]**: Sure, here’s my certificate. | ||
3. **[Client]**: I'll check the signature using my root key, verifying that the public key was not compromised, is not expired, and matches the expected version. | ||
4. **[Client]**: I verified it; it's valid. Here’s my public key. I'll create a shared secret using your public key. | ||
5. **[Server]**: I have the shared secret now too. Let me verify that we have the same and that your public key was not compromised as well. I’ll send you an encrypted message using the shared secret. | ||
6. **[Client]**: I successfully decrypted the message. Our connection is now secure! | ||
|
||
## Examples | ||
## Real-time chat Example | ||
|
||
Find examples [here](https://github.com/deneonet/cosair.gg-net-examples). | ||
Find a real-time chat example [here](https://github.com/deneonet/knet-real-time-chat). |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.