Giter Site home page Giter Site logo

encryptednet's Issues

Bad actors can not send a handshake event to cause errors on the server

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.

ECC Key gen not working in v1.1

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:

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.