UCLA-IRL / ndn-python-repo

An NDN Repo implementation in Python
Apache License 2.0
16 stars 13 forks source link

ReadHandle does not preserve Data signature #4

Closed yoursunny closed 4 years ago

yoursunny commented 4 years ago

ReadHandle._on_interest function currently transmits a Data packet like this: https://github.com/JonnyKong/NDN-Repo/blob/47b62cbab776a4b6480c741d8b6c4d09ba96a2a8/src/handle/read_handle.py#L33 It constructs a Data packet from Name, MetaInfo, and Content, but does not preserve original Signature.

Generally, repo may be deployed on a node that does not possess producer's signing key. Signing the Data with a different key breaks application trust model.

zjkmxy commented 4 years ago

A new function get_original_packet_value is added to NDNApp class, which may be helpful.

JonnyKong commented 4 years ago

Fixed with https://github.com/JonnyKong/NDN-Repo/commit/b77e9c5c91ad3942a51b0a442ce0130de3226ab2.