Open jMyles opened 7 years ago
Currently, kFrags are very simple objects:
namedtuple('RekeyFrag', ['id', 'key'])
But how best to represent this object over the wire?
Currently, we imagine the payload for a policy in NuCypher-KMS as:
msgpack.dumps({b"kf": bytes(self.kfrag), b"cp": msgpack.dumps(self.challenge_pack)})
However, we can't easily cast the kFrag to bytes. What's the one obvious way to do this?
Both id and key are integers modulo the order of the curve. If right now we are using curve secp256k1, then both could be represented with 256 bits, so the whole kFrag can fit in 64 bytes, without delimiters.
id
key
Currently, kFrags are very simple objects:
namedtuple('RekeyFrag', ['id', 'key'])
But how best to represent this object over the wire?
Currently, we imagine the payload for a policy in NuCypher-KMS as:
msgpack.dumps({b"kf": bytes(self.kfrag), b"cp": msgpack.dumps(self.challenge_pack)})
However, we can't easily cast the kFrag to bytes. What's the one obvious way to do this?