-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Security Implementation #107
base: main
Are you sure you want to change the base?
Conversation
Thank you for your contribution! I will use the long weekend to read it. |
// Sign computes the signature value of a wire. | ||
Sign(enc.Wire) ([]byte, error) | ||
// Public returns the public key of the signer or nil. | ||
Public() ([]byte, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to separate Signer
with PrivateKey
. Signer
executes the signing action with a given key, its fields are related to the signing action (sequence number, timestamp, nonce, etc.), instead of the key itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, renaming.
sequence number, timestamp, nonce, etc.
Trying to eliminate these if possible. We shouldn't be using signed interest that can be replayed. SVSv3 is the first to move away.
Signer still will have needs the extra KeyLocator
field / method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm on starting the refactor, I realised this won't fit the SHA256 signer (since there is no key). Then we'd need either another name / implementation for SHA256 signer, or a separate signer implementation (want to avoid this complexity).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sequence number, timestamp, nonce, etc.
Trying to eliminate these if possible. We shouldn't be using signed interest that can be replayed. SVSv3 is the first to move away.
I don't follow. SeqNum/Nonce/Timestamp were designed to prevent replay attacks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the intention is to eventually eliminate signed interest.
For now I don't plan to support any of these optional fields in NDNd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
understood
I realise this might have gotten too out of hand to review effectively.
WIP summary:
ndnd/std/security/signer
ndnd sec
; docs indocs/sec.md
)a. Let's forget signed Interest if we can
b. Forget about preventing replay (nonce / seq / time fields)
ndnd sec
Security tool usage (as of writing this)
Example PEM cert and key