Pysyft: int(10e10 * random.random()) all over syft

Created on 12 Apr 2019  路  5Comments  路  Source: OpenMined/PySyft

int(10e10 * random.random()) is used in multiple files to generate Ids, could we create a module to deal with id generation? Or maybe a utility file that could be accessible from every module?

Good first issue

Most helpful comment

@LiviaCavalcanti @jcezarms FYI: there is already an id generator entity abstraction at abstract.py

All 5 comments

+1 to this - and in fact we should probably start switching to a much larger hash instead of an int. We will eventually get to a scale where collisions (accidential or malicious) are a bigger deal.

Hey, is this problem free, in the way that I can work on it?

@LiviaCavalcanti

Hey, is this problem free, in the way that I can work on it?

Yes , go ahead! It would great to have your help on this :)

@iamtrask what about something along the lines of random.SystemRandom().getrandombits(n)? In this case, n would be up to discussion, I'd say 128 fits the purpose. A higher n contributes ~an extra bit~ in terms of security on hashing, which I suppose is a priority for PySyft.

@LiviaCavalcanti @jcezarms FYI: there is already an id generator entity abstraction at abstract.py

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tblazina picture tblazina  路  3Comments

iamtrask picture iamtrask  路  3Comments

beatrizsmg picture beatrizsmg  路  4Comments

mgale694 picture mgale694  路  3Comments

gmuraru picture gmuraru  路  4Comments