boatbomber / encryptednet Goto Github PK
View Code? Open in Web Editor NEWAuthenticated encryption of Roblox networking with ECDH key exchanges and ChaCha20 ciphering.
License: MIT License
Authenticated encryption of Roblox networking with ECDH key exchanges and ChaCha20 ciphering.
License: MIT License
When calling Remote.SendToAllPlayers on an EncryptedNet remote, it doesn't check if players have indexes in PlayerData before calling SendToPlayer. This can cause errors if a player isnt initialized (or if a bad actor prevents the Handshake event from sending to cause an error). If one player fails, it wont send to any other players in the loop. An if statement should be added to check if they're initialized, and if not, retry the event in a second.
After experimenting with this module I have noticed that in v1.1 the private key generation does not work. In v1.0 everything seems to work as expected.
I dont know if this is machine specific but no matter what I tried it always stayed at zeros. I'm switching back to v1.0 for now.
In v1.1 the private keys are all zeros!
Code is used to test:
local ecc1 = require(... ["EncryptedNet 1.1"].EllipticCurveCryptography)
local ecc2 = require(... ["EncryptedNet 1.0"].EllipticCurveCryptography)
-- Faulty code: (ecc 1.1)
-- Generate tokens
local serverPrivate, serverPublic = ecc1.keypair(ecc1.random.random())
local clientPrivate, clientPublic = ecc1.keypair(ecc1.random.random())
-- Check for overlap
print(serverPrivate:isEqual(clientPrivate))
print(serverPrivate:toHex())
print()
print()
-- Working code: (ecc 1.0)
-- Generate tokens
local serverPrivate, serverPublic = ecc2.keypair(ecc2.random.random())
local clientPrivate, clientPublic = ecc2.keypair(ecc2.random.random())
-- Check for overlap
print(serverPrivate:isEqual(clientPrivate))
print(serverPrivate:toHex())
Result:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.